April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
@@ -1,11 +1,8 @@
|
||||
var/datum/controller/subsystem/lighting/SSlighting
|
||||
GLOBAL_LIST_EMPTY(lighting_update_lights) // List of lighting sources queued for update.
|
||||
GLOBAL_LIST_EMPTY(lighting_update_corners) // List of lighting corners queued for update.
|
||||
GLOBAL_LIST_EMPTY(lighting_update_objects) // List of lighting objects queued for update.
|
||||
|
||||
var/list/lighting_update_lights = list() // List of lighting sources queued for update.
|
||||
var/list/lighting_update_corners = list() // List of lighting corners queued for update.
|
||||
var/list/lighting_update_objects = list() // List of lighting objects queued for update.
|
||||
|
||||
|
||||
/datum/controller/subsystem/lighting
|
||||
SUBSYSTEM_DEF(lighting)
|
||||
name = "Lighting"
|
||||
wait = 2
|
||||
init_order = -20
|
||||
@@ -13,13 +10,8 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo
|
||||
|
||||
var/initialized = FALSE
|
||||
|
||||
|
||||
/datum/controller/subsystem/lighting/New()
|
||||
NEW_SS_GLOBAL(SSlighting)
|
||||
|
||||
|
||||
/datum/controller/subsystem/lighting/stat_entry()
|
||||
..("L:[lighting_update_lights.len]|C:[lighting_update_corners.len]|O:[lighting_update_objects.len]")
|
||||
..("L:[GLOB.lighting_update_lights.len]|C:[GLOB.lighting_update_corners.len]|O:[GLOB.lighting_update_objects.len]")
|
||||
|
||||
|
||||
/datum/controller/subsystem/lighting/Initialize(timeofday)
|
||||
@@ -30,7 +22,7 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo
|
||||
|
||||
create_all_lighting_objects()
|
||||
initialized = TRUE
|
||||
|
||||
|
||||
fire(FALSE, TRUE)
|
||||
|
||||
..()
|
||||
@@ -38,11 +30,11 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo
|
||||
/datum/controller/subsystem/lighting/fire(resumed, init_tick_checks)
|
||||
var/real_tick_limit
|
||||
if(!init_tick_checks)
|
||||
real_tick_limit = CURRENT_TICKLIMIT
|
||||
CURRENT_TICKLIMIT = ((real_tick_limit - world.tick_usage) / 3) + world.tick_usage
|
||||
real_tick_limit = GLOB.CURRENT_TICKLIMIT
|
||||
GLOB.CURRENT_TICKLIMIT = ((real_tick_limit - world.tick_usage) / 3) + world.tick_usage
|
||||
var/i = 0
|
||||
for (i in 1 to lighting_update_lights.len)
|
||||
var/datum/light_source/L = lighting_update_lights[i]
|
||||
for (i in 1 to GLOB.lighting_update_lights.len)
|
||||
var/datum/light_source/L = GLOB.lighting_update_lights[i]
|
||||
|
||||
if (L.check() || L.destroyed || L.force_update)
|
||||
L.remove_lum()
|
||||
@@ -55,20 +47,20 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo
|
||||
L.vis_update = FALSE
|
||||
L.force_update = FALSE
|
||||
L.needs_update = FALSE
|
||||
|
||||
|
||||
if(init_tick_checks)
|
||||
CHECK_TICK
|
||||
else if (MC_TICK_CHECK)
|
||||
break
|
||||
if (i)
|
||||
lighting_update_lights.Cut(1, i+1)
|
||||
GLOB.lighting_update_lights.Cut(1, i+1)
|
||||
i = 0
|
||||
|
||||
if(!init_tick_checks)
|
||||
CURRENT_TICKLIMIT = ((real_tick_limit - world.tick_usage)/2)+world.tick_usage
|
||||
GLOB.CURRENT_TICKLIMIT = ((real_tick_limit - world.tick_usage)/2)+world.tick_usage
|
||||
|
||||
for (i in 1 to lighting_update_corners.len)
|
||||
var/datum/lighting_corner/C = lighting_update_corners[i]
|
||||
for (i in 1 to GLOB.lighting_update_corners.len)
|
||||
var/datum/lighting_corner/C = GLOB.lighting_update_corners[i]
|
||||
|
||||
C.update_objects()
|
||||
C.needs_update = FALSE
|
||||
@@ -77,15 +69,15 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo
|
||||
else if (MC_TICK_CHECK)
|
||||
break
|
||||
if (i)
|
||||
lighting_update_corners.Cut(1, i+1)
|
||||
GLOB.lighting_update_corners.Cut(1, i+1)
|
||||
i = 0
|
||||
|
||||
|
||||
if(!init_tick_checks)
|
||||
CURRENT_TICKLIMIT = real_tick_limit
|
||||
GLOB.CURRENT_TICKLIMIT = real_tick_limit
|
||||
|
||||
for (i in 1 to lighting_update_objects.len)
|
||||
var/atom/movable/lighting_object/O = lighting_update_objects[i]
|
||||
for (i in 1 to GLOB.lighting_update_objects.len)
|
||||
var/atom/movable/lighting_object/O = GLOB.lighting_update_objects[i]
|
||||
|
||||
if (QDELETED(O))
|
||||
continue
|
||||
@@ -97,9 +89,9 @@ var/list/lighting_update_objects = list() // List of lighting objects queued fo
|
||||
else if (MC_TICK_CHECK)
|
||||
break
|
||||
if (i)
|
||||
lighting_update_objects.Cut(1, i+1)
|
||||
GLOB.lighting_update_objects.Cut(1, i+1)
|
||||
|
||||
|
||||
/datum/controller/subsystem/lighting/Recover()
|
||||
initialized = SSlighting.initialized
|
||||
..()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user