Merge pull request #10464 from mwerezak/area-power-fix

Fixes area power initialization
This commit is contained in:
Zuhayr
2015-08-10 18:21:03 +09:30
2 changed files with 13 additions and 9 deletions
+8 -3
View File
@@ -88,17 +88,22 @@ datum/controller/game_controller/proc/setup()
datum/controller/game_controller/proc/setup_objects()
world << "\red \b Initializing objects"
world << "<span class='danger>Initializing objects</span>"
sleep(-1)
for(var/atom/movable/object in world)
object.initialize()
world << "<span class='danger>Initializing areas</span>"
sleep(-1)
for(var/area/area in all_areas)
area.initialize()
world << "\red \b Initializing pipe networks"
world << "<span class='danger>Initializing pipe networks</span>"
sleep(-1)
for(var/obj/machinery/atmospherics/machine in machines)
machine.build_network()
world << "\red \b Initializing atmos machinery."
world << "<span class='danger>Initializing atmos machinery.</span>"
sleep(-1)
for(var/obj/machinery/atmospherics/unary/U in machines)
if(istype(U, /obj/machinery/atmospherics/unary/vent_pump))
+5 -6
View File
@@ -21,14 +21,13 @@
luminosity = 1
lighting_use_dynamic = 0
//If an APC is present it will set these, otherwise they stay off.
power_light = 0
power_equip = 0
power_environ = 0
..()
// spawn(15)
/area/proc/initialize()
if(!requires_power || !(locate(/obj/machinery/power/apc) in apc))
power_light = 0
power_equip = 0
power_environ = 0
power_change() // all machines set to current power level, also updates lighting icon
InitializeLighting()