Adopted Breeding Genes by Shabalox

This commit is contained in:
Vegapnk 2022-11-20 20:53:05 +01:00
parent 95fc9b89a0
commit 21fc56fe2b
14 changed files with 264 additions and 3 deletions

View file

@ -0,0 +1,44 @@
using Verse;
namespace RJW_Genes
{
public class GeneUtility
{
public static bool IsMechbreeder(Pawn pawn)
{
if (pawn.genes == null)
{
return false;
}
return pawn.genes.HasGene(GeneDefOf.rjw_genes_mechbreeder);
}
public static bool IsInsectIncubator(Pawn pawn)
{
if (pawn.genes == null)
{
return false;
}
return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectincubator);
}
public static bool isInsectBreeder(Pawn pawn)
{
if (pawn.genes == null)
{
return false;
}
return pawn.genes.HasGene(GeneDefOf.rjw_genes_insectbreeder);
}
public static float MaxEggSizeMul(Pawn pawn)
{
float MaxEggSize = 1;
if (IsInsectIncubator(pawn))
{
MaxEggSize *= 2;
}
return MaxEggSize;
}
}
}