obj
Vars | |
current_skin | Has the item been reskinned? |
---|---|
custom_fire_overlay | Custom fire overlay icon |
damage_deflection | Damage under this value will be completely ignored |
unique_reskin | List of options to reskin. |
Procs | |
GetExplosionBlock | returns how much the object blocks an explosion. Used by subtypes. |
acid_act | the obj's reaction when touched by acid |
acid_melt | called when the obj is destroyed by acid. |
acid_processing | the proc called by the acid subsystem to process the acid that's on the obj |
burn | called when the obj is destroyed by fire |
check_reskin_menu | Checks if we are allowed to interact with a radial menu for reskins |
deconstruct | the obj is deconstructed into pieces, whether through careful disassembly or when destroyed. |
expose_reagents | Handles exposing an object to reagents. |
extinguish | Called when the obj is no longer on fire. |
fire_act | / FIRE Called when the obj is exposed to fire. |
hulk_damage | Called to get the damage that hulks will deal to the obj. |
modify_max_integrity | changes max_integrity while retaining current health percentage, returns TRUE if the obj got broken. |
obj_break | called after the obj takes damage and integrity is below integrity_failure level |
obj_destruction | what happens when the obj's integrity reaches zero. |
on_object_saved | For returning special data when the object is saved For example, or silos will return a list of their materials which will be dumped on top of them Can be customised if you have something that contains something you want saved If you put an incorrect format it will break outputting, so don't use this if you don't know what you are doing NOTE: Contents is automatically saved, so if you store your things in the contents var, don't worry about this ====Output Format Examples====: ===Single Object=== "/obj/item/folder/blue" ===Multiple Objects=== "/obj/item/folder/blue,\n /obj/item/folder/red" ===Single Object with metadata=== "/obj/item/folder/blue{\n \tdir = 8;\n \tname = "special folder"\n \t}" ===Multiple Objects with metadata=== "/obj/item/folder/blue{\n \tdir = 8;\n \tname = "special folder"\n \t},\n /obj/item/folder/red" ====How to save easily====: return "[thing.type][generate_tgm_metadata(thing)]" Where thing is the additional thing you want to same (For example ores inside an ORM) Just add ,\n between each thing generate_tgm_metadata(thing) handles everything inside the {} for you |
play_attack_sound | the sound played when the obj is damaged. |
reskin_obj | Reskins object based on a user's choice |
run_obj_armor | returns the damage value of the attack after processing the obj's various armor protections |
take_damage | How many mats have we found? You can only be affected by two material datums by default How much of each material is in it? Used to determine if the glass should break The glass shard that is spawned into the source item victim's chest (for cavity implanting the item) the essential proc to call when an obj must receive damage of any kind. |
zap_act | Called when the obj is hit by a tesla bolt. |
zap_buckle_check | Only tesla coils, vehicles, and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later. |
Var Details
current_skin
Has the item been reskinned?
custom_fire_overlay
Custom fire overlay icon
damage_deflection
Damage under this value will be completely ignored
unique_reskin
List of options to reskin.
Proc Details
GetExplosionBlock
returns how much the object blocks an explosion. Used by subtypes.
acid_act
the obj's reaction when touched by acid
acid_melt
called when the obj is destroyed by acid.
acid_processing
the proc called by the acid subsystem to process the acid that's on the obj
burn
called when the obj is destroyed by fire
check_reskin_menu
Checks if we are allowed to interact with a radial menu for reskins
Arguments:
- user The mob interacting with the menu
deconstruct
the obj is deconstructed into pieces, whether through careful disassembly or when destroyed.
expose_reagents
Handles exposing an object to reagents.
extinguish
Called when the obj is no longer on fire.
fire_act
/ FIRE Called when the obj is exposed to fire.
hulk_damage
Called to get the damage that hulks will deal to the obj.
modify_max_integrity
changes max_integrity while retaining current health percentage, returns TRUE if the obj got broken.
obj_break
called after the obj takes damage and integrity is below integrity_failure level
obj_destruction
what happens when the obj's integrity reaches zero.
on_object_saved
For returning special data when the object is saved For example, or silos will return a list of their materials which will be dumped on top of them Can be customised if you have something that contains something you want saved If you put an incorrect format it will break outputting, so don't use this if you don't know what you are doing NOTE: Contents is automatically saved, so if you store your things in the contents var, don't worry about this ====Output Format Examples====: ===Single Object=== "/obj/item/folder/blue" ===Multiple Objects=== "/obj/item/folder/blue,\n /obj/item/folder/red" ===Single Object with metadata=== "/obj/item/folder/blue{\n \tdir = 8;\n \tname = "special folder"\n \t}" ===Multiple Objects with metadata=== "/obj/item/folder/blue{\n \tdir = 8;\n \tname = "special folder"\n \t},\n /obj/item/folder/red" ====How to save easily====: return "[thing.type][generate_tgm_metadata(thing)]" Where thing is the additional thing you want to same (For example ores inside an ORM) Just add ,\n between each thing generate_tgm_metadata(thing) handles everything inside the {} for you
play_attack_sound
the sound played when the obj is damaged.
reskin_obj
Reskins object based on a user's choice
Arguments:
- M The mob choosing a reskin option
run_obj_armor
returns the damage value of the attack after processing the obj's various armor protections
take_damage
How many mats have we found? You can only be affected by two material datums by default How much of each material is in it? Used to determine if the glass should break The glass shard that is spawned into the source item victim's chest (for cavity implanting the item) the essential proc to call when an obj must receive damage of any kind.
zap_act
Called when the obj is hit by a tesla bolt.
zap_buckle_check
Only tesla coils, vehicles, and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later.