Beispiel #1
0
        public override IEnumerable <Gizmo> GetGizmos()
        {
            foreach (Gizmo gizmo in base.GetGizmos())
            {
                yield return(gizmo);
            }

            if (Faction == Faction.OfPlayer)
            {
                yield return(new Command_Action
                {
                    defaultLabel = "ReligiousBuilgingAssigner_AssignBuildings".Translate(),
                    icon = ContentFinder <Texture2D> .Get("Things/Symbols/AssignReligion", true),
                    defaultDesc = "ReligiousBuilgingAssigner_AssignBuildingsDesc".Translate(),
                    action = delegate
                    {
                        if (AvaliableToAssign)
                        {
                            ReligiousBuildingAssignerUtility.SelectChild(this);
                            LessonAutoActivator.TeachOpportunity(MiscDefOf.HolyBuildingBinding, OpportunityType.GoodToKnow);
                        }
                        else
                        {
                            Messages.Message("ReligiousBuilgingAssigner_BuildingIsNotCompleteToAssign".Translate(), MessageTypeDefOf.NeutralEvent);
                        }
                    },
                    hotKey = KeyBindingDefOf.Misc4
                });
            }
        }
        public override IEnumerable <Gizmo> GetGizmos()
        {
            foreach (Gizmo gizmo in base.GetGizmos())
            {
                yield return(gizmo);
            }

            if (Faction == Faction.OfPlayer)
            {
                yield return(new Command_Action
                {
                    defaultLabel = "ReligiousBuilgingAssigner_AssignBuildings".Translate(),
                    icon = ContentFinder <Texture2D> .Get("Things/Symbols/AssignReligion", true),
                    defaultDesc = "ReligiousBuilgingAssigner_AssignBuildingsDesc".Translate(),
                    action = delegate
                    {
                        ReligiousBuildingAssignerUtility.SelectChild(this);
                    },
                    hotKey = KeyBindingDefOf.Misc4
                });
            }
        }