diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index d3918481b0f..3e00f46a043 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -164,7 +164,6 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list( /client/proc/map_template_upload, /client/proc/view_runtimes, /client/proc/admin_serialize, - /client/proc/jump_to_ruin, /client/proc/uid_log, /client/proc/visualise_active_turfs, /client/proc/reestablish_db_connection, diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 5a98dc53f27..e40c6931917 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -916,49 +916,6 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) GLOB.error_cache.showTo(usr) -/client/proc/jump_to_ruin() - set category = "Debug" - set name = "Jump to Ruin" - set desc = "Displays a list of all placed ruins to teleport to." - - if(!check_rights(R_DEBUG)) - return - - var/list/names = list() - for(var/i in GLOB.ruin_landmarks) - var/obj/effect/landmark/ruin/ruin_landmark = i - var/datum/map_template/ruin/template = ruin_landmark.ruin_template - - var/count = 1 - var/name = template.name - var/original_name = name - - while(name in names) - count++ - name = "[original_name] ([count])" - - names[name] = ruin_landmark - - var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in names - - var/obj/effect/landmark/ruin/landmark = names[ruinname] - - if(istype(landmark)) - var/datum/map_template/ruin/template = landmark.ruin_template - if(isobj(usr.loc)) - var/obj/O = usr.loc - O.force_eject_occupant(usr) - admin_forcemove(usr, get_turf(landmark)) - - to_chat(usr, "[template.name]") - to_chat(usr, "[template.description]") - - log_admin("[key_name(usr)] jumped to ruin [ruinname]") - if(!isobserver(usr)) - message_admins("[key_name_admin(usr)] jumped to ruin [ruinname]", 1) - - SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Ruin") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - /client/proc/visualise_active_turfs() set category = "Debug" set name = "Visualise Active Turfs" diff --git a/code/modules/mob/dead/observer/observer_base.dm b/code/modules/mob/dead/observer/observer_base.dm index ac94e433c6b..f640cc7afa8 100644 --- a/code/modules/mob/dead/observer/observer_base.dm +++ b/code/modules/mob/dead/observer/observer_base.dm @@ -44,6 +44,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) see_in_dark = 100 verbs += list( /mob/dead/observer/proc/dead_tele, + /mob/dead/observer/proc/jump_to_ruin, /mob/dead/observer/proc/open_spawners_menu) // Our new boo spell. @@ -413,6 +414,38 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp var/target = input("Area to teleport to", "Teleport to a location") as null|anything in SSmapping.ghostteleportlocs teleport(SSmapping.ghostteleportlocs[target]) +/mob/dead/observer/proc/jump_to_ruin() + set category = "Ghost" + set name = "Jump to Ruin" + set desc = "Displays a list of all placed ruins to teleport to." + + if(!isobserver(usr)) + to_chat(usr, "Not when you're not dead!") + return + + var/list/names = list() + for(var/i in GLOB.ruin_landmarks) + var/obj/effect/landmark/ruin/ruin_landmark = i + var/datum/map_template/ruin/template = ruin_landmark.ruin_template + + var/count = 1 + var/name = template.name + var/original_name = name + + while(name in names) + count++ + name = "[original_name] ([count])" + + names[name] = ruin_landmark + + var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in names + + var/obj/effect/landmark/ruin/landmark = names[ruinname] + + if(istype(landmark)) + forceMove(get_turf(landmark)) + update_parallax_contents() + /mob/dead/observer/proc/teleport(area/A) if(!A || !isobserver(usr)) return