public override AcceptanceReport CanAccept()
 {
     foreach (Pawn allMapsCaravansAndTravelingTransportPods_Alive_Colonist in PawnsFinder.AllMapsCaravansAndTravelingTransportPods_Alive_Colonists)
     {
         if (CanPawnAccept(allMapsCaravansAndTravelingTransportPods_Alive_Colonist))
         {
             return(true);
         }
     }
     return(new AcceptanceReport("QuestNoColonistWithTitle".Translate(minimumTitle.GetLabelCapForBothGenders())));
 }
コード例 #2
0
        public override IEnumerable <StatDrawEntry> SpecialDisplayStats()
        {
            foreach (StatDrawEntry item in base.SpecialDisplayStats())
            {
                yield return(item);
            }
            RoyalTitleDef royalTitleDef = (from t in DefDatabase <FactionDef> .AllDefsListForReading.SelectMany((FactionDef f) => f.RoyalTitlesAwardableInSeniorityOrderForReading)
                                           where t.requiredApparel != null && t.requiredApparel.Any((RoyalTitleDef.ApparelRequirement req) => req.ApparelMeetsRequirement(def, allowUnmatched: false))
                                           orderby t.seniority descending
                                           select t).FirstOrDefault();

            if (royalTitleDef != null)
            {
                yield return(new StatDrawEntry(StatCategoryDefOf.Apparel, "Stat_Thing_Apparel_MaxSatisfiedTitle".Translate(), royalTitleDef.GetLabelCapForBothGenders(), "Stat_Thing_Apparel_MaxSatisfiedTitle_Desc".Translate(), 2752, null, new Dialog_InfoCard.Hyperlink[1]
                {
                    new Dialog_InfoCard.Hyperlink(royalTitleDef)
                }));
            }
        }
コード例 #3
0
        public override IEnumerable <StatDrawEntry> SpecialDisplayStats()
        {
            foreach (Faction allFaction in Find.FactionManager.AllFactions)
            {
                RoyalTitleDef minTitleToUse = ThingRequiringRoyalPermissionUtility.GetMinTitleToUse(parent.def, allFaction);
                if (minTitleToUse != null)
                {
                    yield return(new StatDrawEntry(StatCategoryDefOf.BasicsNonPawnImportant, "Stat_Thing_MinimumRoyalTitle_Name".Translate(allFaction.Named("FACTION")).Resolve(), minTitleToUse.GetLabelCapForBothGenders(), "Stat_Thing_Weapon_MinimumRoyalTitle_Desc".Translate(allFaction.Named("FACTION")).Resolve(), 2100));
                }
            }
            if (traits.NullOrEmpty())
            {
                yield break;
            }
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine("Stat_Thing_PersonaWeaponTrait_Desc".Translate());
            stringBuilder.AppendLine();
            for (int i = 0; i < traits.Count; i++)
            {
                stringBuilder.AppendLine(traits[i].LabelCap + ": " + traits[i].description);
                if (i < traits.Count - 1)
                {
                    stringBuilder.AppendLine();
                }
            }
            yield return(new StatDrawEntry(StatCategoryDefOf.Weapon, "Stat_Thing_PersonaWeaponTrait_Label".Translate(), traits.Select((WeaponTraitDef x) => x.label).ToCommaList().CapitalizeFirst(), stringBuilder.ToString(), 5404));
        }
コード例 #4
0
 public override IEnumerable <StatDrawEntry> SpecialDisplayStats()
 {
     foreach (Faction allFaction in Find.FactionManager.AllFactions)
     {
         RoyalTitleDef minTitleToUse = ThingRequiringRoyalPermissionUtility.GetMinTitleToUse(parent.def, allFaction);
         if (minTitleToUse != null)
         {
             yield return(new StatDrawEntry(StatCategoryDefOf.BasicsNonPawnImportant, "Stat_Thing_MinimumRoyalTitle_Name".Translate(allFaction.Named("FACTION")).Resolve(), minTitleToUse.GetLabelCapForBothGenders(), "Stat_Thing_Weapon_MinimumRoyalTitle_Desc".Translate(allFaction.Named("FACTION")).Resolve(), 2100));
         }
     }
 }
コード例 #5
0
 internal IEnumerable <StatDrawEntry> SpecialDisplayStats()
 {
     if (joy > 0f)
     {
         StatCategoryDef category = ((drugCategory != 0) ? StatCategoryDefOf.Drug : StatCategoryDefOf.Basics);
         yield return(new StatDrawEntry(category, "Joy".Translate(), joy.ToStringPercent("F0") + " (" + JoyKind.label + ")", "Stat_Thing_Ingestible_Joy_Desc".Translate(), 4751));
     }
     if (HumanEdible)
     {
         RoyalTitleDef royalTitleDef = MaxSatisfiedTitle();
         if (royalTitleDef != null)
         {
             yield return(new StatDrawEntry(StatCategoryDefOf.Basics, "Stat_Thing_Ingestible_MaxSatisfiedTitle".Translate(), royalTitleDef.GetLabelCapForBothGenders(), "Stat_Thing_Ingestible_MaxSatisfiedTitle_Desc".Translate(), 4752));
         }
     }
     if (outcomeDoers == null)
     {
         yield break;
     }
     for (int i = 0; i < outcomeDoers.Count; i++)
     {
         foreach (StatDrawEntry item in outcomeDoers[i].SpecialDisplayStats(parent))
         {
             yield return(item);
         }
     }
 }