From 5f0e8705daff670b907d31c2f4f99e7b1e796e6d Mon Sep 17 00:00:00 2001 From: VerySoft Date: Fri, 25 Mar 2022 16:13:46 -0400 Subject: [PATCH] Find Auto Resleever Adds a ghost verb 'Find Auto Resleever' This picks a random auto resleever somewhere in the world and teleports the ghost to it. --- code/modules/mob/dead/observer/observer_vr.dm | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/dead/observer/observer_vr.dm b/code/modules/mob/dead/observer/observer_vr.dm index c6ea1050d9..56daefb1d2 100644 --- a/code/modules/mob/dead/observer/observer_vr.dm +++ b/code/modules/mob/dead/observer/observer_vr.dm @@ -129,4 +129,32 @@ forceMove(T) stop_following() else - to_chat(src, "This ghost pod is not located in the game world.") \ No newline at end of file + to_chat(src, "This ghost pod is not located in the game world.") + +/mob/observer/dead/verb/findautoresleever() + set category = "Ghost" + set name = "Find Auto Resleever" + set desc = "Find a Auto Resleever" + set popup_menu = FALSE + + if(!istype(usr, /mob/observer/dead)) //Make sure they're an observer! + return + + var/list/ar = list() + for(var/obj/machinery/transhuman/autoresleever/A in world) + if(A.spawntype) + continue + else + ar |= A + + var/obj/machinery/transhuman/autoresleever/thisone = pick(ar) + + if(!thisone) + to_chat(src, "There appears to be no auto-resleevers available.") + return + var/L = get_turf(thisone) + if(!L) + to_chat(src, "There appears to be something wrong with this auto-resleever, try again.") + return + + forceMove(L)