Skip to content
Jeppe Zapp edited this page Apr 14, 2014 · 4 revisions

The inventory grid

Variables

Variable Type
width int Width of the grid
height int Height of the grid
inventory OSInventory Parent inventory

Methods

Method Return type
Move ( slot : OSSlot, x : int, y : int ) void Move slot from one cell to another
GetSkippedCells ( except : OSSlot ) boolean [ , ] Get a 2-dimensional array of cells to skip
CheckCell ( x : int, y : int, item : OSItem ) boolean Check if OSItem will fit into the cell
GetAvailableCell ( item : OSItem ) OSPoint Gets the next available cell for the item
Clone this wiki locally