/tg/ Station 13 - Modules - TypesVar Details - Proc Details

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_channelwhat area power channel do we check if area power is required?
electric_buckle_cooldownit will only shock once every shock_loop_time
print_messagedo we output a message every time someone gets shocked?
requested_overlaysthis is casted to the overlay we put on parent_chair
requested_signal_parent_emitsthis 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_objectif usage_flags has SHOCK_REQUIREMENT_ITEM, this is the item required to be inside parent in order for it to shock buckled mobs
shock_damagehow much damage is done per shock iff usage_flags doesnt have SHOCK_REQUIREMENT_LIVE_CABLE
shock_flagsdetails of how we electrocute people
shock_immediatelyif true we zap the buckled mob as soon as it becomes buckled
shock_loop_timehow long the component waits before shocking the mob buckled to parent again
shock_on_loopif true, this will shock the buckled mob every shock_loop_time in process()
usage_flagsthese flags tells this instance what is required in order to allow shocking

Procs

InitializeInitialize args:
do_electrocutionZap whoever is buckled to us
processwhere 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:

do_electrocution

Zap whoever is buckled to us

process

where the guinea pig is actually shocked if possible