Your browser does not support HTML5 canvas. Fork me on GitHub

Available Packages:

UnitIndexer

Source

function static unit.deindex() returns boolean

Source

Deindexes a unit. Returns whether the unit was originally indexed.

function static unit.getIndex() returns int

Source

Returns the int index of this unit. Can be configured by the user to supply a custom unit indexer which won't break other stdlib components.

function getIndexingUnit() returns unit

Source

Returns the currently indexing unit. That's the last indexed unit or the one about to be deindexed.

function onUnitDeindex(code func)

Source

Adds a function to be called before a unit is deindexed. Use the getIndexingUnit() function to refer to the deindexing unit.

function onUnitIndex(code func)

Source

Adds a function to be called after a unit is indexed. Use the getIndexingUnit() function to refer to the indexed unit.

function shouldIndex(unit _u) returns boolean

Source

function static unit.toUnitIndex() returns UnitIndex

Source

Returns the UnitIndex associated with this unit, creating a new one if necessary.

class UnitIndex

Source

unit _unit

Source

function getIndex() returns int

Source

function getUnit() returns unit

Source