Furnace out of fuel?

Posted:
Thu Nov 15, 2012 20:12
by OmniStudent
Does the furnace work in the current version of minetest master?
I have put both coal and wood in it, but get an "out of fuel" message from the furnace anyway.

Posted:
Thu Nov 15, 2012 20:37
by OmniStudent
But it works in the minimal game version

Posted:
Fri Nov 16, 2012 00:53
by tinoesroho
Then that means the issue is with your copy of minetest_game. Get a new copy!

Posted:
Fri Nov 16, 2012 11:03
by OmniStudent
Hm. The furnaces look different too between the minimal and regular versions.

Posted:
Fri Nov 16, 2012 14:25
by PilzAdam
The furnaces messages are not correctly if you just put fuel in it (IIRC). If you put something to cook/smelt in it it will change.

Posted:
Fri Nov 16, 2012 14:28
by OmniStudent
I tried to make coal out of wood when I got this error. Now it works - I think what solved it was changing to the stable version of minetest-game

Posted:
Fri Nov 16, 2012 14:29
by PilzAdam
You cant make coal out of wood.

Posted:
Sat Nov 17, 2012 14:50
by OmniStudent
OmniStudent wrote:I just did!
Oops, that was my doing:
I had added
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_craft({
type = "cooking",
output = "default:coal_lump",
recipe = "default:tree",
})
to line 480 of
/Users/me/minetest/minetest/games/minetest_game/mods/default/init.lua

Posted:
Wed Dec 05, 2012 08:08
by streondj
hey, I'm having same problem, "furnace out of fuel" using stable release version 0.4.3
the ubuntu default which is 0.3 something has it working, but can't make doors.
i didn't see any setting to change it to "minimal version" though ya, the graphics are much improved from 0.3.x and there is sound, so can probably update that in the website description.
edit to add: oh okay found the minimal, it's the developer version k.

Posted:
Wed Dec 05, 2012 17:43
by streondj
Hey, so I tested the latest version 0.4.4-dev minetest-game and same problem, furnace out of fuel. both in the minimal, and the game version, same thing for 0.4.3 neither of them have working furnaces.

Posted:
Wed Dec 05, 2012 19:49
by dannydark
streondj wrote:Hey, so I tested the latest version 0.4.4-dev minetest-game and same problem, furnace out of fuel. both in the minimal, and the game version, same thing for 0.4.3 neither of them have working furnaces.
The furnace will show "furnace out of fuel" even if fuel is in it (like PilzAdam said above) it will only change to "Furnace active: %" after you put something into smelt/cook.

