mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2024-08-15 00:23:31 +00:00
Merge branch 'dev' of https://github.com/Shabakur/RJW-Genes into dev
This commit is contained in:
commit
982339a84e
40 changed files with 492 additions and 214 deletions
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Verse;
|
||||
using RimWorld;
|
||||
namespace RJW_Genes
|
||||
|
@ -102,7 +103,7 @@ namespace RJW_Genes
|
|||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_youth_fountain);
|
||||
}
|
||||
|
||||
internal static bool IsAgeDrainer(Pawn pawn)
|
||||
public static bool IsAgeDrainer(Pawn pawn)
|
||||
{
|
||||
if (pawn.genes == null)
|
||||
{
|
||||
|
@ -173,5 +174,20 @@ namespace RJW_Genes
|
|||
}
|
||||
return pawn.genes.HasGene(GeneDefOf.rjw_genes_unbreakable);
|
||||
}
|
||||
|
||||
public static List<Gene_GenitaliaResizingGene> GetGenitaliaResizingGenes(Pawn pawn)
|
||||
{
|
||||
var ResizingGenes = new List<Gene_GenitaliaResizingGene>();
|
||||
|
||||
// Error Handling: Issue with Pawn or Genes return empty.
|
||||
if (pawn == null || pawn.genes == null)
|
||||
return ResizingGenes;
|
||||
|
||||
foreach (Gene gene in pawn.genes.GenesListForReading)
|
||||
if (gene is Gene_GenitaliaResizingGene resizing_gene)
|
||||
ResizingGenes.Add(resizing_gene);
|
||||
|
||||
return ResizingGenes;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue