public Genes CrossGenes(Genes other, Genes out_) { //crosses all genes on object and puts result into out_ List <Gene> newGenes = new List <Gene>(); foreach (Gene gene in genes) { try { Gene matching = other.GetGene(gene.name); newGenes.Add(gene.CrossGene(matching, gene.name)); } catch (ArgumentException e) { print(e); Debug.LogWarning(String.Format("'{0}' Could not find a matching gene for '{1}' in '{2}', skipping...", name, gene.name, other.gameObject.name), gameObject); } } out_.genes.Clear(); foreach (Gene gene in newGenes) { out_.SetGene(gene); } return(out_); }
static public void Postfix(ref float __result, ref Pawn __instance) { if (!Genes.EffectsThing(__instance)) { return; } __result = __result * Genes.GetGene(__instance, AnimalGenetics.Health); }
static public void Postfix(ref int __result, CompShearable __instance) { if (!Genes.EffectsThing(__instance.parent)) { return; } __result = (int)(__result * Genes.GetGene((Pawn)(__instance.parent), AnimalGenetics.GatherYield)); }
static public void Postfix(ref float __result, Pawn __1) { if (!Genes.EffectsThing(__1)) { return; } __result = __result * Genes.GetGene(__1, AnimalGenetics.Damage); }
static public void Postfix(ref float __result, Pawn __0) { if (!Genes.EffectsThing(__0)) { return; } __result = __result * Genes.GetGene(__0, StatDefOf.CarryingCapacity); }
public static void AlphaAnimals_get_ResourceAmount_Patch(ref int __result, CompHasGatherableBodyResource __instance) { __result = (int)(__result * Genes.GetGene((Pawn)__instance.parent, AnimalGenetics.GatherYield)); }
public static void ChemicalsAndNeutroamine_get_ResourceAmountPatch(ref int __result, CompHasGatherableBodyResource __instance) { __result = (int)(__result * Genes.GetGene((Pawn)__instance.parent, AnimalGenetics.GatherYield)); }