diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm
index 5b8671338fc..85dddcf174e 100644
--- a/code/__DEFINES/components.dm
+++ b/code/__DEFINES/components.dm
@@ -205,7 +205,7 @@
#define COMSIG_LIVING_RESIST "living_resist" //from base of mob/living/resist() (/mob/living)
#define COMSIG_LIVING_IGNITED "living_ignite" //from base of mob/living/IgniteMob() (/mob/living)
#define COMSIG_LIVING_EXTINGUISHED "living_extinguished" //from base of mob/living/ExtinguishMob() (/mob/living)
-#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage, source, siemens_coeff, safety, override, tesla_shock, illusion, stun)
+#define COMSIG_LIVING_ELECTROCUTE_ACT "living_electrocute_act" //from base of mob/living/electrocute_act(): (shock_damage, source, siemens_coeff, flags)
#define COMSIG_LIVING_MINOR_SHOCK "living_minor_shock" //sent by stuff like stunbatons and tasers: ()
#define COMSIG_LIVING_REVIVE "living_revive" //from base of mob/living/revive() (full_heal, admin_revive)
#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge" //sent from borg recharge stations: (amount, repairs)
diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm
index c76e170ee4b..e2e342dd03a 100644
--- a/code/__DEFINES/mobs.dm
+++ b/code/__DEFINES/mobs.dm
@@ -219,6 +219,16 @@
#define MAX_CHICKENS 50
+///Flags used by the flags parameter of electrocute act.
+
+///Makes it so that the shock doesn't take gloves into account.
+#define SHOCK_NOGLOVES (1 << 0)
+///Used when the shock is from a tesla bolt.
+#define SHOCK_TESLA (1 << 1)
+///Used when an illusion shocks something. Makes the shock deal stamina damage and not trigger certain secondary effects.
+#define SHOCK_ILLUSION (1 << 2)
+///The shock doesn't stun.
+#define SHOCK_NOSTUN (1 << 3)
#define INCORPOREAL_MOVE_BASIC 1
#define INCORPOREAL_MOVE_SHADOW 2 // leaves a trail of shadows
diff --git a/code/datums/mutations/touch.dm b/code/datums/mutations/touch.dm
index ea4c413cfc1..e4efdd40796 100644
--- a/code/datums/mutations/touch.dm
+++ b/code/datums/mutations/touch.dm
@@ -33,7 +33,7 @@
return
if(iscarbon(target))
var/mob/living/carbon/C = target
- if(C.electrocute_act(15, user, 1, FALSE, FALSE, FALSE, FALSE, FALSE))//doesnt stun. never let this stun
+ if(C.electrocute_act(15, user, 1, SHOCK_NOSTUN))//doesnt stun. never let this stun
C.dropItemToGround(C.get_active_held_item())
C.dropItemToGround(C.get_inactive_held_item())
C.confused += 15
@@ -44,7 +44,7 @@
return ..()
else if(isliving(target))
var/mob/living/L = target
- L.electrocute_act(15, user, 1, FALSE, FALSE, FALSE, FALSE)
+ L.electrocute_act(15, user, 1, SHOCK_NOSTUN)
L.visible_message("[user] electrocutes [target]!","[user] electrocutes you!")
return ..()
else
diff --git a/code/game/objects/effects/anomalies.dm b/code/game/objects/effects/anomalies.dm
index edba7fbd1cb..f7a48d9409a 100644
--- a/code/game/objects/effects/anomalies.dm
+++ b/code/game/objects/effects/anomalies.dm
@@ -139,13 +139,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)
@@ -160,18 +160,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("[M] was shocked by \the [name]!", \
- "You feel a powerful shock coursing through your body!", \
- "You hear a heavy electrical crack.")
+ canshock = FALSE
+ M.electrocute_act(shockdamage, name, flags = SHOCK_NOGLOVES)
/obj/effect/anomaly/flux/detonate()
if(explosive)
diff --git a/code/game/objects/items/robot/robot_items.dm b/code/game/objects/items/robot/robot_items.dm
index 67b7adf9a8d..fa9c4b49546 100644
--- a/code/game/objects/items/robot/robot_items.dm
+++ b/code/game/objects/items/robot/robot_items.dm
@@ -111,7 +111,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("[user] electrocutes [M] with [user.p_their()] touch!", \
"You electrocute [M] with your touch!")
M.update_mobility()
diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm
index 9db201b07fa..2dcca10d7d2 100644
--- a/code/game/objects/obj_defense.dm
+++ b/code/game/objects/obj_defense.dm
@@ -240,7 +240,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
diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm
index dcc440de297..2581aad4f09 100644
--- a/code/game/objects/structures/holosign.dm
+++ b/code/game/objects/structures/holosign.dm
@@ -168,7 +168,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)
@@ -180,6 +180,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)
diff --git a/code/game/objects/structures/traps.dm b/code/game/objects/structures/traps.dm
index 83b6f71bc5c..ffa5a02bd91 100644
--- a/code/game/objects/structures/traps.dm
+++ b/code/game/objects/structures/traps.dm
@@ -89,7 +89,7 @@
var/stun_time = 100
/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.Paralyze(stun_time)
/obj/structure/trap/stun/hunter
diff --git a/code/modules/antagonists/clockcult/clock_mobs.dm b/code/modules/antagonists/clockcult/clock_mobs.dm
index bd7064588fa..75c523ef5ec 100644
--- a/code/modules/antagonists/clockcult/clock_mobs.dm
+++ b/code/modules/antagonists/clockcult/clock_mobs.dm
@@ -37,7 +37,7 @@
/mob/living/simple_animal/hostile/clockwork/ratvar_act()
fully_heal(TRUE)
-/mob/living/simple_animal/hostile/clockwork/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
+/mob/living/simple_animal/hostile/clockwork/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
return 0 //ouch, my metal-unlikely-to-be-damaged-by-electricity-body
/mob/living/simple_animal/hostile/clockwork/examine(mob/user)
diff --git a/code/modules/antagonists/revenant/revenant_abilities.dm b/code/modules/antagonists/revenant/revenant_abilities.dm
index 995ab043c49..d7cf5b87ff9 100644
--- a/code/modules/antagonists/revenant/revenant_abilities.dm
+++ b/code/modules/antagonists/revenant/revenant_abilities.dm
@@ -216,7 +216,7 @@
continue
L.Beam(M,icon_state="purple_lightning",time=5)
if(!M.anti_magic_check(FALSE, TRUE))
- M.electrocute_act(shock_damage, L, safety=TRUE)
+ M.electrocute_act(shock_damage, L, flags = SHOCK_NOGLOVES)
do_sparks(4, FALSE, M)
playsound(M, 'sound/machines/defib_zap.ogg', 50, TRUE, -1)
diff --git a/code/modules/antagonists/swarmer/swarmer.dm b/code/modules/antagonists/swarmer/swarmer.dm
index 0834cafb09b..545320fa9ed 100644
--- a/code/modules/antagonists/swarmer/swarmer.dm
+++ b/code/modules/antagonists/swarmer/swarmer.dm
@@ -501,8 +501,8 @@
playsound(src,'sound/effects/sparks4.ogg',50,TRUE)
do_teleport(target, F, 0, channel = TELEPORT_CHANNEL_BLUESPACE)
-/mob/living/simple_animal/hostile/swarmer/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
- if(!tesla_shock)
+/mob/living/simple_animal/hostile/swarmer/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
+ if(!(flags & SHOCK_TESLA))
return FALSE
return ..()
@@ -593,7 +593,7 @@
var/mob/living/L = AM
if(!istype(L, /mob/living/simple_animal/hostile/swarmer))
playsound(loc,'sound/effects/snap.ogg',50, TRUE, -1)
- L.electrocute_act(0, src, 1, 1, 1)
+ L.electrocute_act(0, src, 1, flags = SHOCK_NOGLOVES|SHOCK_ILLUSION)
if(iscyborg(L))
L.Paralyze(100)
qdel(src)
diff --git a/code/modules/clothing/spacesuits/chronosuit.dm b/code/modules/clothing/spacesuits/chronosuit.dm
index 86d22f473b2..2d54b849c0b 100644
--- a/code/modules/clothing/spacesuits/chronosuit.dm
+++ b/code/modules/clothing/spacesuits/chronosuit.dm
@@ -222,7 +222,7 @@
teleport_now.Remove(user)
if(user.wear_suit == src)
if(hard_landing)
- user.electrocute_act(35, src, safety = 1)
+ user.electrocute_act(35, src, flags = SHOCK_NOGLOVES)
user.Paralyze(200)
if(!silent)
to_chat(user, "\nroot@ChronosuitMK4# chronowalk4 --stop\n")
diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm
index 9793e798d0d..44c39095d2b 100644
--- a/code/modules/hydroponics/plant_genes.dm
+++ b/code/modules/hydroponics/plant_genes.dm
@@ -250,14 +250,14 @@
/datum/plant_gene/trait/cell_charge/on_slip(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/C)
var/power = G.seed.potency*rate
if(prob(power))
- C.electrocute_act(round(power), G, 1, 1)
+ C.electrocute_act(round(power), G, 1, SHOCK_NOGLOVES)
/datum/plant_gene/trait/cell_charge/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target)
if(iscarbon(target))
var/mob/living/carbon/C = target
var/power = G.seed.potency*rate
if(prob(power))
- C.electrocute_act(round(power), G, 1, 1)
+ C.electrocute_act(round(power), G, 1, SHOCK_NOGLOVES)
/datum/plant_gene/trait/cell_charge/on_consume(obj/item/reagent_containers/food/snacks/grown/G, mob/living/carbon/target)
if(!G.reagents.total_volume)
diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm
index cd7cacbe384..4a79bb52d76 100644
--- a/code/modules/mob/living/carbon/carbon_defense.dm
+++ b/code/modules/mob/living/carbon/carbon_defense.dm
@@ -216,19 +216,19 @@
O.emp_act(severity)
///Adds to the parent by also adding functionality to propagate shocks through pulling and doing some fluff effects.
-/mob/living/carbon/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
+/mob/living/carbon/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
. = ..()
if(!.)
return
//Pulling
- if(iscarbon(pulling) && !illusion && source != pulling)
+ if(iscarbon(pulling) && !(flags & SHOCK_ILLUSION) && source != pulling)
var/mob/living/carbon/C = pulling
- C.electrocute_act(shock_damage*0.75, src, 1, 0, override, 0, illusion, stun)
- if(iscarbon(pulledby) && !illusion && source != pulledby)
+ C.electrocute_act(shock_damage*0.75, src, flags)
+ if(iscarbon(pulledby) && !(flags & SHOCK_ILLUSION) && source != pulledby)
var/mob/living/carbon/C = pulledby
- C.electrocute_act(shock_damage*0.75, src, 1, 0, override, 0, illusion, stun)
+ C.electrocute_act(shock_damage*0.75, src, flags)
//Stun
- var/should_stun = (!tesla_shock || siemens_coeff > 0.5) && stun
+ var/should_stun = (!(flags & SHOCK_TESLA) || siemens_coeff > 0.5) && !(flags & SHOCK_NOSTUN)
if(should_stun)
Paralyze(40)
//Jitter and other fluff.
@@ -236,10 +236,7 @@
do_jitter_animation(jitteriness)
stuttering += 2
addtimer(CALLBACK(src, .proc/secondary_shock, should_stun), 20)
- if(override)
- return override
- else
- return shock_damage
+ return shock_damage
///Called slightly after electrocute act to reduce jittering and apply a secondary stun.
/mob/living/carbon/proc/secondary_shock(should_stun)
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 9390b6b8f53..752d4640b68 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -453,9 +453,9 @@
///Calculates the siemens coeff based on clothing and species, can also restart hearts.
-/mob/living/carbon/human/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = FALSE, override = 0, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
+/mob/living/carbon/human/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
//Calculates the siemens coeff based on clothing. Completely ignores the arguments
- if(tesla_shock) //I hate this entire block. This gets the siemens_coeff for tesla shocks
+ if(flags & SHOCK_TESLA) //I hate this entire block. This gets the siemens_coeff for tesla shocks
if(gloves && gloves.siemens_coefficient <= 0)
siemens_coeff -= 0.5
if(wear_suit)
@@ -464,7 +464,7 @@
else if(wear_suit.siemens_coefficient <= 0)
siemens_coeff -= 0.95
siemens_coeff = max(siemens_coeff, 0)
- else if(!safety) //This gets the siemens_coeff for all non tesla shocks
+ else if(!(flags & SHOCK_NOGLOVES)) //This gets the siemens_coeff for all non tesla shocks
if(gloves)
siemens_coeff *= gloves.siemens_coefficient
siemens_coeff *= physiology.siemens_coeff
@@ -475,7 +475,7 @@
return
//Note we both check that the user is in cardiac arrest and can actually heartattack
//If they can't, they're missing their heart and this would runtime
- if(undergoing_cardiac_arrest() && can_heartattack() && !illusion)
+ if(undergoing_cardiac_arrest() && can_heartattack() && !(flags & SHOCK_ILLUSION))
if(shock_damage * siemens_coeff >= 1 && prob(25))
var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART)
if(heart.Restart() && stat == CONSCIOUS)
diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm
index 3f1b5e4165d..1d2c2107f9a 100644
--- a/code/modules/mob/living/living_defense.dm
+++ b/code/modules/mob/living/living_defense.dm
@@ -347,16 +347,16 @@
return 1
///As the name suggests, this should be called to apply electric shocks.
-/mob/living/proc/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)
- SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage, source, siemens_coeff, safety, override, tesla_shock, illusion, stun)
+/mob/living/proc/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
+ SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage, source, siemens_coeff, flags)
shock_damage *= siemens_coeff
- if(tesla_shock && (flags_1 & TESLA_IGNORE_1))
+ if((flags & SHOCK_TESLA) && (flags_1 & TESLA_IGNORE_1))
return FALSE
if(HAS_TRAIT(src, TRAIT_SHOCKIMMUNE))
return FALSE
- if(shock_damage < 1 && !override)
+ if(shock_damage < 1)
return FALSE
- if(!illusion)
+ if(!(flags & SHOCK_ILLUSION))
adjustFireLoss(shock_damage)
else
adjustStaminaLoss(shock_damage)
diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm
index 372fe176fb1..00bd3ed2a64 100644
--- a/code/modules/mob/living/silicon/silicon_defense.dm
+++ b/code/modules/mob/living/silicon/silicon_defense.dm
@@ -92,11 +92,11 @@
return
return ..()
-/mob/living/silicon/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
+/mob/living/silicon/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
if(buckled_mobs)
for(var/mob/living/M in buckled_mobs)
unbuckle_mob(M)
- M.electrocute_act(shock_damage/100, source, siemens_coeff, safety, tesla_shock, illusion, stun) //Hard metal shell conducts!
+ M.electrocute_act(shock_damage/100, source, siemens_coeff, flags) //Hard metal shell conducts!
return 0 //So borgs they don't die trying to fix wiring
/mob/living/silicon/emp_act(severity)
diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm
index 23d769b6058..29482e7939b 100644
--- a/code/modules/mob/living/simple_animal/bot/secbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/secbot.dm
@@ -107,7 +107,7 @@
walk_to(src,0)
last_found = world.time
-/mob/living/simple_animal/bot/secbot/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE)//shocks only make him angry
+/mob/living/simple_animal/bot/secbot/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)//shocks only make him angry
if(base_speed < initial(base_speed) + 3)
base_speed += 3
addtimer(VARSET_CALLBACK(src, base_speed, base_speed - 3), 60)
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index 17c8a197b17..99b50eeee4d 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -105,7 +105,7 @@
/mob/living/simple_animal/hostile/construct/narsie_act()
return
-/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
+/mob/living/simple_animal/hostile/construct/electrocute_act(shock_damage, source, siemens_coeff = 1, flags = NONE)
return 0
/mob/living/simple_animal/hostile/construct/adjustHealth(amount, updating_health = TRUE, forced = FALSE)
diff --git a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
index eb9509a1574..a9d0db7aafb 100644
--- a/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
+++ b/code/modules/mob/living/simple_animal/friendly/drone/_drone.dm
@@ -277,5 +277,5 @@
// Why would bees pay attention to drones?
return 1
-/mob/living/simple_animal/drone/electrocute_act(shock_damage, source, siemens_coeff = 1, safety = 0, tesla_shock = 0, illusion = 0, stun = TRUE)
+/mob/living/simple_animal/drone/electrocute_act(shock_damage, source, siemens_coeff, flags = NONE)
return 0 //So they don't die trying to fix wiring
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm
index e2d60609c26..443899759bf 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/swarmer.dm
@@ -269,7 +269,7 @@ GLOBAL_LIST_INIT(AISwarmerCapsByType, list(/mob/living/simple_animal/hostile/swa
else
var/mob/living/L = target
L.attack_animal(src)
- L.electrocute_act(10, src, safety = TRUE) //safety = TRUE means we don't check gloves... Ok?
+ L.electrocute_act(10, src, flags = SHOCK_NOGLOVES)
return TRUE
else
return ..()
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 952995cf089..34592cca4bd 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -833,7 +833,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
. = zapdir
if(target_mob)
- target_mob.electrocute_act(rand(5,10), "Supermatter Discharge Bolt", 1, stun = 0)
+ target_mob.electrocute_act(rand(5,10), "Supermatter Discharge Bolt", 1, SHOCK_NOSTUN)
if(prob(15))
supermatter_zap(target_mob, 5, power / 2)
supermatter_zap(target_mob, 5, power / 2)
diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm
index d961f3dfd50..892d969dc20 100644
--- a/code/modules/power/tesla/energy_ball.dm
+++ b/code/modules/power/tesla/energy_ball.dm
@@ -294,7 +294,7 @@
else if(closest_mob)
var/shock_damage = (tesla_flags & TESLA_MOB_DAMAGE)? (min(round(power/600), 90) + rand(-5, 5)) : 0
- closest_mob.electrocute_act(shock_damage, source, 1, tesla_shock = 1, stun = (tesla_flags & TESLA_MOB_STUN))
+ closest_mob.electrocute_act(shock_damage, source, 1, SHOCK_TESLA | ((tesla_flags & TESLA_MOB_STUN) ? NONE : SHOCK_NOSTUN))
if(issilicon(closest_mob))
var/mob/living/silicon/S = closest_mob
if((tesla_flags & TESLA_MOB_STUN) && (tesla_flags & TESLA_MOB_DAMAGE))
diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
index fb19138b99c..bcc08435035 100644
--- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
@@ -217,7 +217,7 @@
shock_timer++
if(shock_timer >= rand(5,30)) //Random shocks are wildly unpredictable
shock_timer = 0
- M.electrocute_act(rand(5,20), "Teslium in their body", 1, 1) //Override because it's caused from INSIDE of you
+ M.electrocute_act(rand(5,20), "Teslium in their body", 1, SHOCK_NOGLOVES) //SHOCK_NOGLOVES because it's caused from INSIDE of you
playsound(M, "sparks", 50, TRUE)
..()
diff --git a/code/modules/research/nanites/nanite_programs/suppression.dm b/code/modules/research/nanites/nanite_programs/suppression.dm
index 659d168802c..8a1bcfb38aa 100644
--- a/code/modules/research/nanites/nanite_programs/suppression.dm
+++ b/code/modules/research/nanites/nanite_programs/suppression.dm
@@ -42,7 +42,7 @@
/datum/nanite_program/triggered/shocking/trigger()
if(!..())
return
- host_mob.electrocute_act(rand(5,10), "shock nanites", TRUE, TRUE)
+ host_mob.electrocute_act(rand(5,10), "shock nanites", 1, SHOCK_NOGLOVES)
/datum/nanite_program/triggered/stun
name = "Neural Shock"
diff --git a/code/modules/spells/spell_types/lightning.dm b/code/modules/spells/spell_types/lightning.dm
index 574f2bb3ad2..2c5a79fefed 100644
--- a/code/modules/spells/spell_types/lightning.dm
+++ b/code/modules/spells/spell_types/lightning.dm
@@ -69,10 +69,10 @@
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, TRUE, -1)
current.visible_message("[current] absorbs the spell, remaining unharmed!", "You absorb the spell, remaining unharmed!")
else if(bounces < 1)
- current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
+ current.electrocute_act(bolt_energy,"Lightning Bolt",flags = SHOCK_NOGLOVES)
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, TRUE, -1)
else
- current.electrocute_act(bolt_energy,"Lightning Bolt",safety=1)
+ current.electrocute_act(bolt_energy,"Lightning Bolt",flags = SHOCK_NOGLOVES)
playsound(get_turf(current), 'sound/magic/lightningshock.ogg', 50, TRUE, -1)
var/list/possible_targets = new
for(var/mob/living/M in view_or_range(range,target,"view"))
diff --git a/code/modules/spells/spell_types/wizard.dm b/code/modules/spells/spell_types/wizard.dm
index a2aca4dd665..a245fac4af0 100644
--- a/code/modules/spells/spell_types/wizard.dm
+++ b/code/modules/spells/spell_types/wizard.dm
@@ -386,7 +386,7 @@
if(isliving(hit_atom))
var/mob/living/M = hit_atom
if(!M.anti_magic_check())
- M.electrocute_act(80, src, illusion = 1)
+ M.electrocute_act(80, src, flags = SHOCK_ILLUSION)
qdel(src)
/obj/item/spellpacket/lightningbolt/throw_at(atom/target, range, speed, mob/thrower, spin=TRUE, diagonals_first = FALSE, datum/callback/callback, force = INFINITY)
diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm
index 10aca4c5841..523c89f9feb 100755
--- a/code/modules/surgery/organs/stomach.dm
+++ b/code/modules/surgery/organs/stomach.dm
@@ -117,8 +117,8 @@
/obj/item/organ/stomach/ethereal/proc/charge(datum/source, amount, repairs)
adjust_charge(amount / 70)
-/obj/item/organ/stomach/ethereal/proc/on_electrocute(datum/source, shock_damage, siemens_coeff = 1, illusion = FALSE)
- if(illusion)
+/obj/item/organ/stomach/ethereal/proc/on_electrocute(datum/source, shock_damage, siemens_coeff = 1, flags = NONE)
+ if(flags & SHOCK_ILLUSION)
return
adjust_charge(shock_damage * siemens_coeff * 2)
to_chat(owner, "You absorb some of the shock into your body!")