예제 #1
0
        public static void AdjustWaterSupplyToWater()
        {
            if (IgnoreChanges)
            {
                return;
            }

            WATER.Update();

            Inventory inventory = GameManager.GetInventoryComponent();

            if (inventory == null)
            {
                return;
            }

            var nonPotableWaterSupply = inventory.GetNonPotableWaterSupply();

            if (nonPotableWaterSupply != null)
            {
                nonPotableWaterSupply.m_WaterSupply.m_VolumeInLiters = WATER.ActualNonPotable;
            }

            var potableWaterSupply = inventory.GetPotableWaterSupply();

            if (potableWaterSupply != null)
            {
                potableWaterSupply.m_WaterSupply.m_VolumeInLiters = WATER.ActualPotable;
            }
        }
예제 #2
0
        //Readjusts the "game" potable water supply to match the "actual" amount of water held in containers by the player
        public static void AdjustWaterSupplyToWater()
        {
            if (IgnoreChanges)
            {
                return;
            }

            //Updates all the variables including ActualNonPotable and ActualPotable
            WATER.Update();

            Inventory inventory = GameManager.GetInventoryComponent();

            if (inventory == null)
            {
                return;
            }

            var nonPotableWaterSupply = inventory.GetNonPotableWaterSupply();

            if (nonPotableWaterSupply != null)
            {
                //sets the "game" nonpotable water supply to match the "actual" amount of nonpotable water held in containers by the player
                nonPotableWaterSupply.m_WaterSupply.m_VolumeInLiters = WATER.ActualNonPotable;
            }

            var potableWaterSupply = inventory.GetPotableWaterSupply();

            if (potableWaterSupply != null)
            {
                //sets the "game" potable water supply to match the "actual" amount of potable water held in containers by the player
                potableWaterSupply.m_WaterSupply.m_VolumeInLiters = WATER.ActualPotable;
            }
        }