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 | |
area_power_channel | what area power channel do we check if area power is required? |
---|---|
electric_buckle_cooldown | it will only shock once every shock_loop_time |
print_message | do we output a message every time someone gets shocked? |
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_flags | details of how we electrocute people |
shock_immediately | if true we zap the buckled mob as soon as it becomes buckled |
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: |
do_electrocution | Zap whoever is buckled to us |
process | where the guinea pig is actually shocked if possible |
Var Details
area_power_channel 
what area power channel do we check if area power is required?
electric_buckle_cooldown 
it will only shock once every shock_loop_time
print_message 
do we output a message every time someone gets shocked?
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_flags 
details of how we electrocute people
shock_immediately 
if true we zap the buckled mob as soon as it becomes buckled
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
- shock_immediately - if TRUE we will shock the buckled mob the first time we process after buckling, otherwise we wait until the cooldown has passed
- print_message - if TRUE we will show a message every time we electrocute someone during the shock loop
- 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
- area_power_channel - if SHOCK_REQUIREMENT_AREA_POWER is set in input_requirements, it will check this power channel in the area
- shock_flags - flags passed into electrocute_act when we zap someone
do_electrocution
Zap whoever is buckled to us
process
where the guinea pig is actually shocked if possible