private string nextPowerFunc() { if (this.hostStation.TechLevel >= 3) { return(Localizer.Format("#CNC_GroundStationBuild_DSNpowerNil"));//DSN Power: Nil } else { double power = CNCSettings.Instance.GroundStationUpgradeablePowers[this.hostStation.TechLevel]; return(Localizer.Format("#CNC_GroundStationBuild_DSNpower") + string.Format(" {0:0.00}", UIUtils.RoundToNearestMetricFactor(power, 2)));//DSN Power: {0:0.00} } }
private string currentPowerFunc() { double power = this.hostStation.TechLevel <= 0 ? 0.0 : CNCSettings.Instance.GroundStationUpgradeablePowers[this.hostStation.TechLevel - 1]; return(Localizer.Format("#CNC_GroundStationBuild_DSNpower") + string.Format(" {0:0.00}", UIUtils.RoundToNearestMetricFactor(power, 2)));//DSN Power: {0:0.00} }
private DialogGUIHorizontalLayout createFrequencyRow(short freq) { CNCCommNetVessel cncVessel = (CNCCommNetVessel)this.hostVessel.Connection; Color color = Constellation.getColor(freq); string name = Constellation.getName(freq); DialogGUIImage colorImage = new DialogGUIImage(new Vector2(32, 32), Vector2.one, color, colorTexture); DialogGUILabel nameLabel = new DialogGUILabel(name, 170, 12); DialogGUILabel eachFreqLabel = new DialogGUILabel(string.Format("(<color={0}>{1}</color>)", UIUtils.colorToHex(color), freq), 70, 12); DialogGUILabel freqPowerLabel = new DialogGUILabel(string.Format("Combined Comm Power: {0}", UIUtils.RoundToNearestMetricFactor(cncVessel.getMaxComPower(freq), 2)), 220, 12); return(new DialogGUIHorizontalLayout(true, false, 0, new RectOffset(), TextAnchor.MiddleLeft, new DialogGUIBase[] { colorImage, new DialogGUISpace(20), nameLabel, eachFreqLabel, freqPowerLabel })); }