Conversation
…Later checks are incorrect.
…l creation into dedicated methods - remove hacks.
| //maintain cell reservations on the trip back | ||
| //TODO: do that when we carry things | ||
| //I guess that means TODO: implement carrying the rest of the items in this job instead of falling back on HaulToStorageJob | ||
| yield return TargetB.HasThing ? Toils_Goto.GotoThing(TargetIndex.B, PathEndMode.ClosestTouch) |
There was a problem hiding this comment.
I completely deleted this code, because it didn't make much sense to me. TargetB is not where anything is guaranteed to be dropped off at - the Unload job driver owns that responsibility - maintaining reservations seems moot, if that was a desired feature - wouldn't you do this in the Unload JobDriver?
There was a problem hiding this comment.
I think this was load-bearing, I've noticed a few edge cases where pawns are over-hauling when there is not enough space.
There was a problem hiding this comment.
Mm. I think this is a more general issue:
When we use a storage building, we store a (StoreTarget, CellAllocation) pair. Where CellAllocation is presumed to be for a particular item. This means we store a int capacity. This capacity is only correct for a particular item, not any item.
This means, for example - if we haul leather, to a cell with 225 capacity (3x free cells) - and we only have, i.e. 10 leather. We would then see 215 free slots.
If we then went to haul a bunch of single-slot items, i.e. apparel. We could attempt to haul ~215 individual apparel items into this slot - when we should only be able to store 2. Because fundamentally we are storing things by cell.
…nt in performance
|
Fake news on the performance - it also broke things :( |

This is a series of changes ontop of my base changes - which are a bit more opinionated and try to make the code simpler & easier to reason about (for newcomers).