[][src]Module screeps::objects

Screeps object wrappers.

Unsafe traits

This module contains a number of unsafe traits. Each is unsafe purely to prevent accidental implementations on things which don't uphold the trait contracts that have not been put into code. There is no unsafe code in this crate which relies on these traits being implemented correctly, only code which will panic if they are not.

Even though this crate does not contain any, other crate unsafe could rely on these contracts being upheld as long as JavaScript code does not do anything mischievous, like removing properties from objects or sticking unexpected things into dictionaries which we trust.

Structs

AttackEvent
Bodypart
BuildEvent
ConstructionSite
Creep
Event
ExitEvent
FindOptions
Flag
HarvestEvent
HealEvent
Mineral
MoveToOptions
Nuke
ObjectDestroyedEvent
OwnedStructure
PositionedLookResult
PowerCreep
RepairEvent
Reservation
ReserveControllerEvent
Resource
Room
RoomObject
RoomPosition
RoomTerrain
Sign
Source
SpawnOptions
Spawning
Step
StructureContainer
StructureController
StructureExtension
StructureExtractor
StructureKeeperLair
StructureLab
StructureLink
StructureNuker
StructureObserver
StructurePortal
StructurePowerBank
StructurePowerSpawn
StructureRampart
StructureRoad
StructureSpawn
StructureStorage
StructureTerminal
StructureTower
StructureWall
Tombstone
UpgradeControllerEvent

Enums

AttackType
EventType
HealType
LookResult
Path
PortalDestination
Structure

Wrapper which can be any of the game Structures.

Traits

Attackable

Trait for all wrappers over Screeps JavaScript objects which can be the target of Creep.attack.

CanDecay

Trait for objects which can decay.

CanStoreEnergy

Trait for objects which can only store energy.

HasCooldown

Trait for objects which have to cooldown.

HasEnergyForSpawn

Used to specify which structures can use their stored energy for spawning creeps.

HasId

Trait covering all objects with an id.

HasPosition

Trait for things which have positions in the Screeps world.

HasStore

Trait for all wrappers over Screeps JavaScript objects with a store property.

OwnedStructureProperties

Trait for all wrappers over Screeps JavaScript objects extending the OwnedStructure class.

RoomObjectProperties

Trait for all wrappers over Screeps JavaScript objects extending the RoomObject class.

SizedRoomObject

Trait representing things that are both RoomObjectProperties and Sized.

StructureProperties

Trait for all wrappers over Screeps JavaScript objects extending the Structure class.

Transferable

Trait for all wrappers over Screeps JavaScript objects which can be the target of Creep.transfer.

Withdrawable

Trait for all wrappers over Screeps JavaScript objects which can be the target of Creep.withdraw.