electrified_buckle component:
attach it to any atom/movable that can be buckled to in order to have it shock mobs buckled to it. by default it shocks mobs buckled to parent every shock_loop_time. the parent is supposed to define its behavior with arguments in AddComponent
Vars | |
electric_buckle_cooldown | it will only shock once every shock_loop_time |
---|---|
requested_overlays | this is casted to the overlay we put on parent_chair |
requested_signal_parent_emits | this signal was given as an argument to register for parent to emit, if its emitted to parent then shock_on_demand is called. var is so it can be unregistered |
required_object | if usage_flags has SHOCK_REQUIREMENT_ITEM, this is the item required to be inside parent in order for it to shock buckled mobs |
shock_damage | how much damage is done per shock iff usage_flags doesnt have SHOCK_REQUIREMENT_LIVE_CABLE |
shock_loop_time | how long the component waits before shocking the mob buckled to parent again |
shock_on_loop | if true, this will shock the buckled mob every shock_loop_time in process() |
usage_flags | these flags tells this instance what is required in order to allow shocking |
Procs | |
Initialize | Initialize args: |
process | where the guinea pig is actually shocked if possible |
shock_on_demand | a shock that is toggled manually |
Var Details
electric_buckle_cooldown
it will only shock once every shock_loop_time
requested_overlays
this is casted to the overlay we put on parent_chair
requested_signal_parent_emits
this signal was given as an argument to register for parent to emit, if its emitted to parent then shock_on_demand is called. var is so it can be unregistered
required_object
if usage_flags has SHOCK_REQUIREMENT_ITEM, this is the item required to be inside parent in order for it to shock buckled mobs
shock_damage
how much damage is done per shock iff usage_flags doesnt have SHOCK_REQUIREMENT_LIVE_CABLE
shock_loop_time
how long the component waits before shocking the mob buckled to parent again
shock_on_loop
if true, this will shock the buckled mob every shock_loop_time in process()
usage_flags
these flags tells this instance what is required in order to allow shocking
Proc Details
Initialize
Initialize args:
- input_requirements - bitflag that defines how the component is supposed to act, see __DEFINES/electrified_buckle.dm for the options. sets usage_flags
- input_item - if set to an item and input_requirements has SHOCK_REQUIREMENT_ITEM, moves that item inside parent and the component will delete itself if input_item no longer exists/moves out of parent. sets required_object
- overlays_to_add - pass in a list of images and the component will add them to parent as well as remove them in UnregisterFromParent(). sets requested_overlays
- override_buckle - if TRUE, sets parent.can_buckle = TRUE and resets it on UnregisterFromParent(), usually objects that have need to be overridden will look janky on buckle
- damage_on_shock - if SHOCK_REQUIREMENT_LIVE_CABLE is not set in input_requirements, then this is how much damage each shock does. sets shock_damage
- signal_to_register_from_parent - if set, the component registers to listen for this signal targeting parent to manually shock. sets requested_signal_parent_emits
process
where the guinea pig is actually shocked if possible
shock_on_demand
a shock that is toggled manually