[Offline furnace, cheat]

User avatar
bosapara
Member
 
Posts: 558
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara

[Offline furnace, cheat]

by bosapara » Sat Jan 11, 2020 20:10

Furnace can cook even when no one is around. Put something in furnace -> go to offline -> come back and take all cooked things.

It can bring some lag when players using too many furnaces.

Checked in 4.17.1 and 5.1.0, all the same.

Any idea how to prevent this cheat? (imho)

Image
 

User avatar
Krock
Developer
 
Posts: 4478
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Offline furnace, cheat]

by Krock » Sat Jan 11, 2020 20:55

This is a feature. It works roughly as follows:
Code: Select all
time_last = last time visited
time_now = current timestamp

while true do
   cook_time = getCookTime()

   if cook_time > time_now - time_last then
      break -- cannot cook more
   end

   doCook()
   time_last = time_last + cook_time
end


EDIT: The most lag that you notice is caused by inventory updates which was improved in 5.2.0-dev.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
bosapara
Member
 
Posts: 558
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara

Re: [Offline furnace, cheat]

by bosapara » Sat Jan 11, 2020 21:16

Krock wrote:This is a feature.


Its clear how it works, but is it possible to prevent offline work without changing furnace from timer to ABM?
 

User avatar
Krock
Developer
 
Posts: 4478
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Offline furnace, cheat]

by Krock » Sun Jan 12, 2020 15:06

Code: Select all
   elapsed = math.min(1.0, elapsed)
   while elapsed > 0 and update do


https://github.com/minetest/minetest_ga ... e.lua#L120
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
bosapara
Member
 
Posts: 558
Joined: Fri Apr 07, 2017 08:49
GitHub: bosapara

Re: [Offline furnace, cheat]

by bosapara » Sun Jan 12, 2020 17:15

Krock, thanks you again, it works perfect.

Would be good if it could be setup in config for future versions of minetest, kind of: online_furnace = true

______________________________________________________________________

Just in case, for another users show difference between 2 furnaces:

Image
 


Return to General Discussion



Who is online

Users browsing this forum: MSN [Bot] and 20 guests