Merge pull request #24762 from Cyberboss/IWillMurderTheNextPersonToDefineNew

Fixes lighting runtimes
This commit is contained in:
oranges
2017-03-07 13:15:58 +13:00
committed by GitHub
6 changed files with 21 additions and 23 deletions
-11
View File
@@ -49,17 +49,6 @@
else
light = new/datum/light_source(src, .)
// Incase any lighting vars are on in the typepath we turn the light on in New().
/atom/New()
. = ..()
if (light_power && light_range)
update_light()
if (opacity && isturf(loc))
var/turf/T = loc
T.has_opaque_atom = TRUE // No need to recalculate it in this case, it's guaranteed to be on afterwards anyways.
// Destroy our light source so we GC correctly.
/atom/Destroy()
if (light)
+2 -4
View File
@@ -16,7 +16,7 @@
var/needs_update = FALSE
/atom/movable/lighting_overlay/New(var/atom/loc, var/no_update = FALSE)
/atom/movable/lighting_overlay/Initialize(mapload, var/no_update = FALSE)
. = ..()
verbs.Cut()
global.all_lighting_overlays += src
@@ -43,9 +43,7 @@
T.lighting_overlay = null
T.luminosity = 1
..()
return QDEL_HINT_QUEUE
return ..()
else
return QDEL_HINT_LETMELIVE
-6
View File
@@ -9,12 +9,6 @@
var/tmp/list/datum/lighting_corner/corners
var/tmp/has_opaque_atom = FALSE // Not to be confused with opacity, this will be TRUE if there's any opaque atom on the tile.
/turf/New()
. = ..()
if (opacity)
has_opaque_atom = TRUE
// Causes any affecting light sources to be queued for a visibility update, for example a door got opened.
/turf/proc/reconsider_lights()
for (var/datum/light_source/L in affecting_lights)