Corrects the spelling of MINIMUM_MOLES_TO_PUMP.

This commit is contained in:
PsiOmega
2015-04-03 09:23:34 +02:00
parent 4326b8c5d8
commit fd8e6f9f32

View File

@@ -69,7 +69,7 @@
//Gas 'pumping' proc for the case where the gas flow is passive and driven entirely by pressure differences (but still one-way).
/proc/pump_gas_passive(var/obj/machinery/M, var/datum/gas_mixture/source, var/datum/gas_mixture/sink, var/transfer_moles = null)
if (source.total_moles < MINUMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
if (source.total_moles < MINIMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
return -1
if (isnull(transfer_moles))
@@ -80,7 +80,7 @@
var/equalize_moles = calculate_equalize_moles(source, sink)
transfer_moles = min(transfer_moles, equalize_moles)
if (transfer_moles < MINUMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
if (transfer_moles < MINIMUM_MOLES_TO_PUMP) //if we cant transfer enough gas just stop to avoid further processing
return -1
//Update flow rate meter
@@ -424,25 +424,25 @@
return specific_power
//Calculates the APPROXIMATE amount of moles that would need to be transferred to change the pressure of sink by pressure_delta
//If set, sink_volume_mod adjusts the effective output volume used in the calculation. This is useful when the output gas_mixture is
//If set, sink_volume_mod adjusts the effective output volume used in the calculation. This is useful when the output gas_mixture is
//part of a pipenetwork, and so it's volume isn't representative of the actual volume since the gas will be shared across the pipenetwork when it processes.
/proc/calculate_transfer_moles(datum/gas_mixture/source, datum/gas_mixture/sink, var/pressure_delta, var/sink_volume_mod=0)
//Make the approximation that the sink temperature is unchanged after transferring gas
var/air_temperature = (sink.temperature > 0)? sink.temperature : source.temperature
var/output_volume = (sink.volume * sink.group_multiplier) + sink_volume_mod
//get the number of moles that would have to be transfered to bring sink to the target pressure
return pressure_delta*output_volume/(air_temperature * R_IDEAL_GAS_EQUATION)
//Calculates the APPROXIMATE amount of moles that would need to be transferred to bring source and sink to the same pressure
/proc/calculate_equalize_moles(datum/gas_mixture/source, datum/gas_mixture/sink)
if(source.temperature == 0) return 0
//Make the approximation that the sink temperature is unchanged after transferring gas
var/source_volume = source.volume * source.group_multiplier
var/sink_volume = sink.volume * sink.group_multiplier
var/source_pressure = source.return_pressure()
var/sink_pressure = sink.return_pressure()
return (source_pressure - sink_pressure)/(R_IDEAL_GAS_EQUATION * (source.temperature/source_volume + sink.temperature/sink_volume))