Merge pull request #7173 from Carn/#6971

Resolves #6971 - non-lighting_subarea areas are now stored in list/sorte...
This commit is contained in:
tkdrg
2015-01-21 05:06:25 -03:00
5 changed files with 40 additions and 13 deletions
+17 -3
View File
@@ -1,4 +1,4 @@
/client/proc/Jump(var/area/A in return_sorted_areas())
/client/proc/Jump(area/A in returnSortedAreas())
set name = "Jump to Area"
set desc = "Area to jump to"
set category = "Admin"
@@ -6,7 +6,21 @@
src << "Only administrators may use this command."
return
usr.loc = pick(get_area_turfs(A))
if(!A)
return
var/list/turfs = list()
for(var/area/Ar in A.related)
for(var/turf/T in Ar)
if(T.density)
continue
turfs.Add(T)
var/turf/T = pick_n_take(turfs)
if(!T)
src << "Nowhere to jump to!"
return
usr.loc = T
log_admin("[key_name(usr)] jumped to [A]")
message_admins("[key_name_admin(usr)] jumped to [A]")
feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -124,7 +138,7 @@
if(!src.holder)
src << "Only administrators may use this command."
return
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
var/area/A = input(usr, "Pick an area.", "Pick an area") in returnSortedAreas()
if(A)
M.loc = pick(get_area_turfs(A))
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!