mecha_equipment
Mecha Equipment All mech equippables are currently childs of this
Vars | |
active | Whether the module is currently active |
---|---|
active_label | Label used in the ui next to the Activate/Enable/Disable buttons |
can_be_toggled | Whether you can turn this module on/off with a button |
can_be_triggered | Whether you can trigger this module with a button (activation only) |
chassis | Reference to mecha that this equipment is currently attached to |
destroy_sound | Sound file: Sound to play when this equipment is destroyed while still attached to the mech |
detachable | boolean: FALSE if this equipment can not be removed/salvaged |
energy_drain | Chassis power cell quantity used on activation |
equip_cooldown | Cooldown in ticks required between activations of the equipment |
equipment_slot | Determines what "slot" this attachment will try to attach to on a mech |
harmful | Boolean: whether a pacifist can use this equipment |
mech_flags | Bitflag. Used by exosuit fabricator to assign sub-categories based on which exosuits can equip this. |
range | Bitflag. Determines the range of the equipment. |
Procs | |
action_checks | Checks whether this mecha equipment can be active Returns a bool Arguments: |
detach | called to detach this equipment Args: |
do_after_checks | do after checks for the mecha equipment do afters |
do_after_cooldown | Cooldown proc variant for using do_afters between activations instead of timers Example of usage is mech drills, rcds arguments: |
do_after_mecha | Do after wrapper for mecha equipment |
get_snowflake_data | |
handle_ui_act | called after ui_act, for custom ui act handling |
needs_rearm | AI mech pilot: returns TRUE if the Ai should try to reload the mecha |
rearm | Proc for reloading weapons from HTML UI or by AI note that this is old and likely broken code |
special_attaching_interaction | Special Attaching Interaction, used to bypass normal attachment procs. |
Var Details
active
Whether the module is currently active
active_label
Label used in the ui next to the Activate/Enable/Disable buttons
can_be_toggled
Whether you can turn this module on/off with a button
can_be_triggered
Whether you can trigger this module with a button (activation only)
chassis
Reference to mecha that this equipment is currently attached to
destroy_sound
Sound file: Sound to play when this equipment is destroyed while still attached to the mech
detachable
boolean: FALSE if this equipment can not be removed/salvaged
energy_drain
Chassis power cell quantity used on activation
equip_cooldown
Cooldown in ticks required between activations of the equipment
equipment_slot
Determines what "slot" this attachment will try to attach to on a mech
harmful
Boolean: whether a pacifist can use this equipment
mech_flags
Bitflag. Used by exosuit fabricator to assign sub-categories based on which exosuits can equip this.
range
Bitflag. Determines the range of the equipment.
Proc Details
action_checks
Checks whether this mecha equipment can be active Returns a bool Arguments:
- target: atom we are activating/clicked on
detach
called to detach this equipment Args:
- moveto: optional target to move this equipment to
do_after_checks
do after checks for the mecha equipment do afters
do_after_cooldown
Cooldown proc variant for using do_afters between activations instead of timers Example of usage is mech drills, rcds arguments:
- target: targeted atom for action activation
- user: occupant to display do after for
- interaction_key: interaction key to pass to /proc/do_after
do_after_mecha
Do after wrapper for mecha equipment
get_snowflake_data
get_snowflake_data
handles the returning of snowflake data required by the UI of the mecha not the prettiest of procs honeslty returns:
- an assoc list
- must include an list("snowflake_id" = snowflake_id)
handle_ui_act
called after ui_act, for custom ui act handling
needs_rearm
AI mech pilot: returns TRUE if the Ai should try to reload the mecha
rearm
Proc for reloading weapons from HTML UI or by AI note that this is old and likely broken code
special_attaching_interaction
Special Attaching Interaction, used to bypass normal attachment procs.
If an equipment needs to bypass the regular chain of events, this proc can be used to allow for that. If used, it must handle actually calling attach(), as well as any feedback to the user. Args:
- attach_right: True if attaching the the right-hand equipment slot, false otherwise.
- mech: ref to the mecha that we're attaching onto.
- user: ref to the mob doing the attaching
- checkonly: check if we are able to handle the attach procedure ourselves, but don't actually do it yet.