Krock wrote:Create a new mod with the dependency on default.
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
local to_delete = {
"pick", "shovel", "axe", "sword"
}
for i,v in ipairs(to_delete) do
minetest.registered_tools["default:"..v.."_diamond"] = nil
end
Unfortunately, this does not work.
It removes it from the that global table but it is still available in the game.
This works, sort of...
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.registered_items["default:sword_diamond"] = nil
If it is already in the game you can still use it but it no longer in the inventory. The crafting recipe will still produce one.
This seems to work completely...
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_tool(":default:sword_diamond", {})
Will continue testing as I work on this weapons mod.
Thanks Krock. You pointed me in the proper direction of what I should have been looking for.