Module local

Source
Expand description

Pure-data structures relating to Screeps.

Modules§

serde_position_packed
Module for use with serde’s with attribute to allow serialization of positions as their packed representation, even when using a human-readable serializer.

Structs§

LocalCostMatrix
A matrix of pathing costs for a room, stored in Rust memory.
LocalRoomTerrain
LodashFilter
An object that is used to filter returned results from Screeps functions that accept such filters
ObjectId
Represents an Object ID and a type that the ID points to, stored in Rust memory.
OutOfBoundsError
Position
Represents a position in a particular room in Screeps, stored in Rust memory.
RawObjectId
Represents an Object ID using a packed 12-byte representation
RoomCoordinate
An X or Y coordinate in a room, restricted to the valid range of coordinates.
RoomName
A structure representing a room name.
RoomXY
An X/Y pair representing a given coordinate relative to any room.
WorldPositionOutOfBoundsError

Enums§

RawObjectIdParseError
RoomNameConversionError
An error representing when a string can’t be parsed into a RoomName.
RoomNameParseError
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 or LocalCostMatrix to a RoomXY coordinate pair for the position the index represents.
terrain_index_to_xy
Converts a terrain index from the internal representation of a RoomTerrain or LocalRoomTerrain to a RoomXY 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 a CostMatrix or LocalCostMatrix.
xy_to_terrain_index
Converts a RoomXY coordinate pair to a terrain index appropriate for use with the internal representation of RoomTerrain or LocalRoomTerrain.