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.

This commit is contained in:
D3athrow
2015-05-09 14:13:45 -05:00
parent 9d5911b404
commit becd447d96
4 changed files with 15 additions and 4 deletions

View File

@@ -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)

View File

@@ -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()

View File

@@ -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()

View File

@@ -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 <strike>dis</strike>connected by default]. It can even be connected from
a distance up to 7.
2015-05-09:
Pomf123: