[MIRROR] Gives admins the ability to enable hostile environments at will. [MDB IGNORE] (#18288)

* Gives admins the ability to enable hostile environments at will. (#72018)

* Gives admins the ability to enable hostile environments at will.

Co-authored-by: NamelessFairy <40036527+NamelessFairy@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-12-25 06:39:49 +01:00
committed by GitHub
parent 3337a883e4
commit 0d2d05f40c
3 changed files with 29 additions and 3 deletions
+1
View File
@@ -69,6 +69,7 @@ GLOBAL_PROTECT(admin_verbs_admin)
/client/proc/admin_cancel_shuttle, /*allows us to cancel the emergency shuttle, sending it back to centcom*/
/client/proc/admin_disable_shuttle, /*allows us to disable the emergency shuttle admin-wise so that it cannot be called*/
/client/proc/admin_enable_shuttle, /*undoes the above*/
/client/proc/admin_hostile_environment, /*Allows admins to prevent the emergency shuttle from leaving, also lets admins clear hostile environments if theres one stuck*/
/client/proc/cmd_admin_direct_narrate, /*send text directly to a player with no padding. Useful for narratives and fluff-text*/
/client/proc/cmd_admin_world_narrate, /*sends text to all players with no padding*/
/client/proc/cmd_admin_local_narrate, /*sends text to all mobs within view of atom*/
+25
View File
@@ -241,6 +241,31 @@
SSshuttle.emergency.setTimer(SSshuttle.last_call_time)
priority_announce("Warning: Emergency Shuttle uplink reestablished, shuttle enabled.", "Emergency Shuttle Uplink Alert", 'sound/misc/announce_dig.ogg')
/client/proc/admin_hostile_environment()
set category = "Admin.Events"
set name = "Hostile Environment"
if(!check_rights(R_ADMIN))
return
switch(tgui_alert(usr, "Select an Option", "Hostile Environment Manager", list("Enable", "Disable", "Clear All")))
if("Enable")
if (SSshuttle.hostile_environments["Admin"] == TRUE)
to_chat(usr, span_warning("Error, admin hostile environment already enabled."))
else
message_admins(span_adminnotice("[key_name_admin(usr)] Enabled an admin hostile environment"))
SSshuttle.registerHostileEnvironment("Admin")
if("Disable")
if (!SSshuttle.hostile_environments["Admin"])
to_chat(usr, span_warning("Error, no admin hostile environment found."))
else
message_admins(span_adminnotice("[key_name_admin(usr)] Disabled the admin hostile environment"))
SSshuttle.clearHostileEnvironment("Admin")
if("Clear All")
message_admins(span_adminnotice("[key_name_admin(usr)] Disabled all current hostile environment sources"))
SSshuttle.hostile_environments.Cut()
SSshuttle.checkHostileEnvironment()
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list)
set category = "Admin.Events"
set name = "Toggle Nuke"