Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MineClone/MineClonia Compatibility #20

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion depends.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
default
default?
mcl_tools?
103 changes: 72 additions & 31 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function toolranks.get_tool_type(description)
return "hoe"
elseif string.find(d, "sword") then
return "sword"
elseif string.find(d, "shears") then
return "shears"
else
return "tool"
end
Expand Down Expand Up @@ -154,34 +156,73 @@ function toolranks.add_tool(name)
})
end

-- Sword
toolranks.add_tool("default:sword_wood")
toolranks.add_tool("default:sword_stone")
toolranks.add_tool("default:sword_steel")
toolranks.add_tool("default:sword_bronze")
toolranks.add_tool("default:sword_mese")
toolranks.add_tool("default:sword_diamond")

-- Pickaxe
toolranks.add_tool("default:pick_wood")
toolranks.add_tool("default:pick_stone")
toolranks.add_tool("default:pick_steel")
toolranks.add_tool("default:pick_bronze")
toolranks.add_tool("default:pick_mese")
toolranks.add_tool("default:pick_diamond")

-- Axe
toolranks.add_tool("default:axe_wood")
toolranks.add_tool("default:axe_stone")
toolranks.add_tool("default:axe_steel")
toolranks.add_tool("default:axe_bronze")
toolranks.add_tool("default:axe_mese")
toolranks.add_tool("default:axe_diamond")

-- Shovel
toolranks.add_tool("default:shovel_wood")
toolranks.add_tool("default:shovel_stone")
toolranks.add_tool("default:shovel_steel")
toolranks.add_tool("default:shovel_bronze")
toolranks.add_tool("default:shovel_mese")
toolranks.add_tool("default:shovel_diamond")
if minetest.get_modpath("default") then
-- Sword
toolranks.add_tool("default:sword_wood")
toolranks.add_tool("default:sword_stone")
toolranks.add_tool("default:sword_steel")
toolranks.add_tool("default:sword_bronze")
toolranks.add_tool("default:sword_mese")
toolranks.add_tool("default:sword_diamond")

-- Pickaxe
toolranks.add_tool("default:pick_wood")
toolranks.add_tool("default:pick_stone")
toolranks.add_tool("default:pick_steel")
toolranks.add_tool("default:pick_bronze")
toolranks.add_tool("default:pick_mese")
toolranks.add_tool("default:pick_diamond")

-- Axe
toolranks.add_tool("default:axe_wood")
toolranks.add_tool("default:axe_stone")
toolranks.add_tool("default:axe_steel")
toolranks.add_tool("default:axe_bronze")
toolranks.add_tool("default:axe_mese")
toolranks.add_tool("default:axe_diamond")

-- Shovel
toolranks.add_tool("default:shovel_wood")
toolranks.add_tool("default:shovel_stone")
toolranks.add_tool("default:shovel_steel")
toolranks.add_tool("default:shovel_bronze")
toolranks.add_tool("default:shovel_netherite")
toolranks.add_tool("default:shovel_diamond")
end

if minetest.get_modpath("mcl_tools") then
-- Sword
toolranks.add_tool("mcl_tools:sword_wood")
toolranks.add_tool("mcl_tools:sword_stone")
toolranks.add_tool("mcl_tools:sword_iron")
toolranks.add_tool("mcl_tools:sword_gold")
toolranks.add_tool("mcl_tools:sword_netherite")
toolranks.add_tool("mcl_tools:sword_diamond")

-- Pickaxe
toolranks.add_tool("mcl_tools:pick_wood")
toolranks.add_tool("mcl_tools:pick_stone")
toolranks.add_tool("mcl_tools:pick_iron")
toolranks.add_tool("mcl_tools:pick_gold")
toolranks.add_tool("mcl_tools:pick_netherite")
toolranks.add_tool("mcl_tools:pick_diamond")

-- Axe
toolranks.add_tool("mcl_tools:axe_wood")
toolranks.add_tool("mcl_tools:axe_stone")
toolranks.add_tool("mcl_tools:axe_iron")
toolranks.add_tool("mcl_tools:axe_gold")
toolranks.add_tool("mcl_tools:axe_netherite")
toolranks.add_tool("mcl_tools:axe_diamond")

-- Shovel
toolranks.add_tool("mcl_tools:shovel_wood")
toolranks.add_tool("mcl_tools:shovel_stone")
toolranks.add_tool("mcl_tools:shovel_iron")
toolranks.add_tool("mcl_tools:shovel_gold")
toolranks.add_tool("mcl_tools:shovel_netherite")
toolranks.add_tool("mcl_tools:shovel_diamond")

-- shears
toolranks.add_tool("mcl_tools:shears")
end
2 changes: 1 addition & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
name = toolranks
depends = default
optional_depends = default, mcl_tools