Lighting minor tweak (#17560)

* Atomization

* sfdsaf

---------

Co-authored-by: FluffyGhost <FluffyGhost>
This commit is contained in:
Fluffy
2023-10-12 23:19:40 +02:00
committed by GitHub
parent 0722916767
commit 43018d6504
3 changed files with 48 additions and 4 deletions

View File

@@ -17,7 +17,8 @@
transform = matrix(WORLD_ICON_SIZE / 32, 0, (WORLD_ICON_SIZE - 32) / 2, 0, WORLD_ICON_SIZE / 32, (WORLD_ICON_SIZE - 32) / 2)
#endif
/atom/movable/lighting_overlay/New()
/atom/movable/lighting_overlay/Initialize(mapload, ...)
. = ..()
SSlighting.total_lighting_overlays++
var/turf/T = loc // If this runtimes atleast we'll know what's creating overlays in things that aren't turfs.

View File

@@ -404,8 +404,9 @@
var/list/L = turfs - affecting_turfs // New turfs, add us to the affecting lights of them.
affecting_turfs += L
for (thing in L)
T = thing
for (var/turf/affected_turf as anything in L)
if(!QDELETED(affected_turf))
T = affected_turf
LAZYADD(T.affecting_lights, src)
L = affecting_turfs - turfs // Now-gone turfs, remove us from the affecting lights.

View File

@@ -0,0 +1,42 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscadd (general adding of nice things)
# rscdel (general deleting of nice things)
# imageadd
# imagedel
# maptweak
# spellcheck (typo fixes)
# experiment
# balance
# admin
# backend
# security
# refactor
#################################
# Your name.
author: FluffyGhost
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
changes:
- backend: "Lighting overlays are now initialized in Initialize instead of New."
- backend: "Corner updating for lighting now checks that the turfs are not being deleted when adding lights to the affected lights of them."