Ejemplo n.º 1
0
 public FluidManagerV2()
 {
     this.inputTank1           = new MachineFluidTank(0);
     this.inputTank2           = new MachineFluidTank(0);
     this.outputTank           = new MachineFluidTank(0);
     this.requiresUpdate       = false;
     this.fluidInteractionType = Enums.FluidInteractionType.None;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="Capacity"></param>
        /// <param name="OnlyOutput"></param>
        /// <param name="AllowDoubleInput">Can both input tanks store the same Fluid?</param>
        public FluidManagerV2(int Capacity, bool OnlyOutput, Enums.FluidInteractionType LiquidInteractionType, bool AllowDoubleInput = false, bool OnlyInput = false, int NumberOfInputTanks = 2)
        {
            if (OnlyOutput)
            {
                this.outputTank = new MachineFluidTank(Capacity);
                this.inputTank1 = new MachineFluidTank(0);
                this.inputTank2 = new MachineFluidTank(0);
            }
            else if (OnlyInput)
            {
                if (this.allowDoubleInput)
                {
                    this.outputTank = new MachineFluidTank(0);
                    this.inputTank1 = new MachineFluidTank(Capacity);
                    this.inputTank2 = new MachineFluidTank(Capacity);
                }
                if (NumberOfInputTanks >= 2)
                {
                    this.outputTank = new MachineFluidTank(0);
                    this.inputTank1 = new MachineFluidTank(Capacity);
                    this.inputTank2 = new MachineFluidTank(Capacity);
                }
                else if (NumberOfInputTanks == 1)
                {
                    this.outputTank = new MachineFluidTank(0);
                    this.inputTank1 = new MachineFluidTank(Capacity);
                    this.inputTank2 = new MachineFluidTank(0);
                }
            }
            else
            {
                this.outputTank = new MachineFluidTank(Capacity);
                if (NumberOfInputTanks == 0)
                {
                    this.inputTank1 = new MachineFluidTank(0);
                    this.inputTank2 = new MachineFluidTank(0);
                }
                else if (NumberOfInputTanks == 1)
                {
                    this.inputTank1 = new MachineFluidTank(Capacity);
                    this.inputTank2 = new MachineFluidTank(0);
                }
                else if (NumberOfInputTanks >= 2)
                {
                    this.inputTank1 = new MachineFluidTank(Capacity);
                    this.inputTank2 = new MachineFluidTank(Capacity);
                }
            }
            this.onlyOutput           = OnlyOutput;
            this.allowDoubleInput     = AllowDoubleInput;
            this.requiresUpdate       = false;
            this.fluidInteractionType = LiquidInteractionType;

            this.onlyInput          = OnlyInput;
            this.numberOfInputTanks = NumberOfInputTanks;
        }