mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Merge pull request #24762 from Cyberboss/IWillMurderTheNextPersonToDefineNew
Fixes lighting runtimes
This commit is contained in:
+7
-2
@@ -60,8 +60,13 @@
|
||||
if(color)
|
||||
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
if(luminosity)
|
||||
light = new(src)
|
||||
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.
|
||||
|
||||
|
||||
/atom/Destroy()
|
||||
if(alternate_appearances)
|
||||
|
||||
@@ -28,6 +28,12 @@
|
||||
if(requires_activation)
|
||||
SSair.add_to_active(src)
|
||||
|
||||
if (light_power && light_range)
|
||||
update_light()
|
||||
|
||||
if (opacity)
|
||||
has_opaque_atom = TRUE
|
||||
|
||||
/turf/open/space/attack_ghost(mob/dead/observer/user)
|
||||
if(destination_z)
|
||||
var/turf/T = locate(destination_x, destination_y, destination_z)
|
||||
|
||||
@@ -48,6 +48,12 @@
|
||||
CalculateAdjacentTurfs()
|
||||
SSair.add_to_active(src)
|
||||
|
||||
if (light_power && light_range)
|
||||
update_light()
|
||||
|
||||
if (opacity)
|
||||
has_opaque_atom = TRUE
|
||||
|
||||
/turf/proc/Initalize_Atmos(times_fired)
|
||||
CalculateAdjacentTurfs()
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user