diff --git a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm index 569788d708c..cdb55aa1b31 100644 --- a/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm +++ b/code/game/gamemodes/miniantags/revenant/revenant_abilities.dm @@ -215,7 +215,7 @@ if(!L.on) //wait, wait, don't shock me return flick("[L.base_state]2", L) - for(var/mob/living/carbon/human/M in view(shock_range, L)) + for(var/mob/living/M in view(shock_range, L)) if(M == user) return M.Beam(L,icon_state="purple_lightning",icon='icons/effects/effects.dmi',time=5) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 51d7c4d5ddc..9dca7566a31 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -174,10 +174,8 @@ About the new airlock wires panel: else /*if(justzap)*/ return else if(user.hallucination > 50 && prob(10) && !operating) - to_chat(user, "You feel a powerful shock course through your body!") - user.adjustStaminaLoss(50) - user.AdjustStunned(5) - return + if(user.electrocute_act(50, src, 1, illusion = TRUE)) // We'll just go with a flat 50 damage, instead of doing powernet checks + return ..(user) /obj/machinery/door/airlock/bumpopen(mob/living/simple_animal/user) diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index 68190b83ddd..67ee4b6ac00 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -116,7 +116,7 @@ if(.) return if(!shockcd) - if(ismob(user)) + if(isliving(user)) var/mob/living/M = user M.electrocute_act(15, "Energy Barrier", safety = TRUE) shockcd = TRUE diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 30e24f145b1..ef450f4a52f 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -237,7 +237,7 @@ C.electrocute_act(round(power), G, 1, TRUE) /datum/plant_gene/trait/cell_charge/on_squash(obj/item/reagent_containers/food/snacks/grown/G, atom/target) - if(iscarbon(target)) + if(isliving(target)) var/mob/living/carbon/C = target var/power = G.seed.potency*rate if(prob(power)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 1139912b1f8..277bbbd8789 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -135,6 +135,7 @@ visible_message("[M] bursts out of [src]!") /mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE) + SEND_SIGNAL(src, COMSIG_LIVING_ELECTROCUTE_ACT, shock_damage) if(status_flags & GODMODE) //godmode return FALSE if(NO_SHOCK in mutations) //shockproof diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index e25000b03fd..e8aab46dbbe 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -1239,7 +1239,7 @@ var/list/shock_mobs = list() for(var/C in view(get_turf(src), 5)) //We only want to shock a single random mob in range, not every one. if(isliving(C)) - shock_mobs +=C + shock_mobs += C if(shock_mobs.len) var/mob/living/L = pick(shock_mobs) L.electrocute_act(rand(5, 25), "electrical arc") diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm index a0e84f8455a..6c8eba8fb62 100644 --- a/code/modules/power/singularity/containment_field.dm +++ b/code/modules/power/singularity/containment_field.dm @@ -78,7 +78,7 @@ if(isliving(user)) var/shock_damage = min(rand(30,40),rand(30,40)) - if(iscarbon(user)) + if(isliving(user) && !issilicon(user)) var/stun = min(shock_damage, 15) user.Stun(stun) user.Weaken(10) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index 084901a71f6..19948c94a36 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -169,7 +169,6 @@ var/static/blacklisted_tesla_types = typecacheof(list(/obj/machinery/atmospherics, /obj/machinery/power/emitter, /obj/machinery/field/generator, - /mob/living/simple_animal, /obj/machinery/particle_accelerator/control_box, /obj/structure/particle_accelerator/fuel_chamber, /obj/structure/particle_accelerator/particle_emitter/center, diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index a21a7fcf1c2..f2740676314 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -376,9 +376,9 @@ /datum/chemical_reaction/shock_explosion/on_reaction(datum/reagents/holder, created_volume) var/turf/T = get_turf(holder.my_atom) - for(var/mob/living/carbon/C in view(min(8, round(created_volume * 2)), T)) - C.Beam(T,icon_state="lightning[rand(1,12)]",icon='icons/effects/effects.dmi',time=5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results. - C.electrocute_act(3.5, "electrical blast") + for(var/mob/living/L in view(min(8, round(created_volume * 2)), T)) + L.Beam(T, icon_state = "lightning[rand(1, 12)]", icon = 'icons/effects/effects.dmi', time = 5) //What? Why are we beaming from the mob to the turf? Turf to mob generates really odd results. + L.electrocute_act(3.5, "electrical blast") holder.del_reagent("teslium") //Clear all remaining Teslium and Uranium, but leave all other reagents untouched. holder.del_reagent("uranium")