Minor shock() refactor (#95204)

## About The Pull Request

`shock` was copy pasted across a bunch of base types
I needed the behavior unified and it was fairly trivial to do 
So now we have `/obj/proc/shock` which all the old implementations call 

## Changelog

🆑 Melbert
refactor: Made some minor changes to how things like airlocks, vendors,
and autolathes shock you. Report any wierdness with that
/🆑
This commit is contained in:
MrMelbert
2026-02-24 21:12:59 -05:00
committed by GitHub
parent f34bfa1206
commit 4fe16acd0b
22 changed files with 108 additions and 170 deletions
@@ -47,11 +47,11 @@
if(get_dist(src, user) > 1)
return FALSE
else
shock(user)
yeet_shock(user)
return TRUE
/obj/machinery/field/containment/attackby(obj/item/W, mob/user, list/modifiers, list/attack_modifiers)
shock(user)
yeet_shock(user)
return TRUE
/obj/machinery/field/containment/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
@@ -83,7 +83,7 @@
if(isliving(considered_atom))
var/mob/living/living_moving_through_field = considered_atom
if(!living_moving_through_field.incorporeal_move)
shock(considered_atom)
yeet_shock(considered_atom)
if(ismachinery(considered_atom) || isstructure(considered_atom) || ismecha(considered_atom))
bump_field(considered_atom)
@@ -100,7 +100,7 @@
return SINGULARITY_TRY_MOVE_BLOCK
/obj/machinery/field/containment/shock(mob/living/user)
/obj/machinery/field/containment/yeet_shock(mob/living/user)
if(!field_gen_1 || !field_gen_2)
qdel(src)
return FALSE
@@ -122,7 +122,7 @@
if(has_shocked)
return
if(isliving(mover))
shock(mover)
yeet_shock(mover)
return
if(ismachinery(mover) || isstructure(mover) || isvehicle(mover))
bump_field(mover)
@@ -134,7 +134,7 @@
if(has_shocked || isliving(mover) || ismachinery(mover) || isstructure(mover) || ismecha(mover))
return FALSE
/obj/machinery/field/proc/shock(mob/living/user)
/obj/machinery/field/proc/yeet_shock(mob/living/user)
var/shock_damage = min(rand(30,40),rand(30,40))
if(iscarbon(user))