mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
3 lines
7.2 KiB
HTML
3 lines
7.2 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../../"><link rel="stylesheet" href="dmdoc.css"><title>code/__DEFINES/spatial_gridmap_defines.dm - Space Station 13</title></head><body><header><a href="index.html">Space Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a> — <a href="code/__DEFINES/spatial_gridmap_defines.html#define">Define Details</a></header><main><h1>code/__DEFINES/spatial_gridmap_defines.dm <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm"></a></h1><table class="summary" cellspacing="0"><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CELLSIZE">SPATIAL_GRID_CELLSIZE</a></th><td>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)</td></tr><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/GET_SPATIAL_INDEX">GET_SPATIAL_INDEX</a></th><td>Takes a coordinate, and spits out the spatial grid index (x or y) it's inside</td></tr><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/GRID_INDEX_TO_COORDS">GRID_INDEX_TO_COORDS</a></th><td>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</td></tr><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CELLS_PER_SIDE">SPATIAL_GRID_CELLS_PER_SIDE</a></th><td>number of grid cells per x or y side of all z levels. pass in world.maxx or world.maxy</td></tr><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CONTENTS_TYPE_HEARING">SPATIAL_GRID_CONTENTS_TYPE_HEARING</a></th><td>everything that is hearing sensitive is stored in this channel</td></tr><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CONTENTS_TYPE_CLIENTS">SPATIAL_GRID_CONTENTS_TYPE_CLIENTS</a></th><td>every movable that has a client in it is stored in this channel</td></tr><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/SPATIAL_GRID_CONTENTS_TYPE_ATMOS">SPATIAL_GRID_CONTENTS_TYPE_ATMOS</a></th><td>all atmos machines are stored in this channel (I'm sorry kyler)</td></tr><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/HAS_SPATIAL_GRID_CONTENTS">HAS_SPATIAL_GRID_CONTENTS</a></th><td>whether movable is itself or containing something which should be in one of the spatial grid channels.</td></tr><tr><th><a href="code/__DEFINES/spatial_gridmap_defines.html#define/GRID_CELL_REMOVE_ALL">GRID_CELL_REMOVE_ALL</a></th><td>remove from every list</td></tr></table><h2 id="define">Define Details</h2><h3 id="define/GET_SPATIAL_INDEX"><aside class="declaration">#define </aside>GET_SPATIAL_INDEX<aside>(coord)</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L4"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 4"></a></h3><p>Takes a coordinate, and spits out the spatial grid index (x or y) it's inside</p><h3 id="define/GRID_CELL_REMOVE_ALL"><aside class="declaration">#define </aside>GRID_CELL_REMOVE_ALL<aside>(cell, movable)</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L52"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 52"></a></h3><p>remove from every list</p><h3 id="define/GRID_INDEX_TO_COORDS"><aside class="declaration">#define </aside>GRID_INDEX_TO_COORDS<aside>(index)</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L7"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 7"></a></h3><p>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</p><h3 id="define/HAS_SPATIAL_GRID_CONTENTS"><aside class="declaration">#define </aside>HAS_SPATIAL_GRID_CONTENTS<aside>(movable)</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L23"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 23"></a></h3><p>whether movable is itself or containing something which should be in one of the spatial grid channels.</p><h3 id="define/SPATIAL_GRID_CELLSIZE"><aside class="declaration">#define </aside>SPATIAL_GRID_CELLSIZE <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L2"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 2"></a></h3><p>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)</p><h3 id="define/SPATIAL_GRID_CELLS_PER_SIDE"><aside class="declaration">#define </aside>SPATIAL_GRID_CELLS_PER_SIDE<aside>(world_bounds)</aside> <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L9"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 9"></a></h3><p>number of grid cells per x or y side of all z levels. pass in world.maxx or world.maxy</p><h3 id="define/SPATIAL_GRID_CONTENTS_TYPE_ATMOS"><aside class="declaration">#define </aside>SPATIAL_GRID_CONTENTS_TYPE_ATMOS <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L18"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 18"></a></h3><p>all atmos machines are stored in this channel (I'm sorry kyler)</p><h3 id="define/SPATIAL_GRID_CONTENTS_TYPE_CLIENTS"><aside class="declaration">#define </aside>SPATIAL_GRID_CONTENTS_TYPE_CLIENTS <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L16"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 16"></a></h3><p>every movable that has a client in it is stored in this channel</p><h3 id="define/SPATIAL_GRID_CONTENTS_TYPE_HEARING"><aside class="declaration">#define </aside>SPATIAL_GRID_CONTENTS_TYPE_HEARING <a href="https://github.com/ParadiseSS13/Paradise/blob/8a8a00a2a9bec485351e5f219982b7315d3504fa/code/__DEFINES/spatial_gridmap_defines.dm#L14"><img src="git.png" width="16" height="16" title="code/__DEFINES/spatial_gridmap_defines.dm 14"></a></h3><p>everything that is hearing sensitive is stored in this channel</p></main><footer>paradise.dme <a href="https://github.com/ParadiseSS13/Paradise/tree/8a8a00a2a9bec485351e5f219982b7315d3504fa">8a8a00a</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.11.0</a></footer></body></html> |