Exemplo n.º 1
0
 static bool Prefix(TaleDef def, params object[] args)
 {
     //Prevent the recording of birth if both parents are animals to prevent unnecessary tales that keep global pawns from being garbage collected if they are used as art.
     return(!QOLMod.preventAnimalFamilies() || def != TaleDefOf.GaveBirth || args == null || args.Length < 1 || !IsAnimal(args[0] as Pawn) || args.Length < 2 || !IsAnimal(args[1] as Pawn));
 }
Exemplo n.º 2
0
 static bool Prefix(PawnRelationDef def, Pawn otherPawn)
 {
     //Prevent the association of an animal parent to prevent the sprawling animal family trees.
     return(!QOLMod.preventAnimalFamilies() || def != PawnRelationDefOf.Parent || otherPawn.RaceProps == null || !otherPawn.RaceProps.Animal);
 }