From f5e93bdea263a3da7509c0314d131218e165b084 Mon Sep 17 00:00:00 2001 From: Arkatos1 Date: Sat, 27 Apr 2019 23:40:25 +0200 Subject: [PATCH] Small dead tele refactor --- code/modules/mob/dead/observer/observer.dm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index db59a79ec21..b7c301f7387 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -397,13 +397,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(usr, "Not when you're not dead!") return - usr.verbs -= /mob/dead/observer/proc/dead_tele - spawn(30) - usr.verbs += /mob/dead/observer/proc/dead_tele - var/area/A = input("Area to jump to", "BOOYEA") as null|anything in ghostteleportlocs var/area/thearea = ghostteleportlocs[A] - if(!thearea) return + + if(!thearea) + return var/list/L = list() for(var/turf/T in get_area_turfs(thearea.type)) @@ -411,6 +409,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!L || !L.len) to_chat(usr, "No area available.") + return usr.forceMove(pick(L)) following = null