예제 #1
0
 public static IEnumerable <Rule> RulesForPawn(string pawnSymbol, Pawn pawn, Dictionary <string, string> constants = null)
 {
     if (pawn == null)
     {
         Log.ErrorOnce(string.Format("Tried to insert rule {0} for null pawn", pawnSymbol), 16015097, false);
         return(Enumerable.Empty <Rule>());
     }
     return(GrammarUtility.RulesForPawn(pawnSymbol, pawn.Name, (pawn.story == null) ? null : pawn.story.Title, pawn.kindDef, pawn.gender, pawn.Faction, constants));
 }
예제 #2
0
 public static IEnumerable <Rule> RulesForPawn(string prefix, Pawn pawn, Dictionary <string, string> constants = null)
 {
     if (pawn == null)
     {
         Log.ErrorOnce(string.Format("Tried to insert rule {0} for null pawn", prefix), 16015097);
         return(Enumerable.Empty <Rule>());
     }
     if (pawn.RaceProps.Humanlike)
     {
         return(GrammarUtility.RulesForPawn(prefix, pawn.Name, pawn.kindDef, pawn.gender, pawn.Faction, constants));
     }
     return(GrammarUtility.RulesForPawn(prefix, null, pawn.kindDef, pawn.gender, pawn.Faction, constants));
 }