mirror of
https://github.com/vegapnk/RJW-Genes.git
synced 2026-06-18 19:25:57 +00:00
- Updated Breeding Pulse c# with more debugging information. - Updated Vanilla Genes Expanded Genie with updated function call. - Removed Licentia XML & method calls from Gene_Elasticity.cs - Fixed MatingCall Ability & checked to make sure Pheromone Spit was still functional. - Fixed incorrect mod requirement for sex curiosity Gene.
55 lines
1.4 KiB
C#
55 lines
1.4 KiB
C#
using Verse;
|
|
using rjw;
|
|
using RimWorld;
|
|
|
|
namespace RJW_Genes
|
|
{
|
|
public class Gene_NoPenis : RJW_Gene
|
|
{
|
|
|
|
internal Hediff removed_penis;
|
|
|
|
public override void PostMake()
|
|
{
|
|
base.PostMake();
|
|
|
|
// Penis are only removed for male pawns!
|
|
if (GenderUtility.IsMale(pawn) && removed_penis == null)
|
|
{
|
|
RemoveButStorePenis();
|
|
}
|
|
}
|
|
|
|
public override void PostAdd()
|
|
{
|
|
if (pawn.kindDef == null) return; //Added to catch Rimworld creating statues of pawns.
|
|
base.PostAdd();
|
|
|
|
// Penis are only removed for male pawns!
|
|
if (GenderUtility.IsMale(pawn) && removed_penis == null)
|
|
{
|
|
RemoveButStorePenis();
|
|
}
|
|
}
|
|
|
|
public override void PostRemove()
|
|
{
|
|
base.PostRemove();
|
|
if(removed_penis != null)
|
|
pawn.health.AddHediff(removed_penis);
|
|
}
|
|
|
|
internal void RemoveButStorePenis()
|
|
{
|
|
var partBPR = Genital_Helper.get_genitalsBPR(pawn);
|
|
Hediff penisToRemove = Genital_Helper.get_AllPartsHediffList(pawn).FindLast(x => Genital_Helper.is_penis(x));
|
|
|
|
if(penisToRemove != null)
|
|
{
|
|
removed_penis = penisToRemove;
|
|
pawn.health.RemoveHediff(penisToRemove);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|