mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Add disable_repair group to prevent tool repair (#7381)
This commit is contained in:
parent
b6adb7f09e
commit
40ab3e011d
3 changed files with 33 additions and 1 deletions
|
@ -615,6 +615,34 @@ minetest.register_craftitem("experimental:tester_tool_2", {
|
|||
end,
|
||||
})
|
||||
|
||||
-- Test the disable_repair=1 group
|
||||
minetest.register_tool("experimental:unrepairable_tool", {
|
||||
description = "Unrepairable Tool",
|
||||
wield_image = "default_stone.png",
|
||||
inventory_image = "default_stone.png",
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {3, 2, 1},
|
||||
}
|
||||
}
|
||||
},
|
||||
groups = { disable_repair = 1 }
|
||||
})
|
||||
|
||||
minetest.register_tool("experimental:repairable_tool", {
|
||||
description = "Repairable Tool",
|
||||
wield_image = "default_dirt.png",
|
||||
inventory_image = "default_dirt.png",
|
||||
tool_capabilities = {
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {3, 2, 1},
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'experimental:tester_tool_2',
|
||||
recipe = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue