Ports "Switches out the three billion args of electrocute act for flags"
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user