mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user