Fixes admin jumping. Done by reverting some changes here: https://github.com/Baystation12/Baystation12/pull/786

This commit is contained in:
Ren Erthilo
2012-04-15 20:06:05 +01:00
parent 1db2a54206
commit 44797c33db
4 changed files with 38 additions and 91 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
dat += "<body><table border=1 cellspacing=5><B><tr><th>Name/Real Name</th><th>Type</th><th>Assigned Job</th><th>Info</th><th>Options</th><th>Traitor?</th></tr></B>"
//add <th>IP:</th> to this if wanting to add back in IP checking
//add <td>(IP: [M.lastKnownIP])</td> if you want to know their ip to the lists below
var/list/mobs = get_sorted_mobs()
var/list/mobs = sortmobs()
var/i = 1
for(var/mob/M in mobs)
@@ -120,7 +120,7 @@
dat += "<body><table border=1 cellspacing=5><B><tr><th>Name</th><th>Real Name</th><th>Assigned Job</th><th>Key</th><th>Options</th><th>PM</th><th>Traitor?</th></tr></B>"
//add <th>IP:</th> to this if wanting to add back in IP checking
//add <td>(IP: [M.lastKnownIP])</td> if you want to know their ip to the lists below
var/list/mobs = get_sorted_mobs()
var/list/mobs = sortmobs()
for(var/mob/M in mobs)
if(!M.ckey) continue
+14 -29
View File
@@ -28,7 +28,7 @@
alert("Admin jumping disabled")
return
/client/proc/jumptomob()
/client/proc/jumptomob(var/mob/M in world)
set category = "Admin"
set name = "Jump to Mob"
@@ -37,20 +37,15 @@
return
if(config.allow_admin_jump)
var/mobs = getmobs()
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in mobs
if(!selection)
return
var/mob/M = mobs[selection]
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(T && isturf(T))
A.loc = T
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
else
A << "This mob is not located in the game world."
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
if(src.mob)
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(T && isturf(T))
A.loc = T
else
A << "This mob is not located in the game world."
else
alert("Admin jumping disabled")
@@ -76,7 +71,7 @@
else
alert("Admin jumping disabled")
/client/proc/Getmob()
/client/proc/Getmob(var/mob/M in world)
set category = "Admin"
set name = "Get Mob"
set desc = "Mob to teleport"
@@ -84,19 +79,9 @@
src << "Only administrators may use this command."
return
if(config.allow_admin_jump)
var/mobs = getmobs()
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in mobs
var/mob/M = mobs[selection]
if(!istype(M))
return
var/mob/A = src.mob
var/turf/T = get_turf(A)
if(T && isturf(T))
M.loc = T
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
else
A << "You are not located in the game world."
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
M.loc = get_turf(usr)
else
alert("Admin jumping disabled")
+4 -4
View File
@@ -62,7 +62,7 @@
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs()
var_value = input("Select reference:","Reference") as null|mob in sortmobs()
if("file")
var_value = input("Pick file:","File") as null|file
@@ -127,7 +127,7 @@
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs()
var_value = input("Select reference:","Reference") as null|mob in sortmobs()
if("file")
var_value = input("Pick file:","File") as null|file
@@ -305,7 +305,7 @@
if("mob reference")
variable = input("Select reference:","Reference",\
variable) as null|mob in get_sorted_mobs()
variable) as null|mob in sortmobs()
if("file")
variable = input("Pick file:","File",variable) \
@@ -547,7 +547,7 @@
O.vars[variable] = var_new
if("mob reference")
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in get_sorted_mobs()
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in sortmobs()
if(var_new==null) return
O.vars[variable] = var_new