2022-11-14 16:47:43 +00:00
|
|
|
|
using Verse;
|
|
|
|
|
using rjw;
|
|
|
|
|
using RimWorld;
|
|
|
|
|
|
|
|
|
|
namespace RJW_Genes
|
|
|
|
|
{
|
2022-11-20 16:33:50 +00:00
|
|
|
|
public class Gene_NoBreasts : RJW_Gene
|
2022-11-14 16:47:43 +00:00
|
|
|
|
{
|
2023-03-10 07:15:53 +00:00
|
|
|
|
Hediff breastsToShrink;
|
|
|
|
|
internal float oldSize = -1f;
|
2022-11-14 16:47:43 +00:00
|
|
|
|
|
|
|
|
|
public override void PostMake()
|
|
|
|
|
{
|
|
|
|
|
base.PostMake();
|
|
|
|
|
|
|
|
|
|
// Breasts are removed for female pawns!
|
2023-03-10 07:15:53 +00:00
|
|
|
|
if (GenderUtility.IsFemale(pawn) && oldSize < 0)
|
2022-11-14 16:47:43 +00:00
|
|
|
|
{
|
|
|
|
|
RemoveButStoreBreasts();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void PostAdd()
|
|
|
|
|
{
|
|
|
|
|
base.PostAdd();
|
|
|
|
|
|
|
|
|
|
// Breasts are removed for female pawns!
|
2023-03-10 07:15:53 +00:00
|
|
|
|
if (GenderUtility.IsFemale(pawn) && oldSize < 0)
|
2022-11-14 16:47:43 +00:00
|
|
|
|
{
|
|
|
|
|
RemoveButStoreBreasts();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void PostRemove()
|
|
|
|
|
{
|
|
|
|
|
base.PostRemove();
|
2023-03-10 07:15:53 +00:00
|
|
|
|
// Re-Add the old breasts
|
|
|
|
|
if (oldSize != null)
|
|
|
|
|
breastsToShrink.Severity = oldSize;
|
2022-11-14 16:47:43 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal void RemoveButStoreBreasts()
|
|
|
|
|
{
|
|
|
|
|
var partBPR = Genital_Helper.get_breastsBPR(pawn);
|
2023-03-10 07:15:53 +00:00
|
|
|
|
breastsToShrink = Genital_Helper.get_AllPartsHediffList(pawn).FindLast(x => GenitaliaUtility.IsBreasts(x));
|
2022-11-14 16:47:43 +00:00
|
|
|
|
|
2023-03-10 07:15:53 +00:00
|
|
|
|
if(breastsToShrink != null)
|
2022-11-14 16:47:43 +00:00
|
|
|
|
{
|
2023-03-10 07:15:53 +00:00
|
|
|
|
oldSize = breastsToShrink.Severity;
|
|
|
|
|
//pawn.health.RemoveHediff(breastsToRemove);
|
|
|
|
|
breastsToShrink.Severity = 0f;
|
2022-11-14 16:47:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-03-10 07:15:53 +00:00
|
|
|
|
/*
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Adds a "rjw.featurelesschest", which means nipples but nothing else (like male human pawns do).
|
|
|
|
|
/// </summary>
|
|
|
|
|
internal void AddFeaturelessBreast()
|
|
|
|
|
{
|
|
|
|
|
var partBPR = Genital_Helper.get_breastsBPR(pawn);
|
|
|
|
|
//this.added_nipples = pawn.health.AddHediff(Genital_Helper.featureless_chest, partBPR);
|
|
|
|
|
}
|
|
|
|
|
*/
|
2022-11-14 16:47:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|