Skip to content
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 "catch-up" mechanic can be cheated #2996

Open
fluxionary opened this issue Oct 28, 2022 · 1 comment
Open

furnace "catch-up" mechanic can be cheated #2996

fluxionary opened this issue Oct 28, 2022 · 1 comment

Comments

@fluxionary
Copy link
Contributor

this isn't easy to replicate w/out a lot of lag, but

  1. put fuel into the furnace, start smelting/cooking something.
  2. leave the area, so the furnace unloads. wait a while.
  3. return to the area and put more stuff in the furnace
  4. when the area "loads", all of the new stuff will be smelted, including stuff that was just added to the furnace.

probably the timer should "reset" if new things are added? though i'm not quite sure how to do that. the code is already fairly complicated.

@sfan5 sfan5 added the Bug label Oct 28, 2022
@sirrobzeroone
Copy link

I encountered the same issue when I added a catchup mechanic to the wine mod by Tenplus1. This can be fixed the problem you then have is:

If you reset the timer straight away if someone adds stuff then the items that should have legitmatly been smelted/cooked/whatevered then don't and unfortunatly this would then look like a bug to people as well.

I'm fairly sure on the wine mod but I'd have to go check my code I added an extra check if the formspec was loaded/opened and that would trigger sort of an override check and catchup/reset before a user can jam more ingredients in and get them cooked or in that case brewed for free :).

I'll see if I can get some time to get my head back around the furnace code and have a look at this I recall when I looked at the catchup code to see how it worked it had some other complexities inside it.

Do my best to keep any fix simple and then do PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants