From a938c7b64846f40c5c0e6e381424d6fcd1fefbbf Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sun, 13 Sep 2015 11:21:44 +0200 Subject: [PATCH] Prevents observer mice from spawning on the admin Z-level. --- code/modules/mob/dead/observer/observer.dm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 2b4a290e2bf..e58df4f1f93 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -422,6 +422,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!MayRespawn(1)) return + var/turf/T = get_turf(src) + if(!T || (T.z in config.admin_levels)) + src << "You may not spawn as a mouse on this Z-level." + return + var/timedifference = world.time - client.time_died_as_mouse if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600) var/timedifference_text @@ -437,8 +442,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/mob/living/simple_animal/mouse/host var/obj/machinery/atmospherics/unary/vent_pump/vent_found var/list/found_vents = list() - for(var/obj/machinery/atmospherics/unary/vent_pump/v in world) - if(!v.welded && v.z == src.z) + for(var/obj/machinery/atmospherics/unary/vent_pump/v in machines) + if(!v.welded && v.z == T.z) found_vents.Add(v) if(found_vents.len) vent_found = pick(found_vents)