Skip to content

Instantly share code, notes, and snippets.

@mloc
Created March 15, 2012 21:24
Show Gist options
  • Save mloc/2047067 to your computer and use it in GitHub Desktop.
Save mloc/2047067 to your computer and use it in GitHub Desktop.
process()
..()
injecting = 0
if(!on)
return 0
if(air_contents.temperature > 0)
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
AirflowRepel(loc,removed.return_pressure())
loc.assume_air(removed)
if(network)
network.update = 1
return 1
proc/inject()
if(on || injecting)
return 0
injecting = 1
if(air_contents.temperature > 0)
var/transfer_moles = (air_contents.return_pressure())*volume_rate/(air_contents.temperature * R_IDEAL_GAS_EQUATION)
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
if(istype(removed)) //Dunno.
AirflowRepel(loc,removed.return_pressure())
loc.assume_air(removed)
network.update = 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment