Module screeps::objects[][src]

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

AccountPowerCreep
AttackEvent
Bodypart
BuildEvent
CircleStyle
ConstructionSite
Creep
Deposit
Effect
Event
ExitEvent
FindOptions
Flag
HarvestEvent
HealEvent
LineStyle
Mineral
MoveToOptions
Nuke
ObjectDestroyedEvent
OwnedStructure
PolyStyle
PositionedLookResult
PowerCreep
RectStyle
RepairEvent
Reservation
ReserveControllerEvent
Resource
Room
RoomObject
RoomTerrain
RoomVisual
Ruin
Sign
Source
SpawnOptions
Spawning
Step
StructureContainer
StructureController
StructureExtension
StructureExtractor
StructureFactory
StructureInvaderCore
StructureKeeperLair
StructureLab
StructureLink
StructureNuker
StructureObserver
StructurePortal
StructurePowerBank
StructurePowerSpawn
StructureRampart
StructureRoad
StructureSpawn
StructureStorage
StructureTerminal
StructureTower
StructureWall
TextStyle
Tombstone
UpgradeControllerEvent

Enums

AttackType
EventType
FontStyle
HealType
LineDrawStyle
LookResult
Path
PortalDestination
Structure

Wrapper which can be any of the game Structures.

TextAlign
Visual

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.

Harvestable

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

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.

SharedCreepProperties

Trait for all wrappers over Screeps JavaScript objects that are creeps or power creeps

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.