Merge pull request #11396 from Ghommie/Ghommie-cit613

Ports "Switches out the three billion args of electrocute act for flags"
This commit is contained in:
kevinz000
2020-03-10 05:56:28 -07:00
committed by GitHub
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)
+1 -1
View File
@@ -109,7 +109,7 @@
if(scooldown < world.time)
if(M.health >= 0)
if(ishuman(M)||ismonkey(M))
M.electrocute_act(5, "[user]", safety = 1)
M.electrocute_act(5, "[user]", flags = SHOCK_NOGLOVES)
user.visible_message("<span class='userdanger'>[user] electrocutes [M] with [user.p_their()] touch!</span>", \
"<span class='danger'>You electrocute [M] with your touch!</span>")
else
+1 -1
View File
@@ -244,7 +244,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
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)
buckled_mob.electrocute_act((CLAMP(round(strength/400), 10, 90) + rand(-5, 5)), src, flags = SHOCK_TESLA)
/obj/proc/reset_shocked()
obj_flags &= ~BEING_SHOCKED
+2 -2
View File
@@ -189,7 +189,7 @@
if(!shockcd)
if(ismob(user))
var/mob/living/M = user
M.electrocute_act(15,"Energy Barrier", safety=1)
M.electrocute_act(15,"Energy Barrier", flags = SHOCK_NOGLOVES)
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
@@ -201,6 +201,6 @@
return
var/mob/living/M = AM
M.electrocute_act(15,"Energy Barrier", safety=1)
M.electrocute_act(15,"Energy Barrier", flags = SHOCK_NOGLOVES)
shockcd = TRUE
addtimer(CALLBACK(src, .proc/cooldown), 5)
+2 -2
View File
@@ -82,7 +82,7 @@
icon_state = "trap-shock"
/obj/structure/trap/stun/trap_effect(mob/living/L)
L.electrocute_act(30, src, safety=1) // electrocute act does a message.
L.electrocute_act(30, src, flags = SHOCK_NOGLOVES) // electrocute act does a message.
L.DefaultCombatKnockdown(100)
/obj/structure/trap/fire
@@ -146,7 +146,7 @@
/obj/structure/trap/cult/trap_effect(mob/living/L)
to_chat(L, "<span class='danger'><B>With a crack, the hostile constructs come out of hiding, stunning you!</B></span>")
L.electrocute_act(10, src, safety = TRUE) // electrocute act does a message.
L.electrocute_act(10, src, flags = SHOCK_NOGLOVES) // electrocute act does a message.
L.DefaultCombatKnockdown(20)
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)
new /mob/living/simple_animal/hostile/construct/proteon/hostile(loc)