From dd7f3555d08202859009824b3a3e12a6f3cadfe5 Mon Sep 17 00:00:00 2001 From: Cadyn Date: Wed, 28 Oct 2020 02:28:19 -0700 Subject: [PATCH] Admin teleport verb addition --- code/modules/admin/admin_verb_lists.dm | 2 ++ code/modules/admin/verbs/admin_ch.dm | 35 ++++++++++++++++++++++++++ vorestation.dme | 1 + 3 files changed, 38 insertions(+) create mode 100644 code/modules/admin/verbs/admin_ch.dm diff --git a/code/modules/admin/admin_verb_lists.dm b/code/modules/admin/admin_verb_lists.dm index 28e00ab79d..a33611b459 100644 --- a/code/modules/admin/admin_verb_lists.dm +++ b/code/modules/admin/admin_verb_lists.dm @@ -109,6 +109,7 @@ var/list/admin_verbs_admin = list( /datum/admins/proc/sendFax, /client/proc/despawn_player, /datum/admins/proc/view_feedback, + /client/proc/admin_teleport, //CHOMPEdit /client/proc/setckey //YW add - readds SetCkey proc ) @@ -360,6 +361,7 @@ var/list/admin_verbs_mod = list( /datum/admins/proc/view_txt_log, //shows the server log (diary) for today, /datum/admins/proc/quick_nif, //CHOMPEdit /datum/admins/proc/quick_authentic_nif, //CHOMPEdit + /client/proc/admin_teleport, //CHOMPEdit /datum/admins/proc/view_atk_log //shows the server combat-log, doesn't do anything presently, ) diff --git a/code/modules/admin/verbs/admin_ch.dm b/code/modules/admin/verbs/admin_ch.dm new file mode 100644 index 0000000000..775183e87c --- /dev/null +++ b/code/modules/admin/verbs/admin_ch.dm @@ -0,0 +1,35 @@ +/client/proc/admin_teleport() + set name = "Admin teleport" + set category = "Admin" + set desc = "Teleports an atom to a set of coordinates or to the contents of another atom" + + var/list/value = vv_get_value(VV_ATOM_REFERENCE) + if(!value["class"] || !value["value"]) + return + var/atom/target = value["value"] + var/atom/destination + switch(alert("Would you like to teleport to a set of a coordinates, or to an atom?",,"coordinates","atom")) + if("coordinates") + var/list/inputlist = text2numlist(sanitize(input(usr,"Please input the coordinates, seperated by commas")),",") + var/list/coords = list() + for(var/content in inputlist) + if(content != null) + coords += content + if(coords.len>3) + alert("You entered too many coordinates! Only 3 are required.") + return + if(coords.len<3) + alert("You didn't enter enough coordinates! 3 are required.") + return + destination = locate(coords[1],coords[2],coords[3]) + if(!destination) + alert("Invalid coordinates!") + return + if("atom") + value = vv_get_value(VV_ATOM_REFERENCE) + if(!value["class"] || !value["value"]) + return + destination = value["value"] + new /datum/teleport/instant/admin(target,destination) +/datum/teleport/instant/admin + local=FALSE \ No newline at end of file diff --git a/vorestation.dme b/vorestation.dme index f08d40e4b8..ca042715c0 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -1702,6 +1702,7 @@ #include "code\modules\admin\secrets\random_events\gravity_vr.dm" #include "code\modules\admin\secrets\random_events\trigger_cordical_borer_infestation.dm" #include "code\modules\admin\secrets\random_events\trigger_xenomorph_infestation.dm" +#include "code\modules\admin\verbs\admin_ch.dm" #include "code\modules\admin\verbs\adminhelp.dm" #include "code\modules\admin\verbs\adminhelp_vr.dm" #include "code\modules\admin\verbs\adminjump.dm"