Merge pull request #11165 from VOREStation/Arokha/lightport

Small light optimizations
This commit is contained in:
Aronai Sieyes
2021-07-20 19:01:54 -04:00
committed by Chompstation Bot
parent 4a6c523aa6
commit ab88b2420d
2 changed files with 7 additions and 1 deletions

View File

@@ -182,9 +182,12 @@
if(!current_holder)
return
var/atom/movable/light_source = GET_LIGHT_SOURCE
. = list()
for(var/turf/lit_turf in view(lumcount_range, get_turf(light_source)))
lit_turf.dynamic_lumcount += lum_power
LAZYADD(affected_turfs, lit_turf)
. += lit_turf
if(length(.))
affected_turfs = .
///Clears the old affected turfs and populates the new ones.