mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
88 lines
2.4 KiB
C#
88 lines
2.4 KiB
C#
using RimWorld;
|
|
using rjw;
|
|
using System.Collections.Generic;
|
|
using Verse;
|
|
|
|
|
|
namespace RJW_Menstruation
|
|
{
|
|
public class Recipe_BreastSurgery : Recipe_Surgery
|
|
{
|
|
public override IEnumerable<BodyPartRecord> GetPartsToApplyOn(Pawn pawn, RecipeDef recipe)
|
|
{
|
|
BodyPartRecord part = Genital_Helper.get_breastsBPR(pawn) ?? Genital_Helper.get_uddersBPR(pawn);
|
|
if (part != null)
|
|
{
|
|
|
|
if (pawn.GetBreastComp() != null) yield return part;
|
|
}
|
|
}
|
|
|
|
public override void ApplyOnPawn(Pawn pawn, BodyPartRecord part, Pawn billDoer, List<Thing> ingredients, Bill bill)
|
|
{
|
|
HediffComp_Breast breast = pawn.GetBreastComp();
|
|
if (billDoer != null && breast != null)
|
|
{
|
|
TaleRecorder.RecordTale(TaleDefOf.DidSurgery, new object[]
|
|
{
|
|
billDoer,
|
|
pawn
|
|
});
|
|
SurgeryResult(breast);
|
|
}
|
|
}
|
|
|
|
protected virtual void SurgeryResult(HediffComp_Breast breast)
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
public class Recipe_ExpandAreola : Recipe_BreastSurgery
|
|
{
|
|
protected override void SurgeryResult(HediffComp_Breast breast)
|
|
{
|
|
breast.AdjustAreolaSizeImmediately(0.2f);
|
|
}
|
|
}
|
|
|
|
public class Recipe_ContractAreola : Recipe_BreastSurgery
|
|
{
|
|
protected override void SurgeryResult(HediffComp_Breast breast)
|
|
{
|
|
breast.AdjustAreolaSizeImmediately(-0.2f);
|
|
}
|
|
}
|
|
|
|
public class Recipe_ExpandNipple : Recipe_BreastSurgery
|
|
{
|
|
protected override void SurgeryResult(HediffComp_Breast breast)
|
|
{
|
|
breast.AdjustNippleSizeImmediately(0.2f);
|
|
}
|
|
}
|
|
|
|
public class Recipe_ContractNipple : Recipe_BreastSurgery
|
|
{
|
|
protected override void SurgeryResult(HediffComp_Breast breast)
|
|
{
|
|
breast.AdjustNippleSizeImmediately(-0.2f);
|
|
}
|
|
}
|
|
|
|
public class Recipe_DarkenNipple : Recipe_BreastSurgery
|
|
{
|
|
protected override void SurgeryResult(HediffComp_Breast breast)
|
|
{
|
|
breast.AdjustNippleColorImmediately(0.2f);
|
|
}
|
|
}
|
|
|
|
public class Recipe_LightenNipple : Recipe_BreastSurgery
|
|
{
|
|
protected override void SurgeryResult(HediffComp_Breast breast)
|
|
{
|
|
breast.AdjustNippleColorImmediately(-0.2f);
|
|
}
|
|
}
|
|
}
|