Space Station 13 - Nebula13 - Modules - TypesVar Details - Proc Details

obj

Vars

current_healthThe current health of the obj. Leave to null, unless you want the object to start at a different health than max_health.
max_healthThe maximum health that the object can have. If set to ITEM_HEALTH_NO_DAMAGE, the object won't take any damage.

Procs

InitializeJSON list of directions to x,y offsets to be applied to the object depending on its direction EX: @'{"NORTH":{"x":12,"y":5}, "EAST":{"x":10,"y":50}}'
WillContainReturns a list with the contents that may be spawned in this object. This shouldn't include things that are necessary for the object to operate, like machine components. It's mainly for populating storage and the like.
can_take_damageReturns TRUE if this object can take damage.
get_examined_damage_stringReturns a text string to describe the current damage level of the item, or null if non-applicable.
get_percent_damagesReturns the percentage of damage done to this object.
get_percent_healthReturns the percentage of health remaining for this object.
initialize_reagentsInit starting reagents and/or reagent var. Not called at the /obj level. populate: If set to true, we expect map load/admin spawned reagents to be set.
is_damagedReturns whether this object is damaged.
is_wall_mountedReturns whether the object should be considered as hanging off a wall. This is userful because wall-mounted things are actually on the adjacent floor tile offset towards the wall. Which means we have to deal with directional offsets differently. Such as with buttons mounted on a table, or on a wall.
populate_reagentsActually populates the reagents. Can be easily nulled out or fully overriden without having to rewrite the complete reagent init logic. An alternative to using a list for defining our starting reagents since apparently overriding the value of a list creates an (init) proc each time.
update_directional_offsetApplies the offset stored in the directional_offset json list depending on the current direction. force will force the default offset to be 0 if there are no directional_offset string.

Var Details

current_health

The current health of the obj. Leave to null, unless you want the object to start at a different health than max_health.

max_health

The maximum health that the object can have. If set to ITEM_HEALTH_NO_DAMAGE, the object won't take any damage.

Proc Details

Initialize

JSON list of directions to x,y offsets to be applied to the object depending on its direction EX: @'{"NORTH":{"x":12,"y":5}, "EAST":{"x":10,"y":50}}'

WillContain

Returns a list with the contents that may be spawned in this object. This shouldn't include things that are necessary for the object to operate, like machine components. It's mainly for populating storage and the like.

can_take_damage

Returns TRUE if this object can take damage.

get_examined_damage_string

Returns a text string to describe the current damage level of the item, or null if non-applicable.

get_percent_damages

Returns the percentage of damage done to this object.

get_percent_health

Returns the percentage of health remaining for this object.

initialize_reagents

Init starting reagents and/or reagent var. Not called at the /obj level. populate: If set to true, we expect map load/admin spawned reagents to be set.

is_damaged

Returns whether this object is damaged.

is_wall_mounted

Returns whether the object should be considered as hanging off a wall. This is userful because wall-mounted things are actually on the adjacent floor tile offset towards the wall. Which means we have to deal with directional offsets differently. Such as with buttons mounted on a table, or on a wall.

populate_reagents

Actually populates the reagents. Can be easily nulled out or fully overriden without having to rewrite the complete reagent init logic. An alternative to using a list for defining our starting reagents since apparently overriding the value of a list creates an (init) proc each time.

update_directional_offset

Applies the offset stored in the directional_offset json list depending on the current direction. force will force the default offset to be 0 if there are no directional_offset string.