ZenonSeth / logistica

A Minetest item transport and storage mod
Other
0 stars 2 forks source link

crafting input with replacement duplicated #5

Closed programmerjake closed 1 day ago

programmerjake commented 7 months ago

when a recipe has an input that is just given back as a replacement, that input can be duplicated:

Reproduction:

ZenonSeth commented 6 months ago

I've implemented a partial fix that addresses the main problem that caused this duplication, and made a release https://github.com/ZenonSeth/logistica/releases/tag/0.9.5 , also available on ContentDB - that should prevent the infinite duplication that is happening.

There are however still some issues that are a little harder to resolve due to how the crafting suppliers work - specifically they require the full amount of items to be able to be crafted, which, for recipes such as the one using the juicer, can be done with only 1 juicer. I've left a "bug" of sorts into the code to allow those recipes to still be crafted, but under some circumstances it's still possible to trick it into duplicating that replacement item, it's just much tricker to do now, and should not result in infinite number of them.

ZenonSeth commented 4 months ago

This was tricky to fix, but I think I got it - the latest main branch should fix this, specifically this commit https://github.com/ZenonSeth/logistica/commit/69d384feadda7f6c9b893b1596217ee8d38b2f82

I am going to test it some more before releasing - if you are still playing and have time, you can test it out too.

ZenonSeth commented 4 months ago

Ok, I spent some time testing, and this issue should now be fixed in 0.9.14: https://github.com/ZenonSeth/logistica/releases/tag/0.9.14 - along with other fixes and improvements. 0.9.14 is also published on ContentDB now.

ZenonSeth commented 1 day ago

Closing this issue now, as I believed it's fixed. Feel free to reopen if you think it's not.