Reduces Round-start Atmos Processing: Full Charge Disposals

This commit is contained in:
Fox-McCloud
2015-10-17 19:53:21 -04:00
parent bd016494aa
commit f08062f566
+22 -10
View File
@@ -29,18 +29,21 @@
// find the attached trunk (if present) and init gas resvr.
/obj/machinery/disposal/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_check()
air_contents = new/datum/gas_mixture()
//gas.volume = 1.05 * CELLSTANDARD
update()
air_contents = new/datum/gas_mixture()
//gas.volume = 1.05 * CELLSTANDARD
update()
/obj/machinery/disposal/proc/trunk_check()
trunk = locate() in src.loc
if(!trunk)
mode = 0
flush = 0
else
mode = initial(mode)
flush = initial(flush)
trunk.linked = src // link the pipe trunk to self
/obj/machinery/disposal/Destroy()
eject()
@@ -48,6 +51,15 @@
trunk.linked = null
return ..()
/obj/machinery/disposal/initialize()
// this will get a copy of the air turf and take a SEND PRESSURE amount of air from it
var/atom/L = loc
var/datum/gas_mixture/env = new
env.copy_from(L.return_air())
var/datum/gas_mixture/removed = env.remove(SEND_PRESSURE + 1)
air_contents.merge(removed)
trunk_check()
// attack by item places it in to disposal
/obj/machinery/disposal/attackby(var/obj/item/I, var/mob/user, params)
if(stat & BROKEN || !I || !user || ((I.flags & NODROP) && !istype(I, /obj/item/weapon/storage/bag/trash/cyborg)))