Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface StoreStructure<T>

Type parameters

  • T: StructureConstant

Hierarchy

  • Structure
    • StoreStructure

Index

Properties

Structure

Structure: StructureConstructor

hits

hits: number

The current amount of hit points of the structure.

hitsMax

hitsMax: number

The total amount of hit points of the structure.

id

id: string

A unique object identifier. You can use Game.getObjectById method to retrieve an object instance by its id.

isWalkable

isWalkable: boolean

pos

pos: RoomPosition

An object representing the position of this object in the room.

prototype

prototype: Structure

ref

ref: string

room

room: Room

If you can get an instance of a Structure, you can see it. If you can see the Structure, you can see the room it's in.

store

store: StoreDefinition

storeCapacity

storeCapacity: number

structureType

structureType: T

One of the STRUCTURE_* constants.

targetedBy

targetedBy: string[]

Methods

destroy

  • destroy(): ScreepsReturnCode
  • Destroy this structure immediately.

    Returns ScreepsReturnCode

isActive

  • isActive(): boolean
  • Check whether this structure can be used. If the room controller level is not enough, then this method will return false, and the structure will be highlighted with red in the game.

    Returns boolean

notifyWhenAttacked

  • notifyWhenAttacked(enabled: boolean): ScreepsReturnCode
  • Toggle auto notification when the structure is under attack. The notification will be sent to your account email. Turned on by default.

    Parameters

    • enabled: boolean

      Whether to enable notification or disable.

    Returns ScreepsReturnCode

serialize

  • serialize(): protoRoomObject

Generated using TypeDoc