From becd447d960c4abd53bfa297caec6d886d5f0eb2 Mon Sep 17 00:00:00 2001 From: D3athrow Date: Sat, 9 May 2015 14:13:45 -0500 Subject: [PATCH] Fix portables not getting processed. Simple pipes are removed properly so we dont have a list of 8000 things being iterated over every 2 seconds. --- code/ATMOSPHERICS/pipes.dm | 9 +++++++++ code/controllers/Processes/pipenet.dm | 6 ++++-- code/game/machinery/atmoalter/portable_atmospherics.dm | 2 +- html/changelogs/.all_changelog.yml | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm index 542b3f3fc44..865f57ccb85 100644 --- a/code/ATMOSPHERICS/pipes.dm +++ b/code/ATMOSPHERICS/pipes.dm @@ -12,6 +12,9 @@ // Insulated pipes #define IPIPE_COLOR_RED PIPE_COLOR_RED #define IPIPE_COLOR_BLUE "#4285F4" +/obj/machinery/atmospherics/pipe/process() + . = ..() + atmos_machines.Remove(src) /obj/machinery/atmospherics/pipe var/datum/gas_mixture/air_temporary //used when reconstructing a pipeline that broke @@ -153,7 +156,9 @@ /obj/machinery/atmospherics/pipe/simple/process() if(!parent) //This should cut back on the overhead calling build_network thousands of times per cycle . = ..() + var/dicks = (src in atmos_machines) atmos_machines.Remove(src) + if(dicks) warning("Removing [src.type] from atmos machines") /*if(!node1) parent.mingle_with_turf(loc, volume) @@ -491,7 +496,9 @@ /obj/machinery/atmospherics/pipe/manifold/process() if(!parent) . = ..() + var/dicks = (src in atmos_machines) atmos_machines.Remove(src) + if(dicks) warning("Removing [src.type] from atmos machines") /* if(!node1) parent.mingle_with_turf(loc, 70) @@ -725,7 +732,9 @@ /obj/machinery/atmospherics/pipe/manifold4w/process() if(!parent) . = ..() + var/dicks = (src in atmos_machines) atmos_machines.Remove(src) + if(dicks) warning("Removing [src.type] from atmos machines") /* if(!node1) parent.mingle_with_turf(loc, 70) diff --git a/code/controllers/Processes/pipenet.dm b/code/controllers/Processes/pipenet.dm index 60c5d8d039c..a25f51cc013 100644 --- a/code/controllers/Processes/pipenet.dm +++ b/code/controllers/Processes/pipenet.dm @@ -6,8 +6,10 @@ var/global/list/obj/machinery/atmospherics/atmos_machines = list() schedule_interval = 20 // every 2 seconds /datum/controller/process/pipenet/doWork() - for(var/obj/machinery/atmospherics/atmosmachinery in atmos_machines) - ASSERT(istype(atmosmachinery)) + //world << atmos_machines.len + for(var/obj/machinery/atmosmachinery in atmos_machines) + //world << "processing [atmosmachinery]" + ASSERT(istype(atmosmachinery) || istype(atmosmachinery, /obj/machinery/portable_atmospherics)) if(!atmosmachinery.disposed) if(atmosmachinery.process()) scheck() diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index f16f43c0027..391390cee42 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -37,7 +37,7 @@ /obj/machinery/portable_atmospherics/Destroy() del(air_contents) - atmos_machines -= src + atmos_machines.Remove(src) ..() /obj/machinery/portable_atmospherics/update_icon() diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 48f7eea3414..55b9cd26e9e 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -3221,7 +3221,7 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. - experimental: Pomf - server bomb cap raised to 7dev. Ririchiyo: - rscadd: Added the ability to link the cloning pod to the cloning console with - a multitool. [Starts disconnected by default]. It can even be connected from + a multitool. [Starts disconnected by default]. It can even be connected from a distance up to 7. 2015-05-09: Pomf123: