Added toggle-godmode, invisibility for Game Admins, BS12 versions of proccall for Game Masters

Signed-off-by: Mister Fox <traitor.foxy.brown@live.com>
This commit is contained in:
Mister Fox
2011-12-20 08:01:54 -05:00
parent 2dffc6d00d
commit 9f52aef132
8 changed files with 150 additions and 21 deletions
+39
View File
@@ -134,6 +134,8 @@
verbs += /client/proc/enable_mapping_debug
verbs += /client/proc/everyone_random
verbs += /client/proc/only_one // Fateweaver suggested I do this - Doohl
verbs += /client/proc/callprocgen
verbs += /client/proc/callprocobj
if (holder.level >= 5)//Game Admin********************************************************************
verbs += /obj/admins/proc/view_txt_log
@@ -168,6 +170,8 @@
verbs += /client/proc/triple_ai
verbs += /client/proc/object_talk
verbs += /client/proc/strike_team
verbs += /client/proc/admin_invis
verbs += /client/proc/cmd_admin_godmode
if (holder.level >= 4)//Badmin********************************************************************
verbs += /obj/admins/proc/adrev //toggle admin revives
@@ -395,6 +399,11 @@
verbs -= /client/proc/toggle_hear_radio
verbs -= /client/proc/tension_report
verbs -= /client/proc/cmd_admin_change_custom_event
verbs -= /client/proc/admin_invis
verbs -= /client/proc/callprocgen
verbs -= /client/proc/callprocobj
verbs -= /client/proc/cmd_admin_godmode
return
@@ -693,6 +702,7 @@
verbs += /client/proc/cmd_admin_subtle_message
verbs += /client/proc/cmd_admin_pm
verbs += /client/proc/cmd_admin_gib_self
verbs += /client/proc/admin_invis
verbs += /client/proc/deadchat //toggles deadchat
verbs += /obj/admins/proc/toggleooc //toggle ooc
@@ -717,3 +727,32 @@
verbs += /obj/admins/proc/toggleooc //toggle ooc
verbs += /client/proc/cmd_admin_say//asay
return
/client/proc/admin_invis()
set category = "Admin"
set name = "Invisibility"
if(!src.holder)
src << "Only administrators may use this command."
return
src.admin_invis =! src.admin_invis
if(src.mob)
var/mob/m = src.mob//probably don't need this cast, but I'm too lazy to check if /client.mob is of type /mob or not
m.update_clothing()
log_admin("[key_name(usr)] has turned their invisibility [src.admin_invis ? "ON" : "OFF"]")
message_admins("[key_name_admin(usr)] has turned their invisibility [src.admin_invis ? "ON" : "OFF"]", 1)
/client/proc/cmd_admin_godmode(mob/M as mob in world)
set category = "Admin"
set name = "Toggle Godmode"
if(!src.holder)
src << "Only administrators may use this command."
return
if (M.nodamage == 1)
M.nodamage = 0
usr << "\blue Toggled OFF"
else
M.nodamage = 1
usr << "\blue Toggled ON"
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]")
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]", 1)
+91 -1
View File
@@ -31,7 +31,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
/client/proc/callproc()
set category = "Debug"
set name = "Advanced ProcCall"
set name = "Advanced ProcCall (TG Version)"
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
@@ -117,6 +117,96 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
usr << "\blue Proc returned: [returnval ? returnval : "null"]"
/client/proc/callprocgen()
set category = "Debug"
set name = "ProcCall (BS12 Version)"
if(!src.holder)
src << "Only administrators may use this command."
return
var/class = null
var/returnval = null
var/procname = input("Procpath (in full)","path", null)
var/argNum = input("Number of arguments:","Number",null) as num //input("Arguments","Arguments:", null)
var/list/argL = new/list()
var/i
for(i=0; i<argNum; i++)
class = input("Type of Argument #[i]","Variable Type", "text") in list("text","num","type","reference","icon","file","cancel")
switch(class)
if("cancel")
return
if("text")
argL.Add( input("Enter new text:","Text",null) as text )
if("num")
argL.Add( input("Enter new number:","Num",null) as num )
if("type")
argL.Add( input("Enter type:","Type",null) in typesof(/obj,/mob,/area,/turf) )
if("reference")
argL.Add( input("Select reference:","Reference",null) as mob|obj|turf|area in world )
if("icon")
argL.Add( input("Pick icon:","Icon",null) as icon )
if("file")
argL.Add( input("Pick file:","File",null) as file )
usr << "\blue Calling '[procname]'"
returnval = call(procname)(arglist(argL))
usr << "\blue Proc returned: [returnval ? returnval : "null"]"
/client/proc/callprocobj(var/target as obj|mob|area|turf in world)
set category = "Debug"
set name = "Object ProcCall (BS12 Version)"
if(!src.holder)
src << "Only administrators may use this command."
return
var/class = null
var/returnval = null
var/procname = input("Procpath (e.g. just \"update\" for lights)","path:", null)
var/argNum = input("Number of arguments:","Number",null) as num //input("Arguments","Arguments:", null)
var/list/argL = new/list()
var/i
for(i=0; i<argNum; i++)
class = input("Type of Argument #[i]","Variable Type", "text") in list("text","num","type","reference","icon","file","cancel")
switch(class)
if("cancel")
return
if("text")
argL.Add( input("Enter new text:","Text",null) as text )
if("num")
argL.Add( input("Enter new number:","Num",null) as num )
if("type")
argL.Add( input("Enter type:","Type",null) in typesof(/obj,/mob,/area,/turf) )
if("reference")
argL.Add( input("Select reference:","Reference",null) as mob|obj|turf|area in world )
if("icon")
argL.Add( input("Pick icon:","Icon",null) as icon )
if("file")
argL.Add( input("Pick file:","File",null) as file )
usr << "\blue Calling '[procname]' on '[target]'"
returnval = call(target,procname)(arglist(argL))
usr << "\blue Proc returned: [returnval ? returnval : "null"]"
/client/proc/Cell()
set category = "Debug"
set name = "Air Status in Location"
-16
View File
@@ -118,22 +118,6 @@
if(K && K.client && K.client.holder && K.key != usr.key && K.key != M.key)
K << "<B><font color='blue'>PM: [key_name(usr, K)]-&gt;[key_name(M, K)]:</B> \blue [t]</font>"
/client/proc/cmd_admin_godmode(mob/M as mob in world)
set category = "Special Verbs"
set name = "Godmode"
if(!authenticated || !holder)
src << "Only administrators may use this command."
return
if (M.nodamage == 1)
M.nodamage = 0
usr << "\blue Toggled OFF"
else
M.nodamage = 1
usr << "\blue Toggled ON"
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]")
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.nodamage ? "On" : "Off")]", 1)
/client/proc/cmd_admin_mute(mob/M as mob in world)
set category = "Special Verbs"
set name = "Admin Mute"
@@ -435,8 +435,9 @@
if (S.active)
shielded = 2
break
if (shielded == 2 || alien_invis)
if(client && client.admin_invis)
invisibility = 100
else if (shielded == 2 || alien_invis)
invisibility = 2
//New stealth. Hopefully doesn't lag too much. /N
if(istype(loc, /turf))//If they are standing on a turf.
@@ -249,7 +249,9 @@
else
m_select.screen_loc = null
if (alien_invis)
if(client && client.admin_invis)
invisibility = 100
else if (alien_invis)
invisibility = 2
if(istype(loc, /turf))//If they are standing on a turf.
AddCamoOverlay(loc)//Overlay camo.
@@ -1112,6 +1112,14 @@
NinjaStealthMalf()
else
invisibility = 0
if(client && client.admin_invis)
invisibility = 100
else if (shielded == 2)
invisibility = 2
else
invisibility = 0
/*
for (var/mob/M in viewers(1, src))//For the love of god DO NOT REFRESH EVERY SECOND - Mport
if ((M.client && M.machine == src))
@@ -406,6 +406,11 @@
else
icon_state = "monkey0"
if(client && client.admin_invis)
invisibility = 100
else
invisibility = 0
if (wear_mask)
if (istype(wear_mask, /obj/item/clothing/mask))
var/t1 = wear_mask.icon_state