Tesla coils and grounding rods actually shock buckled mobs. (#36437)

* coils and grounding rods shock buckled things

* general tesla buckle shock proc
This commit is contained in:
RandomMarine
2018-03-17 06:48:56 -07:00
committed by CitadelStationBot
parent 13709a7d34
commit c1e897b298
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