internal static void UpdateCapacityInfo(Panel_PickWater panel) { WaterSource waterSource = GetWaterSource(panel); if (!waterSource) { Implementation.LogError("UpdateCapacityInfo: Could not find WaterSource"); return; } labelCapacityInfo.text = GetWaterInfo(LiquidQuality.Potable) + " " + GetWaterInfo(LiquidQuality.NonPotable) + " " + Localization.Get("GAMEPLAY_BWM_Empty") + ": " + WaterUtils.FormatWaterAmountWithUnits(Water.GetRemainingCapacityEmpty()); labelNoCapacityWarning.gameObject.SetActive(Water.GetRemainingCapacityEmpty() == 0 && Water.GetRemainingCapacity(waterSource.GetQuality()) == 0); }
private static string GetWaterInfo(LiquidQuality quality) { return(Localization.Get("GAMEPLAY_Water" + quality.ToString()) + ": " + WaterUtils.FormatWaterAmount(Water.GetActual(quality)) + "/" + WaterUtils.FormatWaterAmountWithUnits(Water.GetCapacity(quality))); }