Night lighting (#1049)

changes:

rscadd: "Added a button on APCs to set the area lights to a 'night-mode' which is dimmer and saves energy."
rscadd: "Added an automated system to turn 'night-mode' on in hallways between 6pm and 7am in station time."
This commit is contained in:
Bedshaped
2016-11-03 23:19:39 +00:00
committed by skull132
parent 492d287667
commit d8a49afaf9
15 changed files with 166 additions and 3 deletions

View File

@@ -107,6 +107,8 @@
last_task = 0
last_object = null
/datum/controller/process/proc/preStart()
/datum/controller/process/proc/started()
var/timeofhour = TimeOfHour
// Initialize last_slept so we can record timing information

View File

@@ -84,10 +84,15 @@ var/global/datum/controller/processScheduler/processScheduler
isRunning = 1
// tick_lag will have been set by now, so re-initialize these
scheduler_sleep_interval = world.tick_lag
callPreStart()
updateStartDelays()
spawn(0)
process()
/datum/controller/processScheduler/proc/callPreStart()
for (var/datum/controller/process/P in processes)
P.preStart()
/datum/controller/processScheduler/proc/process()
while(isRunning)
checkRunningProcesses()