mirror of
https://github.com/cultom/hammermod.git
synced 2024-11-19 21:33:46 +01:00
commit
cd23d03109
31
init.lua
31
init.lua
@ -26,28 +26,31 @@ minetest.register_tool("hammermod:steel_hammer", {
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
local ingredients = {
|
local ingredients
|
||||||
stick = "default:stick",
|
|
||||||
ironBlock = "default:steelblock",
|
|
||||||
ironIngot = "default:steel_ingot",
|
|
||||||
}
|
|
||||||
|
|
||||||
if minetest.get_modpath("mcl_core") then
|
if minetest.get_modpath("mcl_core") then
|
||||||
ingredients = {
|
ingredients = {
|
||||||
stick = "mcl_core:stick",
|
stick = "mcl_core:stick",
|
||||||
ironBlock = "mcl_core:ironblock",
|
ironBlock = "mcl_core:ironblock",
|
||||||
ironIngot = "mcl_core:iron_ingot",
|
ironIngot = "mcl_core:iron_ingot",
|
||||||
}
|
}
|
||||||
|
elseif minetest.get_modpath("default") then
|
||||||
|
ingredients = {
|
||||||
|
stick = "default:stick",
|
||||||
|
ironBlock = "default:steelblock",
|
||||||
|
ironIngot = "default:steel_ingot",
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craft({
|
if ingredients then
|
||||||
output = "hammermod:steel_hammer",
|
minetest.register_craft({
|
||||||
recipe = {
|
output = "hammermod:steel_hammer",
|
||||||
{ingredients.ironIngot, ingredients.ironBlock, ingredients.ironIngot},
|
recipe = {
|
||||||
{"", ingredients.stick, ""},
|
{ingredients.ironIngot, ingredients.ironBlock, ingredients.ironIngot},
|
||||||
{"", ingredients.stick, ""},
|
{"", ingredients.stick, ""},
|
||||||
},
|
{"", ingredients.stick, ""},
|
||||||
})
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local steelHammerDigs = {}
|
local steelHammerDigs = {}
|
||||||
|
1
mod.conf
1
mod.conf
@ -1,2 +1,3 @@
|
|||||||
name = hammermod
|
name = hammermod
|
||||||
description = Adds a steel hammer which allows to dig 3x3.
|
description = Adds a steel hammer which allows to dig 3x3.
|
||||||
|
optional_depends = default, mcl_core
|
||||||
|
Loading…
Reference in New Issue
Block a user