Posted:
Wed Dec 05, 2012 21:53
by streondj
So I managed to get it working in the minimal,
in the game verison doesn't accept anything,
even if there is something to cook (wood -> ),
it's always out of fuel.
So I managed to get it working in the minimal,
in the game verison doesn't accept anything,
even if there is something to cook (wood),
it's always out of fuel.
----
been looking at the source files attempting to identify the issue,
seems like it may be that CRAFT_METHOD_FUEL doesn't have a return statement in craftdef.cpp
wheras CRAFT_METHOD_COOKING does have a return result lines, so would explain why cooking is working.
craftdef.cpp
else if(name == "fuel")
{
def = new CraftDefinitionFuel;
}
.
.
.
CraftInput CraftDefinitionFuel::getInput(const CraftOutput &output, IGameDef *gamedef) const
{
std::vector<std::string> rec;
rec.push_back(recipe);
return CraftInput(CRAFT_METHOD_COOKING,(int)burntime,craftGetItems(rec,gamedef));
}
craftdef.cpp te quote be
I'd think that it should say CRAFT_METHOD_FUEL
anyways if CRAFT_METHOD_FUEL isn't set somewhere, then the check for fuel will always return false
craftdef.cpp
bool CraftDefinitionFuel::check(const CraftInput &input, IGameDef *gamedef) const
{
if(input.method != CRAFT_METHOD_FUEL)
return false;
craftdef.cpp
as it is now, the above line 819 is the only mention of CRAFT_METHOD_FUEL in craftdef.cpp, so it makes sense that it's always false.
---
oh actually i'm not sure, it doesn't seem to make a different about the line now that I double checked, i'll do a full recompile see if it makes a difference.
---
yep there is absolutely no difference but w/e guess it couldn't hurt to patch the typo.
it works same way in minimal, and doesn't work in the game version just the same.
here is the patch anyways
craftdeff.cpp.diff
--- src/craftdef.cpp 2012-12-03 12:44:54.000000000 -0500
+++ ../../test/celeron55-minetest-a47b829/src/craftdef.cpp 2012-12-05 18:55:41.719732317 -0500
@@ -850,7 +850,7 @@
{
std::vector<std::string> rec;
rec.push_back(recipe);
- return CraftInput(CRAFT_METHOD_COOKING,(int)burntime,craftGetItems(rec,gamedef));
+ return CraftInput(CRAFT_METHOD_FUEL,(int)burntime,craftGetItems(rec,gamedef));
}
void CraftDefinitionFuel::decrementInput(CraftInput &input, IGameDef *gamedef) const
craftdeff.cpp.diff te patch be ya
----------------------------------
Okay, I found a rather brutish though simple solution for making furnace work in minetest_game by copying the minmal's default/init.lua overtop of the game's.
so the issue is within init.lua next step is to track it down.
-----
So i subdivided init.lua to make it more manageable into a number of files.
found the issue is in cook.lua
as Omnistudent refered, the problem was in lack of more
cook.lua
minetest.register_craft({
type = "cooking",
output = "default:coal_lump",
recipe = "default:tree",
})
cook.lua
anyways, guess i'll make a tarball of the fix..
----
been looking at the source files attempting to identify the issue,
seems like it may be that CRAFT_METHOD_FUEL doesn't have a return statement in craftdef.cpp
wheras CRAFT_METHOD_COOKING does have a return result lines, so would explain why cooking is working.
craftdef.cpp
else if(name == "fuel")
{
def = new CraftDefinitionFuel;
}
.
.
.
CraftInput CraftDefinitionFuel::getInput(const CraftOutput &output, IGameDef *gamedef) const
{
std::vector<std::string> rec;
rec.push_back(recipe);
return CraftInput(CRAFT_METHOD_COOKING,(int)burntime,craftGetItems(rec,gamedef));
}
craftdef.cpp te quote be
I'd think that it should say CRAFT_METHOD_FUEL
anyways if CRAFT_METHOD_FUEL isn't set somewhere, then the check for fuel will always return false
craftdef.cpp
bool CraftDefinitionFuel::check(const CraftInput &input, IGameDef *gamedef) const
{
if(input.method != CRAFT_METHOD_FUEL)
return false;
craftdef.cpp
as it is now, the above line 819 is the only mention of CRAFT_METHOD_FUEL in craftdef.cpp, so it makes sense that it's always false.
---
oh actually i'm not sure, it doesn't seem to make a different about the line now that I double checked, i'll do a full recompile see if it makes a difference.
---
yep there is absolutely no difference but w/e guess it couldn't hurt to patch the typo.
it works same way in minimal, and doesn't work in the game version just the same.
here is the patch anyways
craftdeff.cpp.diff
--- src/craftdef.cpp 2012-12-03 12:44:54.000000000 -0500
+++ ../../test/celeron55-minetest-a47b829/src/craftdef.cpp 2012-12-05 18:55:41.719732317 -0500
@@ -850,7 +850,7 @@
{
std::vector<std::string> rec;
rec.push_back(recipe);
- return CraftInput(CRAFT_METHOD_COOKING,(int)burntime,craftGetItems(rec,gamedef));
+ return CraftInput(CRAFT_METHOD_FUEL,(int)burntime,craftGetItems(rec,gamedef));
}
void CraftDefinitionFuel::decrementInput(CraftInput &input, IGameDef *gamedef) const
craftdeff.cpp.diff te patch be ya
----------------------------------
Okay, I found a rather brutish though simple solution for making furnace work in minetest_game by copying the minmal's default/init.lua overtop of the game's.
so the issue is within init.lua next step is to track it down.
-----

Posted:
Thu Dec 06, 2012 04:30
by streondj
Okay is solved,
i subdivided init.lua to make it more manageable into a number of files.
found the issue is in cook.lua
as Omnistudent refered, the problem was in lack of a function in cooking section
cook.lua
minetest.register_craft({
type = "cooking",
output = "default:coal_lump",
recipe = "default:tree",
})
cook.lua
anyways, guess i'll make a tarball of the fix.. it's of the default mod
http://weyounet.info/wp-content/uploads/2012/12/minetest-game-default-mod-fix.tgz