internal string PowerIndicatorString() { if (reactorRodData.Count == 0) { return(CyNukReactorBuildable.NoPoweMessage()); } return(NumberFormatter.FormatValue(GetTotalAvailablePower())); }
private void UpdateDisplayText(bool force = false) { if (!force) { if (Time.time < textDelay) { return; // Slow down the text update } textDelay = Time.time + TextDelayInterval; } for (int i = 0; i < reactorRodData.Count; i++) { SlotData item = reactorRodData[i]; if (item.InfoDisplay == null) { continue; } if (item.HasPower()) { if (i < this.MaxActiveSlots) { item.InfoDisplay.text = NumberFormatter.FormatValue(item.Charge); item.InfoDisplay.color = Color.white; } else { item.InfoDisplay.text = CyNukReactorBuildable.InactiveRodMsg(); item.InfoDisplay.color = Color.yellow; } } else { item.InfoDisplay.text = CyNukReactorBuildable.NoPoweMessage(); item.InfoDisplay.color = Color.red; } } }