2023-04-28 06:24:18 +00:00
|
|
|
|
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()
|
|
|
|
|
{
|
|
|
|
|
base.PostAdd();
|
|
|
|
|
|
2024-05-24 23:13:00 +00:00
|
|
|
|
AddUdders();
|
|
|
|
|
|
2023-04-28 06:24:18 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void PostRemove()
|
|
|
|
|
{
|
|
|
|
|
base.PostRemove();
|
2024-05-24 23:13:00 +00:00
|
|
|
|
|
2023-04-28 06:24:18 +00:00
|
|
|
|
if (added_udders != null)
|
|
|
|
|
pawn.health.RemoveHediff(added_udders);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
internal void AddUdders()
|
|
|
|
|
{
|
2024-05-24 23:13:00 +00:00
|
|
|
|
CompHediffBodyPart CompHediff = null;
|
2023-04-28 06:24:18 +00:00
|
|
|
|
BodyPartRecord bpr = Genital_Helper.get_uddersBPR(pawn);
|
|
|
|
|
added_udders = pawn.health.AddHediff(Genital_Helper.udder_breasts, bpr);
|
2024-05-24 23:13:00 +00:00
|
|
|
|
added_udders.TryGetComp<rjw.CompHediffBodyPart>();
|
|
|
|
|
if (CompHediff != null)
|
|
|
|
|
{
|
|
|
|
|
CompHediff.initComp(pawn);
|
|
|
|
|
CompHediff.updatesize();
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-28 06:24:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|