public void Add(MixAndVolume mixAndVolume) { Mix.Add(mixAndVolume.Mix); Volume = Volume + mixAndVolume.Volume; gasMix = gasMix + mixAndVolume.gasMix; gasMix.ChangeVolumeValue(mixAndVolume.gasMix.Volume); }
public void Divide(float DivideAmount) { if (DivideAmount == 0) { Logger.LogError(" divide by 0 in Divide"); } Mix.Divide(DivideAmount); gasMix = gasMix / DivideAmount; gasMix.ChangeVolumeValue(gasMix.Volume - (gasMix.Volume / DivideAmount)); Volume = Volume / DivideAmount; }
public void Divide(float DivideAmount) { Mix.Divide(DivideAmount); gasMix = gasMix / DivideAmount; gasMix.ChangeVolumeValue(gasMix.Volume - (gasMix.Volume / DivideAmount)); Volume = Volume / DivideAmount; if (gasMix.Gases.Any(x => x < 0)) { Logger.Log("0!!!"); } }
public void Add(MixAndVolume mixAndVolume) { Mix.Add(mixAndVolume.Mix); Volume = Volume + mixAndVolume.Volume; gasMix = gasMix + mixAndVolume.gasMix; gasMix.ChangeVolumeValue(mixAndVolume.gasMix.Volume); if (gasMix.Gases.Any(x => x < 0)) { Logger.Log("0!!!"); } }
public Tuple <ReagentMix, GasMix> Take(MixAndVolume InmixAndVolume, bool removeVolume = true) { if (InmixAndVolume.Volume == 0) { Logger.LogError(" divide by 0 in Take "); } float Percentage = Volume / InmixAndVolume.Volume; var ReturnMix = Mix.Take(Mix.Total * Percentage); if (removeVolume) { gasMix.ChangeVolumeValue(-InmixAndVolume.gasMix.Volume); Volume = Volume - InmixAndVolume.Volume; } var ReturnGasMix = gasMix.RemoveVolume(InmixAndVolume.gasMix.Volume); return(new Tuple <ReagentMix, GasMix>(ReturnMix, ReturnGasMix)); }
public Tuple <ReagentMix, GasMix> Take(MixAndVolume InmixAndVolume, bool removeVolume = true) { float Percentage = Volume / InmixAndVolume.Volume; var ReturnMix = Mix.Take(Mix.Total * Percentage); if (removeVolume) { gasMix.ChangeVolumeValue(-InmixAndVolume.gasMix.Volume); Volume = Volume - InmixAndVolume.Volume; } var ReturnGasMix = gasMix.RemoveVolume(InmixAndVolume.gasMix.Volume); if (gasMix.Gases.Any(x => x < 0)) { Logger.Log("0!!!"); } return(new Tuple <ReagentMix, GasMix>(ReturnMix, ReturnGasMix)); }
public void AddPipeEXTRA(Pipe pipe) { members.Add(pipe); pipe.pipenet = this; gasMix.ChangeVolumeValue(pipe.volume); }