Adds CentComm only features to the Comms Console (#22096)

* here we go

* add some logging

* more buttons + no tgui fail

* now requires R_ADMIN and R_EVENT

* review

* rebuild

* prettier

* lewc review

* tgui

* sirryan review

* oops

* prettier changes

* tgui

* OOPS

* tgui

* okay there we go
This commit is contained in:
Contrabang
2023-10-20 15:10:59 -04:00
committed by GitHub
parent c0159d6f97
commit 75a02c1cd2
8 changed files with 794 additions and 375 deletions
+23
View File
@@ -145,6 +145,29 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
return 1
return 0
/**
* Requires the holder to have all the rights specified
*
* rights_required = R_ADMIN|R_EVENT means they must have both flags, or it will return false
*/
/proc/check_rights_all(rights_required, show_msg = TRUE, mob/user = usr)
if(!user?.client)
return FALSE
if(!rights_required)
if(user.client.holder)
return TRUE
if(show_msg)
to_chat(user, "<font color='red'>Error: You are not an admin.</font>")
return FALSE
if(!user.client.holder)
return FALSE
if((user.client.holder.rights & rights_required) == rights_required)
return TRUE
if(show_msg)
to_chat(user, "<font color='red'>Error: You do not have sufficient rights to do that. You require all of the following flags:[rights2text(rights_required, " ")].</font>")
return FALSE
/datum/admins/vv_edit_var(var_name, var_value)
return FALSE // no admin abuse
-7
View File
@@ -1,7 +1,3 @@
#define NUKE_INTACT 0
#define NUKE_CORE_MISSING 1
#define NUKE_MISSING 2
/mob/living/verb/pray(msg as text)
set category = "IC"
set name = "Pray"
@@ -97,6 +93,3 @@
if(X.prefs.sound & SOUND_ADMINHELP)
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
#undef NUKE_INTACT
#undef NUKE_CORE_MISSING
#undef NUKE_MISSING