diff --git a/Source/JobGiver_Work_Patch.cs b/Source/JobGiver_Work_Patch.cs index e34c189..8214999 100644 --- a/Source/JobGiver_Work_Patch.cs +++ b/Source/JobGiver_Work_Patch.cs @@ -150,7 +150,8 @@ public static bool TryIssueJobPackage(JobGiver_Work __instance, ref ThinkResult scanner.PotentialWorkThingRequest.group == ThingRequestGroup.Refuelable || scanner.PotentialWorkThingRequest.group == ThingRequestGroup.Transporter || scanner.PotentialWorkThingRequest.group == ThingRequestGroup.BuildingFrame || - scanner.PotentialWorkThingRequest.group == ThingRequestGroup.PotentialBillGiver || + //temp fix, will have to be revieved and reworked + (scanner.PotentialWorkThingRequest.group == ThingRequestGroup.PotentialBillGiver & !(workGiver.def.defName.Equals("DoBillsMedicalHumanOperation") || workGiver.def.defName.Equals("DoBillsMedicalAnimalOperation"))) scanner.PotentialWorkThingRequest.group == ThingRequestGroup.Filth //|| //scanner.PotentialWorkThingRequest.group == ThingRequestGroup.BuildingArtificial )) diff --git a/Source/RegionGrid_Patch.cs b/Source/RegionGrid_Patch.cs index 2fa11d3..69f4c68 100644 --- a/Source/RegionGrid_Patch.cs +++ b/Source/RegionGrid_Patch.cs @@ -56,15 +56,16 @@ public static bool GetValidRegionAt(RegionGrid __instance, ref Region __result, Log.Warning(string.Concat("Trying to get valid region at ", c, " but RegionAndRoomUpdater is disabled. The result may be incorrect.")); } Region region = __instance.regionGrid[map.cellIndices.CellToIndex(c)]; - if (region == null || !region.valid) + if (map.AgeInDays==0f&&(region == null || !region.valid)) { - /* + //not locking this breaks the generation of raid maps, since structure, pawn and loot generation depend on the canReachMapBorder or something in order to generate + //Log.Message("Intitially generating region for a map, namedly: " + map.uniqueID + " Dict :"+Regen); + lock (map.regionAndRoomUpdater) { regionAndRoomUpdater.TryRebuildDirtyRegionsAndRooms(); region = __instance.regionGrid[map.cellIndices.CellToIndex(c)]; } - */ } if (region != null && region.valid) {