mirror of
https://github.com/luanti-org/minetest_game.git
synced 2025-05-21 14:53:16 -04:00
default: Loop over tool fuel recipes.
v2: Rename 'fuel_recipes' to 'wood_tool_fuel'.
This commit is contained in:
parent
695f98f213
commit
a3731727d7
1 changed files with 16 additions and 21 deletions
|
@ -493,26 +493,21 @@ minetest.register_tool("default:key", {
|
|||
end
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:pick_wood",
|
||||
burntime = 6,
|
||||
})
|
||||
--
|
||||
-- Fuel
|
||||
--
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:shovel_wood",
|
||||
burntime = 4,
|
||||
})
|
||||
local wood_tool_fuel = {
|
||||
pick = 6,
|
||||
shovel = 4,
|
||||
axe = 6,
|
||||
sword = 5
|
||||
}
|
||||
|
||||
for tool, burn in pairs(wood_tool_fuel) do
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:axe_wood",
|
||||
burntime = 6,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:sword_wood",
|
||||
burntime = 5,
|
||||
recipe = "default:".. tool .."_wood",
|
||||
burntime = burn,
|
||||
})
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue