mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
[MIRROR] Adds a living time config to the panic bunker (#1289)
* Adds a living time config to the panic bunker (#54341) * Adds a living time value to the panic bunker, so you can keep people out based on time spent playing the game * updates the admin verb, and enables %minutes% as an option * Makes a proc call more clear Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com> * than Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com> * Adds a living time config to the panic bunker Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
This commit is contained in:
co-authored by
Jared-Fogle
LemonInTheDark
parent
44f061f8e1
commit
6e08e3cd8d
@@ -6,10 +6,18 @@
|
||||
return
|
||||
|
||||
var/new_pb = !CONFIG_GET(flag/panic_bunker)
|
||||
var/time_rec = 0
|
||||
var/message = ""
|
||||
if(new_pb)
|
||||
time_rec = input(src, "How many living minutes should they need to play?", "Shit's fucked isn't it", CONFIG_GET(number/panic_bunker_living)) as num
|
||||
message = input(src, "What should they see when they log in?", "MMM", CONFIG_GET(string/panic_bunker_message)) as text
|
||||
message = replacetext(message, "%minutes%", time_rec)
|
||||
CONFIG_SET(number/panic_bunker_living, time_rec)
|
||||
CONFIG_SET(string/panic_bunker_message, message)
|
||||
|
||||
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"].")
|
||||
log_admin("[key_name(usr)] has toggled the Panic Bunker, it is now [new_pb ? "on and set to [time_rec] with a message of [message]" : "off"]")
|
||||
message_admins("[key_name_admin(usr)] has toggled the Panic Bunker, it is now [new_pb ? "enabled with a living minutes requirement of [time_rec]" : "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!
|
||||
|
||||
Reference in New Issue
Block a user