2022-11-26 20:32:32 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Verse;
|
2022-11-20 19:53:05 +00:00
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-26 20:32:32 +00:00
|
|
|
|
public static bool IsInsectBreeder(Pawn pawn)
|
2022-11-20 19:53:05 +00:00
|
|
|
|
{
|
|
|
|
|
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;
|
|
|
|
|
}
|
2022-11-26 20:32:32 +00:00
|
|
|
|
|
|
|
|
|
internal static bool IsElastic(Pawn pawn)
|
|
|
|
|
{
|
|
|
|
|
if (pawn.genes == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return pawn.genes.HasGene(GeneDefOf.rjw_genes_elasticity);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static bool IsCumflationImmune(Pawn pawn)
|
|
|
|
|
{
|
|
|
|
|
if (pawn.genes == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return pawn.genes.HasGene(GeneDefOf.rjw_genes_cumflation_immunity);
|
|
|
|
|
}
|
2022-11-27 07:36:44 +00:00
|
|
|
|
public static bool IsGenerousDonor(Pawn pawn)
|
|
|
|
|
{
|
|
|
|
|
if (pawn.genes == null)
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
return pawn.genes.HasGene(GeneDefOf.rjw_genes_generous_donor);
|
|
|
|
|
}
|
2022-11-20 19:53:05 +00:00
|
|
|
|
}
|
|
|
|
|
}
|