Minor Nightmode Fixes (#1305)

bugfix: "Global nightmode toggle no longer affects security as was originally intended."
tweak: "Manually turning on nightmode will prevent the automatic system from turning it off."
This commit is contained in:
Lohikar
2016-12-25 17:42:40 -06:00
committed by skull132
parent 4f32cc1231
commit 7375af6c19
6 changed files with 18 additions and 3 deletions
@@ -3,6 +3,7 @@ var/datum/controller/process/night_lighting/nl_ctrl
/datum/controller/process/night_lighting/
var/isactive = 0
var/firstrun = 1
var/manual_override = 0
/datum/controller/process/night_lighting/proc/is_active()
return isactive
@@ -28,6 +29,8 @@ var/datum/controller/process/night_lighting/nl_ctrl
/datum/controller/process/night_lighting/doWork()
if (manual_override) // don't automatically change lighting if it was manually changed in-game
return
switch (worldtime2ticks())
if (0 to config.nl_finish)