mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 19:13:30 +01:00
Makes solars auto-track again (#13278)
* Makes solars auto-track again * Forgot this
This commit is contained in:
@@ -1,19 +1,28 @@
|
||||
SUBSYSTEM_DEF(sun)
|
||||
name = "Sun"
|
||||
wait = 600
|
||||
flags = SS_NO_TICK_CHECK|SS_NO_INIT
|
||||
flags = SS_NO_TICK_CHECK
|
||||
init_order = INIT_ORDER_SUN
|
||||
var/angle
|
||||
var/dx
|
||||
var/dy
|
||||
var/rate
|
||||
var/list/solars = list()
|
||||
|
||||
/datum/controller/subsystem/sun/PreInit()
|
||||
/datum/controller/subsystem/sun/Initialize(start_timeofday)
|
||||
// Lets work out an angle for the "sun" to rotate around the station
|
||||
angle = rand (0,360) // the station position to the sun is randomised at round start
|
||||
rate = rand(50,200)/100 // 50% - 200% of standard rotation
|
||||
if(prob(50)) // same chance to rotate clockwise than counter-clockwise
|
||||
rate = -rate
|
||||
|
||||
// Solar consoles need to load after machines init, so this handles that
|
||||
for(var/obj/machinery/power/solar_control/SC in solars)
|
||||
SC.setup()
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/datum/controller/subsystem/sun/stat_entry(msg)
|
||||
..("P:[solars.len]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user