Goonstation 13 - Modules - TypesVar Details - Proc Details

/datum/cell_grid

Vars

grid2d Cell Grid

Procs

box_has_borderRetrieve directions (N,E,S,W) where box has truthy elements adjacent to it
drawLBoxDraw 2 orthogonal boxes that connect (x1,y1) to (x2,y2) based on the internal size
drawLShapeDraw 2 orthogonal lines that connect (x1,y1) to (x2,y2)
draw_areaDraw in a region (box) from (min_x, min) to (max_x, max_y)
draw_boxRetrieve list of (x,y) tuples composing line from (x1,y1) to (x2,y2) - Bresenham Line
draw_from_stringConvert a string array to cell_grid assigning value_alive when 1 and value_dead when 0
draw_lineDraw line from (x1,y1) to (x2,y2) - Bresenham Line Drawing
fill_pointsSet of list of (x,y) tuples in cell grid
find_contigious_cellsRetrieve a list of contigious open/set regions that contain the corresponding (x,y) tuple lists for those regions
generate_mazeGenerates maze with the botom left of (x1,y1) and top right of (x2,y2) where all open cells are set to the floor_value
get_box_borderGet list of (x,y) tuples that make up edges of a box (x1,y1) to (x2,y2)
get_cell_attributeRetrieve an attribute of a cell when cell use associative arrays
get_cell_neighborsRetrieve list of list(x,y) tuples for coordinate provided
get_distanceGet the (Chebyshev) distance between two points
get_lineRetrieve list of (x,y) tuples composing line from (x1,y1) to (x2,y2) - Bresenham Line
get_manhattan_distanceGet the Manhattan distance between two points
has_empty_neighborDetermine if cell has any empty/closed/falsey neighbors

Var Details

grid

2d Cell Grid

Proc Details

box_has_border

Retrieve directions (N,E,S,W) where box has truthy elements adjacent to it

drawLBox

Draw 2 orthogonal boxes that connect (x1,y1) to (x2,y2) based on the internal size

drawLShape

Draw 2 orthogonal lines that connect (x1,y1) to (x2,y2)

draw_area

Draw in a region (box) from (min_x, min) to (max_x, max_y)

draw_box

Retrieve list of (x,y) tuples composing line from (x1,y1) to (x2,y2) - Bresenham Line

draw_from_string

Convert a string array to cell_grid assigning value_alive when 1 and value_dead when 0

draw_line

Draw line from (x1,y1) to (x2,y2) - Bresenham Line Drawing

fill_points

Set of list of (x,y) tuples in cell grid

find_contigious_cells

Retrieve a list of contigious open/set regions that contain the corresponding (x,y) tuple lists for those regions

generate_maze

Generates maze with the botom left of (x1,y1) and top right of (x2,y2) where all open cells are set to the floor_value

get_box_border

Get list of (x,y) tuples that make up edges of a box (x1,y1) to (x2,y2)

get_cell_attribute

Retrieve an attribute of a cell when cell use associative arrays

get_cell_neighbors

Retrieve list of list(x,y) tuples for coordinate provided

get_distance

Get the (Chebyshev) distance between two points

get_line

Retrieve list of (x,y) tuples composing line from (x1,y1) to (x2,y2) - Bresenham Line

get_manhattan_distance

Get the Manhattan distance between two points

has_empty_neighbor

Determine if cell has any empty/closed/falsey neighbors