From bb813be5d0ea3f95fb3f95adbce2a9f4e6512aea Mon Sep 17 00:00:00 2001 From: ZomgPonies Date: Sun, 8 Sep 2013 14:37:32 -0400 Subject: [PATCH] Optimized round-start loading time --- code/modules/recycling/disposal.dm | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index de028bd2967..475d7324913 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -27,18 +27,23 @@ // find the attached trunk (if present) and init gas resvr. New() ..() - spawn(5) - trunk = locate() in src.loc - if(!trunk) - mode = 0 - flush = 0 - else - trunk.linked = src // link the pipe trunk to self + trunk = locate() in src.loc + if(!trunk) + mode = 0 + flush = 0 + else + trunk.linked = src // link the pipe trunk to self - air_contents = new/datum/gas_mixture() - //gas.volume = 1.05 * CELLSTANDARD - update() + air_contents = new/datum/gas_mixture() + //gas.volume = 1.05 * CELLSTANDARD + update() + initialize() //this will remove around 5kpa from a turf, add it to the disposal air and then add it back to the turf, basically it spawns air depending on the turf air. + var/atom/L = loc + var/datum/gas_mixture/env = L.return_air() + var/datum/gas_mixture/removed = env.remove(SEND_PRESSURE) + air_contents.merge(removed) + env.merge(removed) // attack by item places it in to disposal attackby(var/obj/item/I, var/mob/user)