mirror of
https://gitgud.io/lutepickle/rjw_menstruation.git
synced 2024-08-14 22:46:52 +00:00
Null check for apparel tracker in DirtyEffect
This commit is contained in:
parent
ff95b8da39
commit
32800a3499
2 changed files with 1 additions and 1 deletions
Binary file not shown.
|
@ -272,7 +272,7 @@ namespace RJW_Menstruation
|
||||||
public override void DirtyEffect(int tickInterval)
|
public override void DirtyEffect(int tickInterval)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (wearTicks > MinHrstoDirtyEffect * GenDate.TicksPerHour && Rand.MTBEventOccurs(100.0f, GenDate.TicksPerHour, tickInterval) && !Wearer.apparel.IsLocked(this))
|
if (wearTicks > MinHrstoDirtyEffect * GenDate.TicksPerHour && Rand.MTBEventOccurs(100.0f, GenDate.TicksPerHour, tickInterval) && !(Wearer.apparel?.IsLocked(this) ?? false))
|
||||||
{
|
{
|
||||||
Wearer.health.AddHediff(HediffDefOf.WoundInfection, Genital_Helper.get_genitalsBPR(Wearer));
|
Wearer.health.AddHediff(HediffDefOf.WoundInfection, Genital_Helper.get_genitalsBPR(Wearer));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue