Expand description
Pure-data structures relating to Screeps.
Modules§
- serde_
position_ packed - Module for use with
serde
’swith
attribute to allow serialization of positions as their packed representation, even when using a human-readable serializer.
Structs§
- Local
Cost Matrix - A matrix of pathing costs for a room, stored in Rust memory.
- Local
Room Terrain - Lodash
Filter - An object that is used to filter returned results from Screeps functions that accept such filters
- Object
Id - Represents an Object ID and a type that the ID points to, stored in Rust memory.
- OutOf
Bounds Error - Position
- Represents a position in a particular room in Screeps, stored in Rust memory.
- RawObject
Id - Represents an Object ID using a packed 12-byte representation
- Room
Coordinate - An X or Y coordinate in a room, restricted to the valid range of coordinates.
- Room
Name - A structure representing a room name.
- RoomXY
- An X/Y pair representing a given coordinate relative to any room.
- World
Position OutOf Bounds Error
Enums§
- RawObject
IdParse Error - Room
Name Conversion Error - An error representing when a string can’t be parsed into a
RoomName
. - Room
Name Parse Error - An error representing when a string can’t be parsed into a
RoomName
.
Functions§
- linear_
index_ to_ xy - Converts a linear index from the internal representation of a
CostMatrix
orLocalCostMatrix
to aRoomXY
coordinate pair for the position the index represents. - terrain_
index_ to_ xy - Converts a terrain index from the internal representation of a
RoomTerrain
orLocalRoomTerrain
to aRoomXY
coordinate pair for the position the index represents. - xy_
to_ linear_ index - Converts a
RoomXY
coordinate pair to a linear index appropriate for use with the internal representation of aCostMatrix
orLocalCostMatrix
. - xy_
to_ terrain_ index - Converts a
RoomXY
coordinate pair to a terrain index appropriate for use with the internal representation ofRoomTerrain
orLocalRoomTerrain
.