mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)]->[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"
|
||||
|
||||
Reference in New Issue
Block a user