Esempio n. 1
0
        public static float GetMaxCapacityWithObject(int cell, ConduitType type, out GameObject obj, bool isBridge = false)
        {
            if (type != ConduitType.Gas && type != ConduitType.Liquid)
            {
                throw new System.ArgumentException($"[Pressurized] Invalid Conduit Type given to IntegrationHelper.GetMaxCapacityAt(): {type.ToString()}  Type must be ConduitType.Gas or ConduitType.Liquid.", "type");
            }
            ConduitFlow manager     = Conduit.GetFlowManager(type);
            Pressurized pressurized = GetPressurizedAt(cell, type, isBridge);

            if (pressurized == null)
            {
                obj = null;
            }
            else
            {
                obj = pressurized.gameObject;
            }
            if (Pressurized.IsDefault(pressurized))
            {
                return(manager.MaxMass());
            }
            else
            {
                return(pressurized.Info.IncreaseMultiplier * manager.MaxMass());
            }
        }
Esempio n. 2
0
        public static float GetMaxCapacity(Pressurized pressure)
        {
            ConduitFlow manager = Conduit.GetFlowManager(pressure.ConduitType);

            if (IsDefault(pressure))
            {
                return(manager.MaxMass());
            }
            else
            {
                return(pressure.Info.IncreaseMultiplier * manager.MaxMass());
            }
        }