Module objects

Source
Expand description

Screeps object wrappers.

Objects types that inherit RoomObject represent game objects with are valid to be used only during the current tick; reading or writing a ‘stale’ game object from a past tick will result in undefined behavior.

Re-exports§

pub use event::*;
pub use input::*;
pub use output::*;
pub use visual::*;

Modules§

event
Object wrappers representing data retrieved from room event logs.
input
Object wrappers for simple javascript objects with known properties sent to game functions.
output
Object wrappers for simple javascript objects with known properties returned by game functions.
visual
Object wrappers allowing drawing of shapes in rooms or on the map in the game world.

Structs§

ConstructionSite
A ConstructionSite which is an object representing a structure under construction.
CostMatrix
A reference to a matrix of pathing costs for a room, stored in JavaScript memory.
Creep
A Creep unit in the game world.
Deposit
A Deposit, which can be harvested for resources used in commodities.
Flag
A Flag, which can be placed by the player or created automatically and are only visible to their owners. You can’t create more than FLAGS_LIMIT.
Mineral
A Mineral, which can be harvested for resources with an extractor.
Nuke
A Nuke in flight, which will deal damage in an area and kill all creeps in the room when it lands.
OwnedStructure
Parent class for all Structure objects types which are (or can be) owned by a specific player.
PowerCreep
A PowerCreep unit in the game world.
Reactorseasonal-season-5
An object representing a Reactor, which process Thorium to gain season score.
Resource
A Resource is an object representing resources that have been dropped and can be picked up.
Room
A reference to a Room object, a 50x50 chunk of the Screeps game world.
RoomObject
Parent class for all objects in rooms in the game world.
RoomPosition
An object representing a position in a room, stored in JavaScript memory.
RoomTerrain
A matrix representing the terrain of a room, held in the JavaScript heap.
Ruin
A Ruin, which represents a destroyed structure and can have resources withdrawn from it.
ScoreCollectorseasonal-season-1
An object representing a ScoreCollector, which can have ResourceType::Score transferred to it in order to score points on the leaderboard.
ScoreContainerseasonal-season-1
An object representing a ScoreContainer, which appears randomly around the map and contains ResourceType::Score which can be collected.
Source
A Source, which can be harvested for energy.
Spawning
Object with info on what a StructureSpawn or StructureInvaderCore is currently spawning.
Store
An object that represents the cargo within an entity in the game world.
Structure
Parent class for all objects that represent a structure in the game world.
StructureContainer
An object representing a StructureContainer, which can store resources and does not block creep movement, but requires regular repair due to decay.
StructureController
An object representing a StructureController.
StructureExtension
An object representing a StructureExtension, which can store energy to be used by spawns in the room to spawn creeps.
StructureExtractor
An object representing a StructureExtractor, which can be placed on top of a Mineral to extract resources.
StructureFactory
An object representing a StructureFactory, which can compress and decompress resources and produce commodities for sale.
StructureInvaderCore
An object representing a StructureInvaderCore, which is at the center of NPC strongholds, as well as reserving neutral rooms.
StructureKeeperLair
An object representing a StructureKeeperLair, which regularly spawns creeps to defend nearby resources.
StructureLab
An object representing a StructureLab, which can be used to create mineral compounds.
StructureLink
An object representing a StructureLink, which can hold energy and transfer it to other links within the room.
StructureNuker
An object representing a StructureNuker, which consumes energy and ghodium to fire Nukes.
StructureObserver
An object representing a StructureObserver, which can grant vision to remote rooms.
StructurePortal
An object representing a StructurePortal, which allows movement between remote locations or other shards.
StructurePowerBank
An object representing a StructurePowerBank, which can be destroyed for power resources.
StructurePowerSpawn
An object representing a StructurePowerSpawn, which can process power to contribute to your GPL as well as renewing power creeps.
StructureRampart
An object representing a StructureRampart, which is selectively walkable and protects creeps and structures at the same position.
StructureRoad
An object representing a StructureRoad, which allows creeps to move onto this position for half of the fatigue of moving onto a plains tile, as well as through terrain walls.
StructureSpawn
An object representing a StructureSpawn, which creates your creeps.
StructureStorage
An object representing a StructureStorage, which can store large amounts of resources.
StructureTerminal
An object representing a StructureTerminal, which can send resources to distant rooms and participate in the market.
StructureTower
An object representing a StructureTower, which can heal, repair, or attack anywhere in the room.
StructureWall
An object representing a StructureWall, which blocks movement of all creeps.
SymbolContainerseasonal-season-2
An object representing a SymbolContainer, which appears randomly around the map and contains symbol resources which can be collected.
SymbolDecoderseasonal-season-2
An object representing a SymbolDecoder, which can be used to decode matching symbol resources to score points on the leaderboard.
Tombstone
A Tombstone, which represents a dead creep and can have resources withdrawn from it.