code/__DEFINES/spatial_gridmap.dm
SPATIAL_GRID_CELLSIZE | each cell in a spatial_grid is this many turfs in length and width (with world.max(x or y) being 255, 15 of these fit on each side of a z level) |
---|---|
GET_SPATIAL_INDEX | Takes a coordinate, and spits out the spatial grid index (x or y) it's inside |
GRID_INDEX_TO_COORDS | changes the cell_(x or y) vars on /datum/spatial_grid_cell to the x or y coordinate on the map for the LOWER LEFT CORNER of the grid cell. index is from 1 to SPATIAL_GRID_CELLS_PER_SIDE |
SPATIAL_GRID_CELLS_PER_SIDE | number of grid cells per x or y side of all z levels. pass in world.maxx or world.maxy |
SPATIAL_GRID_CONTENTS_TYPE_HEARING | everything that is hearing sensitive is stored in this channel |
SPATIAL_GRID_CONTENTS_TYPE_CLIENTS | every movable that has a client in it is stored in this channel |
SPATIAL_GRID_CONTENTS_TYPE_ATMOS | all atmos machines are stored in this channel (I'm sorry kyler) |
HAS_SPATIAL_GRID_CONTENTS | whether movable is itself or containing something which should be in one of the spatial grid channels. |
GRID_CELL_REMOVE_ALL | remove from every list |
Define Details
GET_SPATIAL_INDEX
Takes a coordinate, and spits out the spatial grid index (x or y) it's inside
GRID_CELL_REMOVE_ALL
remove from every list
GRID_INDEX_TO_COORDS
changes the cell_(x or y) vars on /datum/spatial_grid_cell to the x or y coordinate on the map for the LOWER LEFT CORNER of the grid cell. index is from 1 to SPATIAL_GRID_CELLS_PER_SIDE
HAS_SPATIAL_GRID_CONTENTS
whether movable is itself or containing something which should be in one of the spatial grid channels.
SPATIAL_GRID_CELLSIZE
each cell in a spatial_grid is this many turfs in length and width (with world.max(x or y) being 255, 15 of these fit on each side of a z level)
SPATIAL_GRID_CELLS_PER_SIDE
number of grid cells per x or y side of all z levels. pass in world.maxx or world.maxy
SPATIAL_GRID_CONTENTS_TYPE_ATMOS
all atmos machines are stored in this channel (I'm sorry kyler)
SPATIAL_GRID_CONTENTS_TYPE_CLIENTS
every movable that has a client in it is stored in this channel
SPATIAL_GRID_CONTENTS_TYPE_HEARING
everything that is hearing sensitive is stored in this channel