Merge pull request #2 from LoneWolfHT/patch-1

Improve game support
This commit is contained in:
cultom
2021-01-01 11:32:46 +01:00
committed by GitHub
2 changed files with 18 additions and 14 deletions

View File

@ -26,20 +26,22 @@ minetest.register_tool("hammermod:steel_hammer", {
})
local ingredients = {
stick = "default:stick",
ironBlock = "default:steelblock",
ironIngot = "default:steel_ingot",
}
local ingredients
if minetest.get_modpath("mcl_core") then
ingredients = {
stick = "mcl_core:stick",
ironBlock = "mcl_core:ironblock",
ironIngot = "mcl_core:iron_ingot",
}
elseif minetest.get_modpath("default") then
ingredients = {
stick = "default:stick",
ironBlock = "default:steelblock",
ironIngot = "default:steel_ingot",
}
end
if ingredients then
minetest.register_craft({
output = "hammermod:steel_hammer",
recipe = {
@ -48,6 +50,7 @@ minetest.register_craft({
{"", ingredients.stick, ""},
},
})
end
local steelHammerDigs = {}

View File

@ -1,2 +1,3 @@
name = hammermod
description = Adds a steel hammer which allows to dig 3x3.
optional_depends = default, mcl_core