mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 23:52:12 +00: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:
@@ -289,7 +289,8 @@ proc/tg_list2text(list/list, glue=",")
|
||||
if (rights & R_SPAWN) . += "[seperator]+SPAWN"
|
||||
if (rights & R_MOD) . += "[seperator]+MODERATOR"
|
||||
if (rights & R_MENTOR) . += "[seperator]+MENTOR"
|
||||
if (rights & R_CCIAA) . += "[seperator]+CCIAA"
|
||||
if (rights & R_DEV) . += "[seperator]+DEVELOPER"
|
||||
if (rights & R_CCIAA) . += "[seperator]+CCIAA"
|
||||
return .
|
||||
|
||||
/proc/ui_style2icon(ui_style)
|
||||
|
||||
@@ -420,7 +420,7 @@ client
|
||||
|
||||
//~CARN: for renaming mobs (updates their name, real_name, mind.name, their ID/PDA and datacore records).
|
||||
else if(href_list["rename"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
|
||||
var/mob/M = locate(href_list["rename"])
|
||||
if(!istype(M))
|
||||
@@ -435,7 +435,7 @@ client
|
||||
href_list["datumrefresh"] = href_list["rename"]
|
||||
|
||||
else if(href_list["varnameedit"] && href_list["datumedit"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
|
||||
var/D = locate(href_list["datumedit"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
@@ -445,7 +445,7 @@ client
|
||||
modify_variables(D, href_list["varnameedit"], 1)
|
||||
|
||||
else if(href_list["varnamechange"] && href_list["datumchange"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
|
||||
var/D = locate(href_list["datumchange"])
|
||||
if(!istype(D,/datum) && !istype(D,/client))
|
||||
@@ -455,7 +455,7 @@ client
|
||||
modify_variables(D, href_list["varnamechange"], 0)
|
||||
|
||||
else if(href_list["varnamemass"] && href_list["datummass"])
|
||||
if(!check_rights(R_VAREDIT)) return
|
||||
if(!check_rights(R_VAREDIT|R_DEV)) return
|
||||
|
||||
var/atom/A = locate(href_list["datummass"])
|
||||
if(!istype(A))
|
||||
@@ -530,7 +530,7 @@ client
|
||||
src.cmd_admin_gib(M)
|
||||
|
||||
else if(href_list["build_mode"])
|
||||
if(!check_rights(R_BUILDMODE)) return
|
||||
if(!check_rights(R_BUILDMODE|R_DEV)) return
|
||||
|
||||
var/mob/M = locate(href_list["build_mode"])
|
||||
if(!istype(M))
|
||||
@@ -800,7 +800,7 @@ client
|
||||
usr << "Mob doesn't know that language."
|
||||
|
||||
else if(href_list["addverb"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
var/mob/living/H = locate(href_list["addverb"])
|
||||
|
||||
@@ -830,7 +830,7 @@ client
|
||||
H.verbs += verb
|
||||
|
||||
else if(href_list["remverb"])
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
if(!check_rights(R_DEBUG|R_DEV)) return
|
||||
|
||||
var/mob/H = locate(href_list["remverb"])
|
||||
|
||||
@@ -866,7 +866,7 @@ client
|
||||
return
|
||||
|
||||
new new_organ(M)
|
||||
|
||||
|
||||
|
||||
else if(href_list["remorgan"])
|
||||
if(!check_rights(R_SPAWN)) return
|
||||
@@ -952,4 +952,3 @@ client
|
||||
src.debug_variables(DAT)
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
ooc_style = "elevated"
|
||||
if(holder.rights & R_MOD)
|
||||
ooc_style = "moderator"
|
||||
if(holder.rights & R_DEBUG)
|
||||
if(holder.rights & (R_DEBUG|R_DEV))
|
||||
ooc_style = "developer"
|
||||
if(holder.rights & R_ADMIN)
|
||||
ooc_style = "admin"
|
||||
|
||||
@@ -64,10 +64,12 @@
|
||||
var/modmsg = ""
|
||||
var/mentmsg = ""
|
||||
var/cciaamsg = ""
|
||||
var/devmsg = ""
|
||||
var/num_mods_online = 0
|
||||
var/num_admins_online = 0
|
||||
var/num_mentors_online = 0
|
||||
var/num_cciaa_online = 0
|
||||
var/num_devs_online = 0
|
||||
if(holder)
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights)) //Used to determine who shows up in admin rows
|
||||
@@ -135,6 +137,20 @@
|
||||
cciaamsg += "\n"
|
||||
num_cciaa_online++
|
||||
|
||||
else if(C.holder.rights & R_DEV)
|
||||
devmsg += "\t[C] is a [C.holder.rank]"
|
||||
if(isobserver(C.mob))
|
||||
devmsg += " - Observing"
|
||||
else if(istype(C.mob,/mob/new_player))
|
||||
devmsg += " - Lobby"
|
||||
else
|
||||
devmsg += " - Playing"
|
||||
|
||||
if(C.is_afk())
|
||||
devmsg += " (AFK)"
|
||||
devmsg += "\n"
|
||||
num_devs_online++
|
||||
|
||||
else
|
||||
for(var/client/C in admins)
|
||||
if(R_ADMIN & C.holder.rights || (!R_MOD & C.holder.rights && !R_MENTOR & C.holder.rights))
|
||||
@@ -147,6 +163,9 @@
|
||||
else if (R_MENTOR & C.holder.rights)
|
||||
mentmsg += "\t[C] is a [C.holder.rank]\n"
|
||||
num_mentors_online++
|
||||
else if(C.holder.rights & R_DEV)
|
||||
devmsg += "\t[C] is a [C.holder.rank]\n"
|
||||
num_devs_online++
|
||||
else if (R_CCIAA & C.holder.rights)
|
||||
cciaamsg += "\t[C] is a [C.holder.rank]\n"
|
||||
num_cciaa_online++
|
||||
@@ -164,5 +183,7 @@
|
||||
if (config.show_auxiliary_roles)
|
||||
if (num_cciaa_online)
|
||||
msg += "\n<b> Current CCIA Agents ([num_cciaa_online]):</b>\n" + cciaamsg
|
||||
if(num_devs_online)
|
||||
msg += "\n<b> Current Developers ([num_devs_online]):</b>\n" + devmsg
|
||||
|
||||
src << msg
|
||||
|
||||
@@ -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."
|
||||
|
||||
|
||||
|
||||
@@ -250,13 +250,13 @@
|
||||
src.owner << "\red You do not have enough powers to do this."
|
||||
return
|
||||
|
||||
var/target_department = null
|
||||
if (!fax)
|
||||
/*var/target_department = null // giving errors when compiling, commenting out for now
|
||||
if (!fax) // -Ryan784
|
||||
var/list/all_fax_machines = list()
|
||||
for (var/obj/machinery/photocopier/faxmachine/F in world)
|
||||
all_fax_machines += F
|
||||
target_department = input(src.owner, "Please select a department to send this fax to.", "Target Fax Department", null) as null|anything in all_fax_machines
|
||||
|
||||
var/target_department = input(src.owner, "Please select a department to send this fax to.", "Target Fax Department", null) as null|anything in all_fax_machines
|
||||
*/
|
||||
if (!fax)
|
||||
src.owner << "\red Couldn't find the desired fax machine! Sending cancelled!"
|
||||
|
||||
|
||||
@@ -538,10 +538,11 @@
|
||||
#define R_SPAWN 4096
|
||||
#define R_MOD 8192
|
||||
#define R_MENTOR 16384
|
||||
#define R_HOST 32768
|
||||
#define R_CCIAA 65536
|
||||
#define R_DEV 18432 //needed a number in between 16k and 32k, so 16384+2048
|
||||
#define R_HOST 32768 //leaving this here
|
||||
#define R_CCIAA 65535 //CAN'T BE ABOVE 65535 OR BORKS, stupid bitmasks -Ryan784
|
||||
|
||||
#define R_MAXPERMISSION 65536 // This holds the maximum value for a permission. It is used in iteration, so keep it updated.
|
||||
#define R_MAXPERMISSION 65535 // This holds the maximum value for a permission. It is used in iteration, so keep it updated.
|
||||
|
||||
// Preference toggles.
|
||||
#define SOUND_ADMINHELP 1
|
||||
|
||||
Reference in New Issue
Block a user