Lighting overhaul.

This commit overhauls the lighting system to Bay12 standards. It is better
in pretty much every way.
This commit is contained in:
Tigercat2000
2015-05-10 09:48:04 -07:00
parent 73838ac55d
commit e1249fc640
141 changed files with 1195 additions and 1449 deletions
-26
View File
@@ -1,26 +0,0 @@
/datum/controller/process/lighting/setup()
name = "lighting"
schedule_interval = 5 // every .5 second
lighting_controller.Initialize()
/datum/controller/process/lighting/doWork()
lighting_controller.lights_workload_max = \
max(lighting_controller.lights_workload_max, lighting_controller.lights.len)
for(var/datum/light_source/L in lighting_controller.lights)
if(L && L.check())
lighting_controller.lights.Remove(L)
scheck()
lighting_controller.changed_turfs_workload_max = \
max(lighting_controller.changed_turfs_workload_max, lighting_controller.changed_turfs.len)
for(var/turf/T in lighting_controller.changed_turfs)
if(T && T.lighting_changed)
T.shift_to_subarea()
scheck()
if(lighting_controller.changed_turfs && lighting_controller.changed_turfs.len)
lighting_controller.changed_turfs.len = 0 // reset the changed list