diff --git a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs index f98a4d5..186c044 100644 --- a/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs +++ b/1.3/source/RJW_Menstruation/RJW_Menstruation/HediffComps/HediffComp_Menstruation.cs @@ -1248,7 +1248,6 @@ namespace RJW_Menstruation protected void BleedOut() { - //FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, ThingDefOf.Filth_Blood,parent.pawn.Label); CumIn(parent.pawn, Rand.Range(0.02f * Configurations.BleedingAmount, 0.04f * Configurations.BleedingAmount), Translations.Menstrual_Blood, -5.0f, parent.pawn.def.race?.BloodDef ?? ThingDefOf.Filth_Blood); Cum blood = GetNotCum(Translations.Menstrual_Blood); if (blood != null) blood.Color = BloodColor; @@ -1261,6 +1260,7 @@ namespace RJW_Menstruation /// protected void MakeCumFilth(Cum cum, float amount) { + if (parent.pawn.Map == null) return; if (amount >= minmakefilthvalue) FilthMaker.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, cum.FilthDef, cum.pawn?.LabelShort ?? "Unknown"); } @@ -1299,7 +1299,7 @@ namespace RJW_Menstruation protected float MakeCumFilthMixture(float amount, List cumlabels) { - + if (parent.pawn.Map == null) return 0; if (amount >= minmakefilthvalue) { FilthMaker_Colored.TryMakeFilth(parent.pawn.Position, parent.pawn.Map, VariousDefOf.FilthMixture, cumlabels, GetCumMixtureColor, false); diff --git a/1.3/source/RJW_Menstruation/SexperienceModule/Patch/RJW_Patch.cs b/1.3/source/RJW_Menstruation/SexperienceModule/Patch/RJW_Patch.cs index b8ab565..8148fc5 100644 --- a/1.3/source/RJW_Menstruation/SexperienceModule/Patch/RJW_Patch.cs +++ b/1.3/source/RJW_Menstruation/SexperienceModule/Patch/RJW_Patch.cs @@ -14,7 +14,7 @@ namespace RJW_Menstruation.Sexperience [HarmonyPatch("HasJobOnThing")] public static bool HasJobOnThing(Pawn pawn, ref bool __result) { - if (pawn.GetMenstruationComps().Any(comp => comp.DoCleanWomb && comp.TotalCumPercent > 0.001f) && pawn.Map.listerBuildings.ColonistsHaveBuilding(VariousDefOf.CumBucket)) + if (pawn.GetMenstruationComps().Any(comp => comp.DoCleanWomb && comp.TotalCumPercent > 0.001f) && (pawn.Map?.listerBuildings.ColonistsHaveBuilding(VariousDefOf.CumBucket) ?? false)) { __result = true; return false;