mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixes disposals not transferring gas to holder, creating air_contents with the wrong volume, runtime due to terrible management of shared gas_mix
Fixes one of the runtimes in #9310
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
//List of active tile overlays for this gas_mixture. Updated by check_tile_graphic()
|
||||
var/list/graphic = list()
|
||||
|
||||
/datum/gas_mixture/New(vol = CELL_VOLUME)
|
||||
volume = vol
|
||||
|
||||
//Takes a gas string and the amount of moles to adjust by. Calls update_values() if update isn't 0.
|
||||
/datum/gas_mixture/proc/adjust_gas(gasid, moles, update = 1)
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
else
|
||||
trunk.linked = src // link the pipe trunk to self
|
||||
|
||||
air_contents = new/datum/gas_mixture()
|
||||
air_contents.volume = PRESSURE_TANK_VOLUME
|
||||
air_contents = new/datum/gas_mixture(PRESSURE_TANK_VOLUME)
|
||||
update()
|
||||
|
||||
/obj/machinery/disposal/Destroy()
|
||||
@@ -411,8 +410,6 @@
|
||||
H.tomail = 1
|
||||
|
||||
|
||||
air_contents = new() // new empty gas resv.
|
||||
|
||||
sleep(10)
|
||||
if(last_sound < world.time + 1)
|
||||
playsound(src, 'sound/machines/disposalflush.ogg', 50, 0, 0)
|
||||
@@ -420,7 +417,8 @@
|
||||
sleep(5) // wait for animation to finish
|
||||
|
||||
|
||||
H.init(src) // copy the contents of disposer to holder
|
||||
H.init(src, air_contents) // copy the contents of disposer to holder
|
||||
air_contents = new(PRESSURE_TANK_VOLUME) // new empty gas resv.
|
||||
|
||||
H.start(src) // start the holder processing movement
|
||||
flushing = 0
|
||||
@@ -495,8 +493,8 @@
|
||||
|
||||
|
||||
// initialize a holder from the contents of a disposal unit
|
||||
proc/init(var/obj/machinery/disposal/D)
|
||||
gas = D.air_contents// transfer gas resv. into holder object
|
||||
proc/init(var/obj/machinery/disposal/D, var/datum/gas_mixture/flush_gas)
|
||||
gas = flush_gas// transfer gas resv. into holder object -- let's be explicit about the data this proc consumes, please.
|
||||
|
||||
//Check for any living mobs trigger hasmob.
|
||||
//hasmob effects whether the package goes to cargo or its tagged destination.
|
||||
|
||||
Reference in New Issue
Block a user