let's play the optimization game featuring lighting (#12310)

* debug proc

* kinda quirky

* let's play the lighting game

* let's play the macro game

* let's play the refactor game

* let's play the optimization game

* let's play the optimization game x2

* yeehaw

* e

* let's play the memory game

* fix

* lighting fix

* sanitization and checks

* mh

* hotkeys fix

* ok
This commit is contained in:
kevinz000
2020-05-23 13:47:42 -07:00
committed by GitHub
parent a6d7170d5b
commit e9068f05eb
12 changed files with 164 additions and 133 deletions
+11 -4
View File
@@ -237,18 +237,25 @@
return //nothing's changed
var/list/datum/lighting_corner/corners = list()
var/datum/lighting_corner/C
var/list/turf/turfs = list()
var/thing
var/datum/lighting_corner/C
var/turf/T
if (source_turf)
var/oldlum = source_turf.luminosity
source_turf.luminosity = CEILING(light_range, 1)
for(T in view(CEILING(light_range, 1), source_turf))
for (thing in T.get_corners(source_turf))
C = thing
corners[C] = 0
turfs += T
if(!IS_DYNAMIC_LIGHTING(T) && !T.light_sources)
continue
if(!T.lighting_corners_initialised)
T.generate_missing_corners()
if(T.has_opaque_atom)
continue
corners[T.lc_topright] = 0
corners[T.lc_bottomright] = 0
corners[T.lc_bottomleft] = 0
corners[T.lc_topleft] = 0
source_turf.luminosity = oldlum
LAZYINITLIST(affecting_turfs)