mirror of
https://github.com/CHOMPstation/CHOMPstation.git
synced 2026-08-27 14:06:43 +01:00
Converts area.all_doors list to be lazily instantiated as a simple example of using the lazy list macros.
This commit is contained in:
@@ -48,7 +48,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
var/obj/machinery/power/apc/apc = null
|
||||
var/no_air = null
|
||||
// var/list/lights // list of all lights on this area
|
||||
var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
|
||||
var/list/all_doors = null //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
|
||||
var/firedoors_closed = 0
|
||||
var/list/ambience = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg','sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg','sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg','sound/ambience/ambigen8.ogg','sound/ambience/ambigen9.ogg','sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg','sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
|
||||
var/list/forced_ambience = null
|
||||
|
||||
@@ -75,6 +75,8 @@
|
||||
/area/proc/firedoors_close()
|
||||
if(!firedoors_closed)
|
||||
firedoors_closed = TRUE
|
||||
if(!all_doors)
|
||||
return
|
||||
for(var/obj/machinery/door/firedoor/E in all_doors)
|
||||
if(!E.blocked)
|
||||
if(E.operating)
|
||||
@@ -87,6 +89,8 @@
|
||||
/area/proc/firedoors_open()
|
||||
if(firedoors_closed)
|
||||
firedoors_closed = FALSE
|
||||
if(!all_doors)
|
||||
return
|
||||
for(var/obj/machinery/door/firedoor/E in all_doors)
|
||||
if(!E.blocked)
|
||||
if(E.operating)
|
||||
|
||||
Reference in New Issue
Block a user