Add recipes for nipple color changes

This commit is contained in:
lutepickle 2022-09-27 17:02:54 -07:00
parent ac845722f0
commit 4bdf7cd6c2
7 changed files with 44 additions and 6 deletions

Binary file not shown.

View file

@ -56,10 +56,25 @@
<RecipeDef ParentName="BaseBreastSurgery">
<defName>Surgery_ContractNipple</defName>
<label>Contract nipples</label>
<description>Constract the nipples.</description>
<description>Contract the nipples.</description>
<workerClass>RJW_Menstruation.Recipe_ContractNipple</workerClass>
<jobString>contracting nipples</jobString>
</RecipeDef>
<RecipeDef ParentName="BaseBreastSurgery">
<defName>Surgery_DarkenNipple</defName>
<label>Darken nipples</label>
<description>Darken the nipples.</description>
<workerClass>RJW_Menstruation.Recipe_DarkenNipple</workerClass>
<jobString>darkening nipples</jobString>
</RecipeDef>
<RecipeDef ParentName="BaseBreastSurgery">
<defName>Surgery_LightenNipple</defName>
<label>Lighten nipples</label>
<description>Lighten the nipples.</description>
<workerClass>RJW_Menstruation.Recipe_LightenNipple</workerClass>
<jobString>lightening nipples</jobString>
</RecipeDef>
</Defs>

View file

@ -349,6 +349,12 @@ namespace RJW_Menstruation
UpdateNipples();
}
public void AdjustNippleColorImmediately(float amount)
{
baseAlpha = Mathf.Clamp01(baseAlpha + amount);
UpdateNipples();
}
public void AdjustAreolaSizeImmediately(float amount)
{
baseAreola = Mathf.Clamp01(baseAreola + amount);

View file

@ -69,4 +69,20 @@ namespace RJW_Menstruation
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);
}
}
}

View file

@ -8,6 +8,7 @@ Version 1.0.7.5
- Properly calculate cramp pain falloff again.
- Climacteric and menopause are now per-womb, appearing in the womb dialog instead of as hediffs. Any old hediffs should disappear upon loading the save.
- Added new property to vaginas to multiply the number of eggs available. Archotech vaginas will have quadruple the normal amount.
- Add new surgery to lighten and darken nipples.
- Support for Animal Genetics (Continued) when using multiple pregnancy.
Version 1.0.7.4