mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Subsystem overruns (#18744)
* fix sun subsytem overrun * . * . * night shift overrun * . * . * this * . * .
This commit is contained in:
@@ -3,6 +3,20 @@ SUBSYSTEM_DEF(sun)
|
||||
wait = 600
|
||||
flags = SS_NO_INIT
|
||||
var/static/datum/sun/sun = new
|
||||
var/list/current_run
|
||||
|
||||
/datum/controller/subsystem/sun/fire()
|
||||
sun.calc_position()
|
||||
/datum/controller/subsystem/sun/fire(resumed)
|
||||
if(!resumed)
|
||||
current_run = GLOB.solars_list.Copy()
|
||||
sun.calc_position()
|
||||
|
||||
//now tell the solar control computers to update their status and linked devices
|
||||
while(current_run.len)
|
||||
var/obj/machinery/power/solar_control/SC = current_run[current_run.len]
|
||||
current_run.len--
|
||||
if(!SC.powernet)
|
||||
GLOB.solars_list.Remove(SC)
|
||||
continue
|
||||
SC.update()
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user