Files
Bubberstation/code/modules/admin/verbs/panicbunker.dm
Rob Bailey c20a04543b Port of Replays from Yogstation (#48579)
* demos (ported from yogstation)

rustg update + write with no format

use external hook for logging

use proper log vars

fix + clarifying comment

don't start the log

release build of rust-g

fix something caught by the lint

Update code/__DEFINES/subsystems.dm

Co-Authored-By: Jordan Brown <Cyberboss@users.noreply.github.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

Update code/controllers/subsystem/demo.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

moves hooks out of a dedicated file

len = 0 to Cut(), remove semicolons

untyped loop

* updated rust_g

* 513 updates
2020-04-06 13:15:48 -04:00

16 lines
894 B
Plaintext

/client/proc/panicbunker()
set category = "Server"
set name = "Toggle Panic Bunker"
if (!CONFIG_GET(flag/sql_enabled))
to_chat(usr, "<span class='adminnotice'>The Database is not enabled!</span>", confidential = TRUE)
return
var/new_pb = !CONFIG_GET(flag/panic_bunker)
CONFIG_SET(flag/panic_bunker, new_pb)
log_admin("[key_name(usr)] has toggled the Panic Bunker, it is now [new_pb ? "on" : "off"]")
message_admins("[key_name_admin(usr)] has toggled the Panic Bunker, it is now [new_pb ? "enabled" : "disabled"].")
if (new_pb && !SSdbcore.Connect())
message_admins("The Database is not connected! Panic bunker will not work until the connection is reestablished.")
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Panic Bunker", "[new_pb ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!