Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Source/JobGiver_Work_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
))
Expand Down
7 changes: 4 additions & 3 deletions Source/RegionGrid_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down