Configuration Controller (#7857)

This commit is contained in:
Selis
2024-04-05 07:44:20 +02:00
committed by GitHub
parent c542e3bac0
commit e1a987c25c
235 changed files with 3294 additions and 989 deletions

View File

@@ -172,7 +172,7 @@
/proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
if(automute)
if(!config.automute_on)
if(!CONFIG_GET(flag/automute_on)) // CHOMPEdit
return
else
if(!usr || !usr.client)
@@ -317,7 +317,7 @@ Ccomp's first proc.
return
var/action=""
if(config.antag_hud_allowed)
if(CONFIG_GET(flag/antag_hud_allowed)) // CHOMPEdit
for(var/mob/observer/dead/g in get_ghosts())
if(!g.client.holder) //Remove the verb from non-admin ghosts
remove_verb(g, /mob/observer/dead/verb/toggle_antagHUD) //CHOMPEdit
@@ -325,7 +325,7 @@ Ccomp's first proc.
g.antagHUD = 0 // Disable it on those that have it enabled
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
to_chat(g, span_red("<B>The Administrator has disabled AntagHUD </B>"))
config.antag_hud_allowed = 0
CONFIG_SET(flag/antag_hud_allowed, FALSE) // CHOMPEdit
to_chat(src, span_red("<B>AntagHUD usage has been disabled</B>"))
action = "disabled"
else
@@ -333,7 +333,7 @@ Ccomp's first proc.
if(!g.client.holder) // Add the verb back for all non-admin ghosts
add_verb(g, /mob/observer/dead/verb/toggle_antagHUD) //CHOMPEdit
to_chat(g, span_blue("<B>The Administrator has enabled AntagHUD </B>")) // Notify all observers they can now use AntagHUD
config.antag_hud_allowed = 1
CONFIG_SET(flag/antag_hud_allowed, TRUE) // CHOMPEdit
action = "enabled"
to_chat(src, span_blue("<B>AntagHUD usage has been enabled</B>"))
@@ -352,11 +352,11 @@ Ccomp's first proc.
return
var/action=""
if(config.antag_hud_restricted)
if(CONFIG_GET(flag/antag_hud_restricted)) // CHOMPEdit
for(var/mob/observer/dead/g in get_ghosts())
to_chat(g, span_blue("<B>The administrator has lifted restrictions on joining the round if you use AntagHUD</B>"))
action = "lifted restrictions"
config.antag_hud_restricted = 0
CONFIG_SET(flag/antag_hud_restricted, FALSE) // CHOMPEdit
to_chat(src, span_blue("<B>AntagHUD restrictions have been lifted</B>"))
else
for(var/mob/observer/dead/g in get_ghosts())
@@ -365,7 +365,7 @@ Ccomp's first proc.
g.antagHUD = 0
g.has_enabled_antagHUD = 0
action = "placed restrictions"
config.antag_hud_restricted = 1
CONFIG_SET(flag/antag_hud_restricted, TRUE) // CHOMPEdit
to_chat(src, span_red("<B>AntagHUD restrictions have been enabled</B>"))
log_admin("[key_name(usr)] has [action] on joining the round if they use AntagHUD")
@@ -628,7 +628,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!istype(M))
tgui_alert_async(usr, "Cannot revive a ghost")
return
if(config.allow_admin_rev)
if(CONFIG_GET(flag/allow_admin_rev)) // CHOMPEdit
M.revive()
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
@@ -1021,12 +1021,12 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_SERVER)) return //VOREStation Edit
if(!config.allow_random_events)
config.allow_random_events = 1
if(!CONFIG_GET(flag/allow_random_events)) // CHOMPEdit
CONFIG_SET(flag/allow_random_events, TRUE) // CHOMPEdit
to_chat(usr, "Random events enabled")
message_admins("Admin [key_name_admin(usr)] has enabled random events.", 1)
else
config.allow_random_events = 0
CONFIG_SET(flag/allow_random_events, FALSE) // CHOMPEdit
to_chat(usr, "Random events disabled")
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!