From 582f3c4edc3d54ab1d30224f35f21e94466f1a2e Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Wed, 14 May 2014 02:56:10 -0400 Subject: [PATCH] Fix being unable to respawn as mouse --- code/modules/mob/mob.dm | 49 +++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 70c2a7b05fe..c651656e001 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1168,31 +1168,28 @@ mob/proc/yank_out_object() /mob/proc/become_mouse() - if(usr in respawnable_list) - var/timedifference = world.time - client.time_died_as_mouse - if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600) - var/timedifference_text - timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss") - src << "You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left." - return - - //find a viable mouse candidate - 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) - found_vents.Add(v) - if(found_vents.len) - vent_found = pick(found_vents) - host = new /mob/living/simple_animal/mouse(vent_found.loc) - else - src << "Unable to find any unwelded vents to spawn mice at." - - if(host) - host.ckey = src.ckey - host << "You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent." - else - usr << "You are not dead or you have given up your right to be respawned!" + var/timedifference = world.time - client.time_died_as_mouse + if(client.time_died_as_mouse && timedifference <= mouse_respawn_time * 600) + var/timedifference_text + timedifference_text = time2text(mouse_respawn_time * 600 - timedifference,"mm:ss") + src << "You may only spawn again as a mouse more than [mouse_respawn_time] minutes after your death. You have [timedifference_text] left." return + //find a viable mouse candidate + 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) + found_vents.Add(v) + if(found_vents.len) + vent_found = pick(found_vents) + host = new /mob/living/simple_animal/mouse(vent_found.loc) + else + src << "Unable to find any unwelded vents to spawn mice at." + + if(host) + host.ckey = src.ckey + host << "You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent." + +