public override IEnumerable <Gizmo> GetGizmos() { foreach (Gizmo c in base.GetGizmos()) { yield return(c); } if (this.Faction == Faction.OfPlayer) { if (this.selectedGenome == null) { yield return(GenomeListSetupUtility.SetGenomeListCommand(this, this.Map)); } else { if (hasAsked || progress == 0f) { yield return(GenomeListSetupUtility.SetGenomeListCommand(this, this.Map)); } else { Command_Action command_Action = new Command_Action(); command_Action.defaultDesc = "GR_SelectGenomeToHarvestDesc".Translate(); command_Action.defaultLabel = "GR_SelectGenomeToHarvest".Translate(); command_Action.icon = ContentFinder <Texture2D> .Get("Things/Item/GR_geneticmaterialswhite", true); command_Action.hotKey = KeyBindingDefOf.Misc1; command_Action.action = delegate { Messages.Message("GR_AreYouSureDNA".Translate(), this, MessageTypeDefOf.NeutralEvent); hasAsked = true; }; yield return(command_Action); } } if (this.selectedGenome != null) { yield return(GenomeListSetupUtility.SetAnimalListCommand(this, this.Map, this.selectedGenome)); if (Prefs.DevMode) { Command_Action command_Action = new Command_Action(); command_Action.defaultLabel = "DEBUG: Finish DNA progress"; command_Action.action = delegate { this.progress = 1; }; yield return(command_Action); } } } }
public override IEnumerable <Gizmo> GetGizmos() { foreach (Gizmo c in base.GetGizmos()) { yield return(c); } yield return(GenomeListSetupUtility.SetParagonListCommand(this, this.Map)); if (Prefs.DevMode && this.progress != -1) { Command_Action command_Action2 = new Command_Action(); command_Action2.defaultLabel = "DEBUG: Finish work"; command_Action2.action = delegate { this.progress = 1; }; yield return(command_Action2); } }