Ejemplo n.º 1
0
 public void Add(MixAndVolume mixAndVolume)
 {
     Mix.Add(mixAndVolume.Mix);
     Volume = Volume + mixAndVolume.Volume;
     gasMix = gasMix + mixAndVolume.gasMix;
     gasMix.ChangeVolumeValue(mixAndVolume.gasMix.Volume);
 }
Ejemplo n.º 2
0
 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;
 }
Ejemplo n.º 3
0
 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!!!");
     }
 }
Ejemplo n.º 4
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!!!");
            }
        }
Ejemplo n.º 5
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));
        }
Ejemplo n.º 6
0
        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));
        }
Ejemplo n.º 7
0
 public void AddPipeEXTRA(Pipe pipe)
 {
     members.Add(pipe);
     pipe.pipenet = this;
     gasMix.ChangeVolumeValue(pipe.volume);
 }