Make req_[one_]access lazy

This commit is contained in:
Aronai Sieyes
2021-05-31 12:40:10 -04:00
parent 7aa86700dd
commit e2c32cae91
12 changed files with 56 additions and 62 deletions

View File

@@ -200,10 +200,11 @@ SUBSYSTEM_DEF(supply)
else if(islist(SP.access) && SP.one_access)
var/list/L = SP.access // access var is a plain var, we need a list
A.req_one_access = L.Copy()
A.req_access.Cut()
LAZYCLEARLIST(A.req_access)
else if(islist(SP.access) && !SP.one_access)
var/list/L = SP.access
A.req_access = L.Copy()
LAZYCLEARLIST(A.req_one_access)
else
log_debug("<span class='danger'>Supply pack with invalid access restriction [SP.access] encountered!</span>")