@@ -30,7 +30,7 @@ public static bool OkThingToHaul(Thing t, Pawn pawn)
3030
3131 public override IEnumerable < Thing > PotentialWorkThingsGlobal ( Pawn pawn )
3232 {
33- var list = pawn . Map . listerHaulables . ThingsPotentiallyNeedingHauling ( ) ;
33+ var list = pawn . Map . listerHaulables . ThingsPotentiallyNeedingHauling ( ) . ToList ( ) ;
3434 Comparer . rootCell = pawn . Position ;
3535 list . Sort ( Comparer ) ;
3636 return list ;
@@ -68,7 +68,7 @@ public override Job JobOnThing(Pawn pawn, Thing thing, bool forced = false)
6868 || ! IsNotCorpseOrAllowed ( thing ) //This WorkGiver gets hijacked by AllowTool and expects us to urgently haul corpses.
6969 || MassUtility . WillBeOverEncumberedAfterPickingUp ( pawn , thing , 1 ) ) //https://github.com/Mehni/PickUpAndHaul/pull/18
7070 {
71- return HaulAIUtility . HaulToStorageJob ( pawn , thing ) ;
71+ return HaulAIUtility . HaulToStorageJob ( pawn , thing , forced ) ;
7272 }
7373
7474 var map = pawn . Map ;
@@ -84,7 +84,7 @@ public override Job JobOnThing(Pawn pawn, Thing thing, bool forced = false)
8484 //Don't multi-haul food to hoppers.
8585 if ( HaulToHopperJob ( thing , targetCell , map ) )
8686 {
87- return HaulAIUtility . HaulToStorageJob ( pawn , thing ) ;
87+ return HaulAIUtility . HaulToStorageJob ( pawn , thing , forced ) ;
8888 }
8989 else
9090 {
@@ -114,7 +114,7 @@ var capacityStoreCell
114114
115115 if ( capacityStoreCell == 0 )
116116 {
117- return HaulAIUtility . HaulToStorageJob ( pawn , thing ) ;
117+ return HaulAIUtility . HaulToStorageJob ( pawn , thing , forced ) ;
118118 }
119119
120120 var job = JobMaker . MakeJob ( PickUpAndHaulJobDefOf . HaulToInventory , null , storeTarget ) ; //Things will be in queues
@@ -190,7 +190,7 @@ bool Validator(Thing t)
190190 }
191191 while ( ( nextThing = GetClosestAndRemove ( lastThing . Position , map , haulables , PathEndMode . ClosestTouch ,
192192 TraverseParms . For ( pawn ) , distanceToSearchMore , Validator ) ) != null ) ;
193-
193+
194194 if ( nextThing == null )
195195 {
196196 skipCells = null ;
@@ -651,4 +651,4 @@ public static bool TryFindBestBetterNonSlotGroupStorageFor(Thing t, Pawn carrier
651651public static class PickUpAndHaulDesignationDefOf
652652{
653653 public static DesignationDef haulUrgently = DefDatabase < DesignationDef > . GetNamedSilentFail ( "HaulUrgentlyDesignation" ) ;
654- }
654+ }
0 commit comments