Merge pull request #5987 from Citadel-Station-13/upstream-merge-36437

[MIRROR] Tesla coils and grounding rods actually shock buckled mobs.
This commit is contained in:
deathride58
2018-03-17 23:54:50 +00:00
committed by GitHub
2 changed files with 13 additions and 1 deletions
+8
View File
@@ -227,6 +227,14 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
tesla_zap(src, 3, power_bounced)
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
//The surgeon general warns that being buckled to certain objects recieving powerful shocks is greatly hazardous to your health
//Only tesla coils and grounding rods currently call this because mobs are already targeted over all other objects, but this might be useful for more things later.
/obj/proc/tesla_buckle_check(var/strength)
if(has_buckled_mobs())
for(var/m in buckled_mobs)
var/mob/living/buckled_mob = m
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, tesla_shock = 1)
/obj/proc/reset_shocked()
obj_flags &= ~BEING_SHOCKED