New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Furnace: Erase src_time if no more items left in src. #1457
Conversation
@Fixer-007 can you test? |
To explain, src_time contains available "time" accrued (while gone). It can just keep counting upwards. In the loop, it gets decreased for every item cooked. But if we drain the |
You modified the original bug report to include a different bug, AFTER I submitted a fix for it. That's really bad, you should NOT do that. If you keep doing this, you could never close bugs. For all new bugs found, just make a new bugreport. |
You are correct, I've split that bug report in two. This PR solves furnace instacook issue described by me in #1455. 👍 |
The fuel would remain active even if source went empty, giving free cook time to newly inserted items. This patch is supposed to stop this.
@fixer please give this another test. If this doesn't work I might throw in the towel. |
Fixes the #1459 to me. 👍 |
Alright, then we should give this some more testing then. |
I will suggest using this new furnace code to Cash World admin here: https://forum.minetest.net/viewtopic.php?f=10&t=14429&p=242724#p242724 |
I don't feel able to get my head around this code, but since i somewhat trust sofar with this code and since it is tested i'm happy to 👍 to get it merged and tested more widely. |
This PR is already installed on Cash World server, will see if someone spots something critical. |
The old code would allow src_time to stay non-zero, allowing you
to insert new items in a newly loaded furnace, and instantly cook
dozens of them because of this.
If the src slot goes empty while cooking items in the cook loop,
we erase the remaining src_time and the player will have to wait
the normal time for the next items to cook.
Fixes #1455