public void AddGas(AtmosGasses gas, float amount) { if (state != AtmosStates.Blocked) { atmosContainer.AddGas(gas, amount); state = AtmosStates.Active; } }
bool IsFiltered(AtmosGasses gas) { switch (gas) { case AtmosGasses.Oxygen: return(filterOxygen); case AtmosGasses.Nitrogen: return(filterNitrogen); case AtmosGasses.CarbonDioxide: return(filterCarbonDioxide); case AtmosGasses.Plasma: return(filterPlasma); } return(false); }
public void RemoveGas(AtmosGasses gas, float amount) { gasses[(int)gas] = Mathf.Max(gasses[(int)gas] - amount, 0); }
public void AddGas(AtmosGasses gas, float amount) { gasses[(int)gas] = Mathf.Max(gasses[(int)gas] + amount, 0); }
public float GetGas(AtmosGasses index) { return(gasses[(int)index]); }
public float GetPartialPressure(AtmosGasses gas) { return((gasses[(int)gas] * Gas.gasConstant * temperature) / Volume / 1000f); }
public float GetPartialPressure(AtmosGasses gas) { return(atmosContainer.GetPartialPressure(gas)); }
// Should be moved to the Atmos editor in the future public void SetAddGas(AtmosGasses gas) { gasToAdd = gas; }