Пример #1
0
        internal static void UpdateCapacityInfo(Panel_PickWater panel)
        {
            WaterSource waterSource = GetWaterSource(panel);

            if (!waterSource)
            {
                Debug.LogError("UpdateCapacityInfo: Could not find WaterSource");
                return;
            }

            labelCapacityInfo.text = GetWaterInfo(LiquidQuality.Potable) + "    " +
                                     GetWaterInfo(LiquidQuality.NonPotable) + "    " +
                                     Localization.Get("GAMEPLAY_Empty") + ": " + WaterUtils.FormatWaterAmount(0) + "/" + WaterUtils.FormatWaterAmount(Water.GetRemainingCapacityEmpty());

            labelNoCapacityWarning.gameObject.SetActive(Water.GetRemainingCapacityEmpty() == 0 && Water.GetRemainingCapacity(waterSource.GetQuality()) == 0);
        }
Пример #2
0
 private static string GetWaterInfo(LiquidQuality quality)
 {
     return(Localization.Get("GAMEPLAY_Water" + quality.ToString()) + ": " + WaterUtils.FormatWaterAmount(Water.GetActual(quality)) + "/" + WaterUtils.FormatWaterAmount(Water.GetCapacity(quality)));
 }