rjw-genes/1.6/Source/Genes/ExtraGenitalia/Gene_UdderBreasts.cs
Telanda-DDS 7f6dc2a668 - Added in Elasticity support for Cumpilation and Eltoro Stretching.
- 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.
2025-07-24 13:41:47 +10:00

59 lines
No EOL
1.4 KiB
C#

using rjw;
using Verse;
namespace RJW_Genes
{
/// <summary>
/// Removes breasts for female (and trap, futa) pawns and adds Udders.
/// Wished for in Issue #27.
///
/// TODO: Currently, the sexualizer over-writes the added udders and just adds another pair of breasts!
/// I commented out the gene in .xml for now.
/// </summary>
public class Gene_UdderBreasts : RJW_Gene
{
Hediff added_udders;
public override void PostMake()
{
base.PostMake();
}
public override void PostAdd()
{
if (pawn.kindDef == null) return; //Added to catch Rimworld creating statues of pawns.
base.PostAdd();
AddUdders();
}
public override void PostRemove()
{
base.PostRemove();
if (added_udders != null)
pawn.health.RemoveHediff(added_udders);
}
internal void AddUdders()
{
HediffComp_SexPart CompHediff = null;
BodyPartRecord bpr = Genital_Helper.get_breastsBPR(pawn);
added_udders = pawn.health.AddHediff(Genital_Helper.udder_breasts, bpr);
added_udders.TryGetComp<rjw.HediffComp_SexPart>();
if (CompHediff != null)
{
CompHediff.Init(pawn);
CompHediff.UpdateSeverity();
}
}
}
}