Ports "Switches out the three billion args of electrocute act for flags"

This commit is contained in:
Ghommie
2020-03-09 04:01:23 +01:00
parent 0d66a40e55
commit ee1eea8874
27 changed files with 63 additions and 65 deletions
+4 -14
View File
@@ -138,13 +138,13 @@
name = "flux wave anomaly"
icon_state = "electricity2"
density = TRUE
var/canshock = 0
var/canshock = FALSE
var/shockdamage = 20
var/explosive = TRUE
/obj/effect/anomaly/flux/anomalyEffect()
..()
canshock = 1
canshock = TRUE
for(var/mob/living/M in range(0, src))
mobShock(M)
@@ -159,18 +159,8 @@
/obj/effect/anomaly/flux/proc/mobShock(mob/living/M)
if(canshock && istype(M))
canshock = 0 //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
if(iscarbon(M))
if(ishuman(M))
M.electrocute_act(shockdamage, "[name]", safety=1)
return
M.electrocute_act(shockdamage, "[name]")
return
else
M.adjustFireLoss(shockdamage)
M.visible_message("<span class='danger'>[M] was shocked by \the [name]!</span>", \
"<span class='userdanger'>You feel a powerful shock coursing through your body!</span>", \
"<span class='italics'>You hear a heavy electrical crack.</span>")
canshock = FALSE //Just so you don't instakill yourself if you slam into the anomaly five times in a second.
M.electrocute_act(shockdamage, "[name]", flags = SHOCK_NOGLOVES)
/obj/effect/anomaly/flux/detonate()
if(explosive)