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