diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 191d5e81079..f69094715b0 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -289,8 +289,8 @@ About the new airlock wires panel: // shock user with probability prb (if all connections & power are working) // returns 1 if shocked, 0 otherwise // The preceding comment was borrowed from the grille's shock script -/obj/machinery/door/airlock/shock(mob/user, prb) - if(!arePowerSystemsOn()) +/obj/machinery/door/airlock/shock(mob/living/user, prb) + if(!istype(user) || !arePowerSystemsOn()) return FALSE if(shockCooldown > world.time) return FALSE //Already shocked someone recently? diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index fdb928566af..0a55acfcb81 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -558,13 +558,12 @@ Class Procs: return threatcount -/obj/machinery/proc/shock(mob/user, prb) - if(inoperable()) +/obj/machinery/proc/shock(mob/living/user, prb) + if(!istype(user) || inoperable()) return FALSE if(!prob(prb)) return FALSE - if(!isobserver(user))//if they are a ghost do not shock. Why do need cheesie honkers? You ded. - do_sparks(5, 1, src) + do_sparks(5, 1, src) if(electrocute_mob(user, get_area(src), src, siemens_strength, TRUE)) return TRUE return FALSE