From 7e73121ecd2a5863a62bb48107a57231c9a44186 Mon Sep 17 00:00:00 2001 From: "baloh.matevz" Date: Mon, 19 Sep 2011 06:12:00 +0000 Subject: [PATCH] "get key" verb for admins Also fixed runtime errors related to the new 'mark object' thing. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2227 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/admin/admin_verbs.dm | 3 +++ code/modules/admin/verbs/adminjump.dm | 27 +++++++++++++++++++++ code/modules/admin/verbs/modifyvariables.dm | 8 +++--- 3 files changed, 34 insertions(+), 4 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 1d3967dfa1..0a0e61cf1d 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -73,6 +73,7 @@ // Admin game intrusion verbs += /client/proc/Getmob + verbs += /client/proc/Getkey verbs += /client/proc/sendmob verbs += /client/proc/Jump verbs += /client/proc/jumptokey @@ -172,6 +173,7 @@ verbs += /client/proc/Debug2 //debug toggle switch verbs += /client/proc/toggle_view_range verbs += /client/proc/Getmob + verbs += /client/proc/Getkey verbs += /client/proc/sendmob verbs += /client/proc/Jump verbs += /client/proc/jumptokey @@ -304,6 +306,7 @@ verbs -= /client/proc/Debug2 //debug toggle switch verbs -= /client/proc/toggle_view_range verbs -= /client/proc/Getmob + verbs -= /client/proc/Getkey verbs -= /client/proc/sendmob verbs -= /client/proc/Jump verbs -= /client/proc/jumptokey diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index bd77f6a372..2fb9d9843c 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -79,6 +79,33 @@ else alert("Admin jumping disabled") +/client/proc/Getkey() + set category = "Admin" + set name = "Get Key" + set desc = "Key to teleport" + + if(!src.authenticated || !src.holder) + src << "Only administrators may use this command." + return + + if(config.allow_admin_jump) + var/list/keys = list() + for(var/mob/M in world) + keys += M.client + var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys + if(!selection) + return + var/mob/M = selection:mob + + if(!M) + return + log_admin("[key_name(usr)] teleported [key_name(M)]") + message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1) + if(M) + M.loc = get_turf(usr) + else + alert("Admin jumping disabled") + /client/proc/sendmob(var/mob/M in world, var/area/A in world) set category = "Admin" set name = "Send Mob" diff --git a/code/modules/admin/verbs/modifyvariables.dm b/code/modules/admin/verbs/modifyvariables.dm index b76d315383..bead10ea4d 100644 --- a/code/modules/admin/verbs/modifyvariables.dm +++ b/code/modules/admin/verbs/modifyvariables.dm @@ -26,7 +26,7 @@ if(!class) return - if(class == "marked datum ([holder.marked_datum.type])") + if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") class = "marked datum" var/var_value = null @@ -75,7 +75,7 @@ if(!class) return - if(class == "marked datum ([holder.marked_datum.type])") + if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") class = "marked datum" var/var_value = null @@ -211,7 +211,7 @@ if(!class) return - if(class == "marked datum ([holder.marked_datum.type])") + if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") class = "marked datum" switch(class) @@ -428,7 +428,7 @@ else original_name = O:name - if(class == "marked datum ([holder.marked_datum.type])") + if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])") class = "marked datum" switch(class)