Goonstation 13 - Modules - TypesProc Details

/datum/loot_grid

data class representing a grid of goodies (like an inventory grid in RE4).

Procs

get_largest_spaceReturns the largest empty rectangle possible, prioritising length rather than area.
get_next_empty_spaceReturn the coordinates of the next empty grid square from pos_x, pos_y. Fills out one row before moving up.
get_random_empty_spaceReturn the coordinates of a random empty grid square
is_emptyReturns if coordinate x, y is empty
mark_usedMarks an area of size xSize, ySize as used, starting at xPos, yPos
set_sizeSets the size of this grid, resetting it in the process.

Proc Details

get_largest_space

Returns the largest empty rectangle possible, prioritising length rather than area.

get_next_empty_space

Return the coordinates of the next empty grid square from pos_x, pos_y. Fills out one row before moving up.

get_random_empty_space

Return the coordinates of a random empty grid square

is_empty

Returns if coordinate x, y is empty

mark_used

Marks an area of size xSize, ySize as used, starting at xPos, yPos

set_size

Sets the size of this grid, resetting it in the process.