mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Resizing Genes now trigger on 20th Birthday Earliest, Fixes #11
This commit is contained in:
parent
fd88a13848
commit
4cd77eba50
14 changed files with 140 additions and 119 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
|
||||
namespace RJW_Genes
|
||||
|
@ -95,5 +96,25 @@ namespace RJW_Genes
|
|||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_unbreakable);
|
||||
}
|
||||
|
||||
|
||||
public static bool HasGenitaliaResizingGenes(Pawn pawn)
|
||||
{
|
||||
return !GetGenitaliaResizingGenes(pawn).NullOrEmpty();
|
||||
}
|
||||
|
||||
public static List<Gene> GetGenitaliaResizingGenes(Pawn pawn)
|
||||
{
|
||||
var ResizingGenes = new List<Gene>();
|
||||
|
||||
// Error Handling: Issue with Pawn or Genes return empty.
|
||||
if (pawn == null || pawn.genes == null)
|
||||
return ResizingGenes;
|
||||
|
||||
foreach (Gene g in pawn.genes.GenesListForReading)
|
||||
if (g is Gene_GenitaliaResizingGene)
|
||||
ResizingGenes.Add(g);
|
||||
|
||||
return ResizingGenes;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue