Make turf obfuscation lists lazy

This commit is contained in:
Arokha Sieyes
2018-02-17 21:55:59 -06:00
committed by Leshana
parent eabec5fb1e
commit 21ce4159b7
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -100,6 +100,7 @@
for(var/turf in visRemoved)
var/turf/t = turf
if(obscuredTurfs[t])
LAZYINITLIST(t.obfuscations)
if(!t.obfuscations[obfuscation.type])
var/image/ob_image = image(obfuscation.icon, t, obfuscation.icon_state, OBFUSCATION_LAYER)
ob_image.plane = PLANE_FULLSCREEN
@@ -141,6 +142,7 @@
for(var/turf in obscuredTurfs)
var/turf/t = turf
LAZYINITLIST(t.obfuscations)
if(!t.obfuscations[obfuscation.type])
var/image/ob_image = image(obfuscation.icon, t, obfuscation.icon_state, OBFUSCATION_LAYER)
ob_image.plane = PLANE_FULLSCREEN
+1 -1
View File
@@ -8,7 +8,7 @@
VN.updateVisibility(A, opacity_check)
/turf
var/list/image/obfuscations = new()
var/list/image/obfuscations
/turf/drain_power()
return -1