Make two lists lazy (#3435)

Makes the accessories list on uniforms and the shockedby list on doors lazy, as well as reduces the number of add_overlay() calls by airlocks.
This commit is contained in:
Lohikar
2017-09-17 09:47:21 -06:00
committed by Erki
parent e7ff0b1e7e
commit 5121dd7b4d
10 changed files with 32 additions and 32 deletions
+1 -1
View File
@@ -375,7 +375,7 @@ var/list/global/slot_flags_enumeration = list(
H << "<span class='warning'>You need a jumpsuit before you can attach this [name].</span>"
return 0
var/obj/item/clothing/under/uniform = H.w_uniform
if(uniform.accessories.len && !uniform.can_attach_accessory(src))
if(LAZYLEN(uniform.accessories) && !uniform.can_attach_accessory(src))
if (!disable_warning)
H << "<span class='warning'>You already have an accessory of this type attached to your [uniform].</span>"
return 0