From 72d95543f9bba07cafad2471076dc4e879078ace Mon Sep 17 00:00:00 2001 From: Bedshaped Date: Fri, 11 Nov 2016 22:18:30 +0000 Subject: [PATCH] skull_is_a.git --- code/controllers/Processes/night_lighting.dm | 8 ++++---- code/controllers/configuration.dm | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/code/controllers/Processes/night_lighting.dm b/code/controllers/Processes/night_lighting.dm index 07d13f3fb99..25241a1c5cb 100644 --- a/code/controllers/Processes/night_lighting.dm +++ b/code/controllers/Processes/night_lighting.dm @@ -37,21 +37,21 @@ /datum/controller/process/night_lighting/preStart() switch (worldtime2ticks()) - if (0 to (config.nl_finish_hour*TICKS_IN_HOUR)) + if (0 to config.nl_finish) deactivate() - if ((config.nl_start_hour*TICKS_IN_HOUR) to TICKS_IN_DAY) + if ((config.nl_start to TICKS_IN_DAY) activate() /datum/controller/process/night_lighting/doWork() switch (worldtime2ticks()) - if (0 to (config.nl_finish_hour*TICKS_IN_HOUR)) + if (0 to config.nl_finish) if (isactive) command_announcement.Announce("Good morning. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now return the public hallway lighting levels to normal.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg') deactivate() - if ((config.nl_start_hour*TICKS_IN_HOUR) to TICKS_IN_DAY) + if (config.nl_start to TICKS_IN_DAY) if (!isactive) command_announcement.Announce("Good evening. The time is [worldtime2text()]. \n\nThe automated systems aboard the [station_name()] will now dim lighting in the public hallways in order to accommodate the circadian rhythm of some species.", "Automated Lighting System", new_sound = 'sound/misc/bosuns_whistle.ogg') activate() diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 4b47407d88b..9be12bd969b 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -171,8 +171,8 @@ var/list/gamemode_cache = list() var/ghost_interaction = 0 var/night_lighting = 0 - var/nl_start_hour = 19 - var/nl_finish_hour = 8 + var/nl_start = 19 * TICKS_IN_HOUR + var/nl_finish = 8 * TICKS_IN_HOUR var/comms_password = "" @@ -604,10 +604,10 @@ var/list/gamemode_cache = list() config.night_lighting = 1 if("nl_start_hour") - config.nl_start_hour = text2num(value) + config.nl_start = text2num(value) * TICKS_IN_HOUR if("nl_finish_hour") - config.nl_finish_hour = text2num(value) + config.nl_finish = text2num(value) * TICKS_IN_HOUR if("disable_player_mice") config.disable_player_mice = 1