Exemplo n.º 1
0
 private bool TryGetFactionWithFilter(FactionRelationKind kind, IntRange minReqGoodWill, FactionDef filter, out Faction faction)
 {
     if ((from f in Find.FactionManager.AllFactions where f != Faction.OfPlayer && f.PlayerRelationKind == kind && minReqGoodWill.InRange(f.PlayerGoodwill) && f.def == filter select f).TryRandomElement(out faction))
     {
         return(true);
     }
     return(false);
 }
Exemplo n.º 2
0
 private bool TryGetFaction(FactionRelationKind kind, IntRange minReqGoodWill, out Faction faction)
 {
     if ((from f in Find.FactionManager.AllFactionsVisible where f != Faction.OfPlayer && f.PlayerRelationKind == kind && minReqGoodWill.InRange(f.PlayerGoodwill) select f).TryRandomElement(out faction))
     {
         return(true);
     }
     return(false);
 }