mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Adopted Breeding Genes by Shabalox
This commit is contained in:
parent
95fc9b89a0
commit
21fc56fe2b
14 changed files with 264 additions and 3 deletions
44
Source/Genes/GeneUtility.cs
Normal file
44
Source/Genes/GeneUtility.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue