Open squareblob opened 4 years ago
This is also a bug with current 'working' factories. At least some of the time compactors will continue running and delete stacks. When this happens the factory can still be started even when the chest is full.
Fixed by https://github.com/CivClassic/FactoryMod/pull/27 for production recipes, remains an open issue for other types.
This is also a bug with current 'working' factories. At least some of the time compactors will continue running and delete stacks. When this happens the factory can still be started even when the chest is full.
Weird, that's not supposed to happen for compactors. Try to decompact materials when the compactor is full stops the compactor and does not consume any item. Are you able to reproduce it ?
Try to decompact materials when the compactor is full stops the compactor and does not consume any item.
Yes, compactors are still affected. See https://gfycat.com/frigidwaterloggedgrosbeak
Alright, I think I've found the issue.
The "fix" to factories relies on the fitsIn(Inventory) method. This method works as follows:
invCopy
) is createdaddItemStack()
methodThis might seems fine at first. However step 2 will stack the item and will "defragment" the given inventory.
Thus, if we give this inventory as a parameter:
The representation will be:
Since the representation has 1 available slot, the fitsIn()
function will return true and the factory will still execute the recipe.
I think there are 2 "basic" solutions to that:
"Fix" fitsIn()
but that introduces a regression in CMC
Make a new function for that purpose.
Either choice shouldn't be too hard to implement. But I'm curious to hear which one @Maxopoly prefers.
Fix fitsIn()
, it was made with this use case in mind.
Is this still an issue? Can't seem to replicate on test
This is fixed for compactors (#13). Other factory types, such as production factories, will continue to run and in the process waste output. It would reduce annoyance (particularly for new players) if all factories automatically deactivated when insufficient output storage space exists.