Womb cleaning spams job if no bucket on the map

This commit is contained in:
amevarashi 2022-03-20 14:16:16 +05:00
parent 3ae66bd4a6
commit d5d5dbd77c
2 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ namespace RJW_Menstruation.Sexperience
public static bool HasJobOnThing(Pawn pawn, Thing t, bool forced, ref bool __result)
{
HediffComp_Menstruation comp = pawn.GetMenstruationComp();
if (comp != null && comp.DoCleanWomb && comp.TotalCumPercent > 0.001f)
if (comp != null && comp.DoCleanWomb && comp.TotalCumPercent > 0.001f && pawn.Map.listerBuildings.ColonistsHaveBuilding(VariousDefOf.CumBucket))
{
__result = true;
return false;

View File

@ -12,6 +12,6 @@ namespace RJW_Menstruation.Sexperience
public static readonly JobDef VaginaWashingwithBucket = DefDatabase<JobDef>.GetNamed("VaginaWashingwithBucket");
public static readonly ThingDef GatheredCumMixture = DefDatabase<ThingDef>.GetNamed("GatheredCumMixture");
public static readonly ThingDef CumBucket = DefDatabase<ThingDef>.GetNamed("CumBucket");
}
}