mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Do a bit of housekeeping when an absorber goes dirty
This commit is contained in:
parent
f410f6bc0f
commit
40b23fc9c9
1 changed files with 4 additions and 1 deletions
|
@ -219,13 +219,16 @@ namespace RJW_Menstruation
|
|||
|
||||
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))
|
||||
{
|
||||
def = DirtyDef;
|
||||
dirty = true;
|
||||
OutfitForcedHandler forcedHandler = Wearer.outfits?.forcedHandler;
|
||||
if (forcedHandler?.IsForced(this) ?? false)
|
||||
forcedHandler.SetForced(this, false);
|
||||
if (!def.equippedStatOffsets.NullOrEmpty())
|
||||
Wearer.health.capacities.Notify_CapacityLevelsDirty();
|
||||
Wearer.apparel.Notify_ApparelChanged();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue