mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Be sure CheckDirty updates the stats if the old absorber had stats and the new doesn't
This commit is contained in:
parent
d34509dfc9
commit
2dda753ab9
4 changed files with 7 additions and 3 deletions
Binary file not shown.
|
@ -219,14 +219,16 @@ namespace RJW_Menstruation
|
||||||
|
|
||||||
public void CheckDirty()
|
public void CheckDirty()
|
||||||
{
|
{
|
||||||
if (absorbedfluids > this.GetStatValue(VariousDefOf.MaxAbsorbable) && !(Wearer?.apparel?.IsLocked(this) ?? false))
|
if (absorbedfluids > this.GetStatValue(VariousDefOf.MaxAbsorbable) && !(Wearer?.apparel?.IsLocked(this) ?? false) && DirtyDef != def && DirtyDef != null)
|
||||||
{
|
{
|
||||||
|
bool oldHasStats = !def.equippedStatOffsets.NullOrEmpty();
|
||||||
|
bool newHasStats = !DirtyDef.equippedStatOffsets.NullOrEmpty();
|
||||||
def = DirtyDef;
|
def = DirtyDef;
|
||||||
dirty = true;
|
dirty = true;
|
||||||
OutfitForcedHandler forcedHandler = Wearer.outfits?.forcedHandler;
|
OutfitForcedHandler forcedHandler = Wearer.outfits?.forcedHandler;
|
||||||
if (forcedHandler?.IsForced(this) ?? false)
|
if (forcedHandler?.IsForced(this) ?? false)
|
||||||
forcedHandler.SetForced(this, false);
|
forcedHandler.SetForced(this, false);
|
||||||
if (!def.equippedStatOffsets.NullOrEmpty())
|
if (oldHasStats || newHasStats)
|
||||||
Wearer.health.capacities.Notify_CapacityLevelsDirty();
|
Wearer.health.capacities.Notify_CapacityLevelsDirty();
|
||||||
Wearer.apparel.Notify_ApparelChanged();
|
Wearer.apparel.Notify_ApparelChanged();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<Manifest>
|
<Manifest>
|
||||||
<identifier>RJW Menstruation</identifier>
|
<identifier>RJW Menstruation</identifier>
|
||||||
<version>1.0.9.3</version>
|
<version>1.0.9.4</version>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<incompatibleWith />
|
<incompatibleWith />
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
Version 1.0.9.4
|
||||||
|
|
||||||
Version 1.0.9.3
|
Version 1.0.9.3
|
||||||
- The biosculptor egg restoration cycle will now give more eggs to races that ovulate more than one egg at a time.
|
- The biosculptor egg restoration cycle will now give more eggs to races that ovulate more than one egg at a time.
|
||||||
- All pawns can now use all menstruation genes, regardless of gender or having a womb.
|
- All pawns can now use all menstruation genes, regardless of gender or having a womb.
|
||||||
|
|
Loading…
Reference in a new issue