mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-29 16:10:02 +01:00
DEV Flags + Perms + Verbs
The Dev Flag and status is back in game! As of right now, you will have to play around with the values in regards to the defines in setup.dm (specifically with CCIAA), but everything works fine, besides maybe Devs having some verbs they shouldn't for some reason.. But besides that, it's peachy.
This commit is contained in:
@@ -702,7 +702,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
|
||||
dat += "<BR>"
|
||||
|
||||
if(check_rights(R_DEBUG,0))
|
||||
if(check_rights(R_DEBUG|R_DEV,0))
|
||||
dat += {"
|
||||
<B>Security Level Elevated</B><BR>
|
||||
<BR>
|
||||
@@ -1351,7 +1351,7 @@ proc/admin_notice(var/message, var/rights)
|
||||
return //Extra sanity check to make sure only observers are shoved into things
|
||||
|
||||
//Same as assume-direct-control perm requirements.
|
||||
if (!check_rights(R_VAREDIT,0) || !check_rights(R_ADMIN|R_DEBUG,0))
|
||||
if (!check_rights(R_VAREDIT,0) || !check_rights(R_ADMIN|R_DEBUG|R_DEV,0))
|
||||
return 0
|
||||
if (!frommob.ckey)
|
||||
return 0
|
||||
|
||||
@@ -42,6 +42,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
|
||||
if("spawn","create") rights |= R_SPAWN
|
||||
if("mod") rights |= R_MOD
|
||||
if("mentor") rights |= R_MENTOR
|
||||
if("developer") rights |= R_DEV
|
||||
if("cciaa") rights |= R_CCIAA
|
||||
|
||||
admin_ranks[rank] = rights
|
||||
|
||||
@@ -303,6 +303,39 @@ var/list/admin_verbs_mentor = list(
|
||||
/client/proc/cmd_admin_subtle_message
|
||||
)
|
||||
|
||||
var/list/admin_verbs_dev = list(
|
||||
/datum/admins/proc/restart,
|
||||
/datum/admins/proc/spawn_atom, //allows us to spawn instances,
|
||||
/datum/admins/proc/delay,
|
||||
/client/proc/cmd_admin_pm_panel, //admin-pm list
|
||||
/client/proc/cmd_dev_say,
|
||||
/client/proc/nanomapgen_DumpImage,
|
||||
/client/proc/admin_ghost,
|
||||
/client/proc/air_report,
|
||||
/client/proc/enable_debug_verbs,
|
||||
/client/proc/cmd_admin_delete,
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
/client/proc/cmd_debug_del_all,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
/client/proc/cmd_debug_mob_lists,
|
||||
/client/proc/Debug2,
|
||||
/client/proc/debug_controller,
|
||||
/client/proc/debug_variables,
|
||||
/client/proc/dsay,
|
||||
/client/proc/cmd_mod_say,
|
||||
/client/proc/getruntimelog,
|
||||
/client/proc/giveruntimelog,
|
||||
/client/proc/hide_most_verbs,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/kill_airgroup,
|
||||
/client/proc/player_panel,
|
||||
/client/proc/reload_admins,
|
||||
/client/proc/reload_mentors,
|
||||
/client/proc/restart_controller,
|
||||
/client/proc/togglebuildmodeself,
|
||||
/client/proc/toggledebuglogs,
|
||||
/client/proc/ZASSettings
|
||||
)
|
||||
var/list/admin_verbs_cciaa = list(
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/spawn_duty_officer,
|
||||
@@ -334,6 +367,7 @@ var/list/admin_verbs_cciaa = list(
|
||||
if(holder.rights & R_SPAWN) verbs += admin_verbs_spawn
|
||||
if(holder.rights & R_MOD) verbs += admin_verbs_mod
|
||||
if(holder.rights & R_MENTOR) verbs += admin_verbs_mentor
|
||||
if(holder.rights & R_DEV) verbs += admin_verbs_dev
|
||||
if(holder.rights & R_CCIAA) verbs += admin_verbs_cciaa
|
||||
|
||||
/client/proc/remove_admin_verbs()
|
||||
|
||||
@@ -2360,7 +2360,7 @@
|
||||
world << text("<B>A secret has been activated by []!</B>", usr.key)
|
||||
|
||||
else if(href_list["secretscoder"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
switch(href_list["secretscoder"])
|
||||
if("spawn_objects")
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
//clean the message if it's not sent by a high-rank admin
|
||||
//todo: sanitize for all???
|
||||
if(!check_rights(R_SERVER|R_DEBUG,0))
|
||||
if(!check_rights(R_SERVER|R_DEBUG|R_DEV,0))
|
||||
msg = sanitize(msg)
|
||||
if(!msg) return
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
//check client/X is an admin and isn't the sender or recipient
|
||||
if(X == C || X == src)
|
||||
continue
|
||||
if(X.key != key && X.key != C.key && (X.holder.rights & R_ADMIN|R_MOD|R_MENTOR))
|
||||
if(X.key != key && X.key != C.key && (X.holder.rights & R_ADMIN|R_MOD|R_MENTOR|R_DEV))
|
||||
X << "<span class='pm'><span class='other'>" + create_text_tag("pm_other", "PM:", X) + " <span class='name'>[key_name(src, X, 0)]</span> to <span class='name'>[key_name(C, X, 0)]</span>: <span class='message'>[msg]</span></span></span>"
|
||||
|
||||
/client/proc/cmd_admin_irc_pm(sender)
|
||||
|
||||
@@ -37,6 +37,24 @@
|
||||
|
||||
feedback_add_details("admin_verb","MS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/cmd_dev_say(msg as text)
|
||||
set category = "Special Verbs"
|
||||
set name = "Devsay"
|
||||
set hidden = 1
|
||||
|
||||
if(!check_rights(R_ADMIN|R_DEV)) return
|
||||
|
||||
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
|
||||
if(!msg) return
|
||||
|
||||
log_admin("DEV: [key_name(src)] : [msg]")
|
||||
|
||||
if(check_rights(R_DEV,0))
|
||||
msg = "<span class='devsay'><span class='prefix'>DEV:</span> <EM>[key_name(usr, 0, 1, 0)]</EM>: <span class='message'>[msg]</span></span>"
|
||||
for(var/client/C in admins)
|
||||
if(C.holder.rights & (R_ADMIN|R_DEV))
|
||||
C << msg
|
||||
|
||||
/client/proc/cmd_cciaa_say(msg as text)
|
||||
set category = "Special Verbs"
|
||||
set name = "CCIAsay"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/client/proc/Debug2()
|
||||
set category = "Debug"
|
||||
set name = "Debug-Game"
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
if(Debug2)
|
||||
Debug2 = 0
|
||||
@@ -64,7 +64,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
|
||||
if(!procname) return
|
||||
|
||||
|
||||
if(targetselected)
|
||||
if(!target)
|
||||
usr << "<span class='danger'>Your target no longer exists.</span>"
|
||||
@@ -426,7 +426,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
set name = "Assume direct control"
|
||||
set desc = "Direct intervention"
|
||||
|
||||
if(!check_rights(R_DEBUG|R_ADMIN)) return
|
||||
if(!check_rights(R_DEBUG|R_ADMIN|R_DEV|R_FUN)) return
|
||||
if(M.ckey)
|
||||
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.",,"Yes","No") != "Yes")
|
||||
return
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
set name = "Reload Admins"
|
||||
set category = "Debug"
|
||||
|
||||
if(!check_rights(R_SERVER)) return
|
||||
if(!check_rights(R_SERVER|R_DEV)) return
|
||||
|
||||
message_admins("[usr] manually reloaded admins")
|
||||
load_admins()
|
||||
|
||||
@@ -170,7 +170,7 @@ var/list/debug_verbs = list (
|
||||
set category = "Debug"
|
||||
set name = "Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
verbs += debug_verbs
|
||||
|
||||
@@ -180,7 +180,7 @@ var/list/debug_verbs = list (
|
||||
set category = "Debug"
|
||||
set name = "Hide Debug verbs"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
verbs -= debug_verbs
|
||||
|
||||
@@ -212,7 +212,7 @@ var/list/debug_verbs = list (
|
||||
set category = "ZAS"
|
||||
set name = "Check ZAS connections"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
testZAScolors_remove()
|
||||
|
||||
var/turf/simulated/location = get_turf(usr)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
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(!check_rights(R_VAREDIT)) return
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
|
||||
if(A && A.type)
|
||||
if(typesof(A.type))
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
/client/proc/massmodify_variables(var/atom/O, var/var_name = "", var/method = 0)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
|
||||
var/list/locked = list("vars", "key", "ckey", "client")
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
var/dir
|
||||
|
||||
if(variable == "holder" || (variable in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
if(isnull(var_value))
|
||||
usr << "Unable to determine variable type."
|
||||
|
||||
@@ -126,7 +126,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
L += var_value
|
||||
|
||||
/client/proc/mod_list(var/list/L)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
|
||||
if(!istype(L,/list)) src << "Not a List."
|
||||
|
||||
@@ -147,7 +147,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
var/dir
|
||||
|
||||
if(variable in locked)
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
if(isnull(variable))
|
||||
usr << "Unable to determine variable type."
|
||||
@@ -273,7 +273,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
|
||||
|
||||
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
|
||||
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state")
|
||||
|
||||
@@ -292,7 +292,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
return
|
||||
|
||||
if(param_var_name == "holder" || (param_var_name in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV|R_FUN)) return
|
||||
|
||||
variable = param_var_name
|
||||
|
||||
@@ -350,7 +350,7 @@ var/list/forbidden_varedit_object_types = list(
|
||||
var_value = O.vars[variable]
|
||||
|
||||
if(variable == "holder" || (variable in locked))
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
if(!autodetect_class)
|
||||
|
||||
@@ -505,4 +505,3 @@ var/list/forbidden_varedit_object_types = list(
|
||||
world.log << "### VarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]"
|
||||
log_admin("[key_name(src)] modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [variable] to [O.vars[variable]]", 1)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
set name = "Set Ticklag"
|
||||
set desc = "Sets a new tick lag. Recommend you don't mess with this too much! Stable, time-tested ticklag value is 0.9"
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
var/newtick = input("Sets a new tick lag. Please don't mess with this too much! The stable, time-tested ticklag value is 0.9","Lag of Tick", world.tick_lag) as num|null
|
||||
//I've used ticks of 2 before to help with serious singulo lags
|
||||
@@ -20,5 +20,3 @@
|
||||
else config.Tickcomp = 0
|
||||
else
|
||||
src << "\red Error: ticklag(): Invalid world.ticklag value. No changes made."
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user