- edit variables and mass edit variables removed as verbs, merged with view variables

- explosion and emp verbs removed from objects. They are now in the options in view variables for all objects, mobs and turfs.
Screenshots:
http://www.kamletos.si/object%20admin%20verbs.PNG
http://www.kamletos.si/object_variables.PNG
- Marking objects now gives you feedback on the view variables screen. It also refreshes the screen.
- Warn, prison and unprison verbs removed. Prisoning can be done via player panel. (show player panel verb of the X in the 'player panel' verb. Damn these names, confusing.)
- Banning now has a cancel button on all input screens.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2236 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
baloh.matevz
2011-09-20 19:13:24 +00:00
parent 31281956cb
commit c586e285f7
4 changed files with 290 additions and 114 deletions
+3 -3
View File
@@ -210,11 +210,11 @@
return
switch(alert("Temporary Ban?",,"Yes","No", "Cancel"))
if("Yes")
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num|null
if(!mins)
return
if(mins >= 525600) mins = 525599
var/reason = input(usr,"Reason?","reason","Griefer") as text
var/reason = input(usr,"Reason?","reason","Griefer") as text|null
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
@@ -231,7 +231,7 @@
del(M.client)
//del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends.
if("No")
var/reason = input(usr,"Reason?","reason","Griefer") as text
var/reason = input(usr,"Reason?","reason","Griefer") as text|null
if(!reason)
return
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
+16 -16
View File
@@ -65,7 +65,7 @@
if(holder.state == 2) // if observing
// Debug
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_object_variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
verbs += /client/proc/cmd_modify_ticker_variables
// Admin helpers
@@ -141,7 +141,7 @@
if (holder.level >= 5)//Game Admin********************************************************************
verbs += /obj/admins/proc/view_txt_log
verbs += /client/proc/cmd_mass_modify_object_variables
//verbs += /client/proc/cmd_mass_modify_object_variables --Merged with view variables
verbs += /client/proc/cmd_admin_list_open_jobs
verbs += /client/proc/cmd_admin_direct_narrate
verbs += /client/proc/cmd_admin_world_narrate
@@ -155,8 +155,8 @@
verbs += /client/proc/give_spell
verbs += /client/proc/cmd_admin_ninjafy
verbs += /client/proc/cmd_admin_grantfullaccess
verbs += /client/proc/cmd_admin_explosion
verbs += /client/proc/cmd_admin_emp
//verbs += /client/proc/cmd_admin_explosion --now in view vars
//verbs += /client/proc/cmd_admin_emp --now in view vars
verbs += /client/proc/cmd_admin_drop_everything
verbs += /client/proc/make_sound
verbs += /client/proc/play_local_sound
@@ -168,7 +168,7 @@
verbs += /obj/admins/proc/adrev //toggle admin revives
verbs += /obj/admins/proc/adspawn //toggle admin item spawning
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_object_variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
verbs += /client/proc/cmd_modify_ticker_variables
verbs += /client/proc/Debug2 //debug toggle switch
verbs += /client/proc/toggle_view_range
@@ -230,7 +230,7 @@
verbs += /client/proc/cmd_admin_mute
verbs += /client/proc/cmd_admin_pm
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/warn
//verbs += --useless
verbs += /obj/admins/proc/announce
verbs += /obj/admins/proc/startnow
verbs += /client/proc/dsay
@@ -245,8 +245,8 @@
verbs += /obj/admins/proc/votekill
verbs += /client/proc/voting
verbs += /obj/admins/proc/show_player_panel
verbs += /client/proc/cmd_admin_prison
verbs += /obj/admins/proc/unprison
//verbs += /client/proc/cmd_admin_prison --in player panel
//verbs += /obj/admins/proc/unprison --in player panel
verbs += /client/proc/hide_verbs
verbs += /client/proc/general_report
verbs += /client/proc/air_report
@@ -275,7 +275,7 @@
verbs -= /client/proc/object_talk
verbs -= /client/proc/strike_team
verbs -= /obj/admins/proc/view_txt_log
verbs -= /client/proc/cmd_mass_modify_object_variables
//verbs -= /client/proc/cmd_mass_modify_object_variables --Merged with view variables
verbs -= /client/proc/cmd_admin_list_open_jobs
verbs -= /client/proc/cmd_admin_direct_narrate
verbs -= /client/proc/cmd_admin_world_narrate
@@ -291,8 +291,8 @@
verbs -= /client/proc/give_spell
verbs -= /client/proc/cmd_admin_ninjafy
verbs -= /client/proc/cmd_admin_grantfullaccess
verbs -= /client/proc/cmd_admin_explosion
verbs -= /client/proc/cmd_admin_emp
//verbs -= /client/proc/cmd_admin_explosion --now in view vars
//verbs -= /client/proc/cmd_admin_emp --now in view vars
verbs -= /client/proc/cmd_admin_drop_everything
verbs -= /client/proc/make_sound
verbs -= /client/proc/only_one
@@ -301,7 +301,7 @@
verbs -= /obj/admins/proc/adspawn //toggle admin item spawning
verbs -= /obj/admins/proc/toggleaban //abandon mob
verbs -= /client/proc/debug_variables
verbs -= /client/proc/cmd_modify_object_variables
//verbs -= /client/proc/cmd_modify_object_variables --merged with view variables
verbs -= /client/proc/cmd_modify_ticker_variables
verbs -= /client/proc/Debug2 //debug toggle switch
verbs -= /client/proc/toggle_view_range
@@ -350,7 +350,7 @@
verbs -= /client/proc/cmd_admin_pm
verbs -= /client/proc/cmd_admin_say
verbs -= /client/proc/cmd_admin_subtle_message
verbs -= /client/proc/warn
//verbs -= /client/proc/warn --uselesss
verbs -= /obj/admins/proc/announce
verbs -= /obj/admins/proc/startnow
verbs -= /client/proc/dsay
@@ -365,8 +365,8 @@
verbs -= /obj/admins/proc/votekill
verbs -= /client/proc/voting
verbs -= /obj/admins/proc/show_player_panel
verbs -= /client/proc/cmd_admin_prison
verbs -= /obj/admins/proc/unprison
//verbs -= /client/proc/cmd_admin_prison --in player panel
//verbs -= /obj/admins/proc/unprison --in player panel
verbs -= /client/proc/hide_verbs
verbs -= /client/proc/general_report
verbs -= /client/proc/air_report
@@ -618,7 +618,7 @@
if(holder.level >= 4)//Badmin********************************************************************
verbs += /client/proc/debug_variables
verbs += /client/proc/cmd_modify_object_variables
//verbs += /client/proc/cmd_modify_object_variables --merged with view vairiables
verbs += /client/proc/Jump
verbs += /client/proc/jumptoturf
verbs += /client/proc/togglebuildmodeself
+210 -85
View File
@@ -1,11 +1,24 @@
/client/proc/cmd_mass_modify_object_variables(obj/O as obj|mob|turf|area in world)
/client/proc/cmd_mass_modify_object_variables(atom/A, var/var_name)
set category = "Debug"
set name = "Mass Edit Variables"
set desc="(target) Edit all instances of a target item's variables"
src.massmodify_variables(O)
var/method = 0 //0 means strict type detection while 1 means this type and all subtypes (IE: /obj/item with this set to 1 will set it to ALL itms)
if(A && A.type)
if(typesof(A.type))
switch(input("Strict object type detection?") in list("Strictly this type","This type and subtypes", "Cancel"))
if("Strictly this type")
method = 0
if("This type and subtypes")
method = 1
if("Cancel")
return
src.massmodify_variables(A, var_name, method)
/client/proc/massmodify_variables(var/atom/O)
/client/proc/massmodify_variables(var/atom/O, var/var_name = "", var/method = 0)
var/list/locked = list("vars", "key", "ckey", "client")
if(!src.authenticated || !src.holder)
@@ -18,7 +31,13 @@
names = sortList(names)
var/variable = input("Which var?","Var") as null|anything in names
var/variable = ""
if(!var_name)
variable = input("Which var?","Var") as null|anything in names
else
variable = var_name
if(!variable)
return
var/default
@@ -109,21 +128,37 @@
if("restore to default")
O.vars[variable] = initial(O.vars[variable])
if(method)
if(istype(O, /mob))
for(var/mob/M in world)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
if("edit referenced object")
return .(O.vars[variable])
@@ -132,20 +167,36 @@
O.vars[variable] = input("Enter new text:","Text",\
O.vars[variable]) as text
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
if(method)
if(istype(O, /mob))
for(var/mob/M in world)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
if("num")
var/new_value = input("Enter new number:","Num",\
@@ -156,85 +207,159 @@
else
O.vars[variable] = new_value
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
if(variable=="luminosity")
M.sd_SetLuminosity(new_value)
else
M.vars[variable] = O.vars[variable]
if(method)
if(istype(O, /mob))
for(var/mob/M in world)
if ( istype(M , O.type) )
if(variable=="luminosity")
M.sd_SetLuminosity(new_value)
else
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
if(variable=="luminosity")
M.sd_SetLuminosity(new_value)
else
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
if(variable=="luminosity")
A.sd_SetLuminosity(new_value)
else
A.vars[variable] = O.vars[variable]
if("type")
O.vars[variable] = input("Enter type:","Type",O.vars[variable]) \
in typesof(/obj,/mob,/area,/turf)
if(method)
if(istype(O, /mob))
for(var/mob/M in world)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
if("file")
O.vars[variable] = input("Pick file:","File",O.vars[variable]) \
as file
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
if(method)
if(istype(O, /mob))
for(var/mob/M in world)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
else if(istype(O.type, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O.type, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O.type, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O.type, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O.type, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O.type, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
if("icon")
O.vars[variable] = input("Pick icon:","Icon",O.vars[variable]) \
as icon
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
if(method)
if(istype(O, /mob))
for(var/mob/M in world)
if ( istype(M , O.type) )
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if ( istype(A , O.type) )
A.vars[variable] = O.vars[variable]
else
if(istype(O, /mob))
for(var/mob/M in world)
if (M.type == O.type)
M.vars[variable] = O.vars[variable]
else if(istype(O, /obj))
for(var/obj/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
else if(istype(O, /turf))
for(var/turf/A in world)
if (A.type == O.type)
A.vars[variable] = O.vars[variable]
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]")
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]", 1)