removes pipe construction cache (#32516)

This commit is contained in:
duncathan salt
2017-11-09 11:13:53 -06:00
committed by CitadelStationBot
parent cde4d39989
commit 3c8eef9243
3 changed files with 21 additions and 26 deletions
+9 -12
View File
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(air)
var/list/hotspots = list()
var/list/networks = list()
var/list/obj/machinery/atmos_machinery = list()
var/list/pipe_construction_generation_cache = list()
var/list/pipe_init_dirs_cache = list()
@@ -377,19 +377,16 @@ SUBSYSTEM_DEF(air)
AM.build_network()
CHECK_TICK
/datum/controller/subsystem/air/proc/get_pipe_cache(type, direction=NORTH)
if(!pipe_construction_generation_cache[type])
pipe_construction_generation_cache[type] = list()
/datum/controller/subsystem/air/proc/get_init_dirs(type, dir)
if(!pipe_init_dirs_cache[type])
pipe_init_dirs_cache[type] = list()
if(!pipe_construction_generation_cache[type]["[direction]"])
var/obj/machinery/atmospherics/cached = new type(null, FALSE, direction)
pipe_construction_generation_cache[type]["[direction]"] = cached
STOP_PROCESSING(SSmachines, cached)
STOP_PROCESSING(SSfastprocess, cached)
GLOB.machines -= cached
return pipe_construction_generation_cache[type]["[direction]"]
if(!pipe_init_dirs_cache[type]["[dir]"])
var/obj/machinery/atmospherics/temp = new type(null, FALSE, dir)
pipe_init_dirs_cache[type]["[dir]"] = temp.GetInitDirections()
qdel(temp)
return pipe_init_dirs_cache[type]["[dir]"]
#undef SSAIR_PIPENETS
#undef SSAIR_ATMOSMACHINERY