public override IEnumerable <Gizmo> GetGizmos() { foreach (Gizmo c in base.GetGizmos()) { yield return(c); } foreach (Gizmo c2 in ArchotechUtility.ShipStartupGizmos(this)) { yield return(c2); } Command_Action launch = new Command_Action(); launch.action = new Action(this.TryLaunch); launch.defaultLabel = "GR_ArchotechProjectLaunch".Translate(); launch.defaultDesc = "GR_ArchotechProjectLaunchDesc".Translate(); if (!this.CanLaunchNow) { launch.Disable(ArchotechUtility.LaunchFailReasons(this).First <string>()); } if (ShipCountdown.CountingDown) { launch.Disable(null); } launch.hotKey = KeyBindingDefOf.Misc1; launch.icon = ContentFinder <Texture2D> .Get("ui/commands/GR_AwakenArchotech", true); yield return(launch); }
public void ShowReport() { StringBuilder stringBuilder = new StringBuilder(); if (!ArchotechUtility.LaunchFailReasons((Building)this.parent).Any <string>()) { stringBuilder.AppendLine("GR_ArchotechReportCanLaunch".Translate()); } else { stringBuilder.AppendLine("GR_ArchotechReportCannotLaunch".Translate()); foreach (string current in ArchotechUtility.LaunchFailReasons((Building)this.parent)) { stringBuilder.AppendLine(); stringBuilder.AppendLine(current); } } Dialog_MessageBox window = new Dialog_MessageBox(stringBuilder.ToString(), null, null, null, null, null, false, null, null); Find.WindowStack.Add(window); }