From dd48b2cee5a6ca9de7a831200a7ae35d0d17b7e0 Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Tue, 6 Mar 2018 04:57:30 -0800 Subject: [PATCH] Admins can now force night shift mode via secrets (#36162) * Night shfit admin stuff * Update secrets.dm --- code/modules/admin/secrets.dm | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/secrets.dm b/code/modules/admin/secrets.dm index 7839697fa0f..b8176a4ce78 100644 --- a/code/modules/admin/secrets.dm +++ b/code/modules/admin/secrets.dm @@ -31,6 +31,7 @@ Reset Thunderdome to default state
Rename Station Name
Reset Station Name
+ Set Night Shift Mode

Shuttles

@@ -164,6 +165,23 @@ log_admin("[key_name(usr)] renamed the station to \"[new_name]\".") message_admins("[key_name_admin(usr)] renamed the station to: [new_name].") priority_announce("[command_name()] has renamed the station to \"[new_name]\".") + if("night_shift_set") + if(!check_rights(R_ADMIN)) + return + var/val = alert(usr, "What do you want to set night shift to? This will override the automatic system until set to automatic again.", "On", "Off", "Automatic") + switch(val) + if("Automatic") + if(CONFIG_GET(flag/enable_night_shifts)) + SSnightshift.can_fire = TRUE + SSnightshift.fire() + else + SSnightshift.update_nightshift(FALSE, TRUE) + if("On") + SSnightshift.can_fire = FALSE + SSnightshift.update_nightshift(TRUE, TRUE) + if("Off") + SSnightshift.can_fire = FALSE + SSnightshift.update_nightshift(FALSE, TRUE) if("reset_name") if(!check_rights(R_ADMIN)) @@ -603,13 +621,13 @@ var/list/new_movement = list() for(var/i in 1 to movement_keys.len) var/key = movement_keys[i] - + var/msg = "Please input the new movement direction when the user presses [key]. Ex. northeast" var/title = "New direction for [key]" var/new_direction = text2dir(input(usr, msg, title) as text|null) if(!new_direction) new_direction = movement_keys[key] - + new_movement[key] = new_direction SSinput.movement_keys = new_movement message_admins("[key_name_admin(usr)] has configured all movement directions.")