aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2018-10-16 06:25:34 +0200
committerParamat <paramat@users.noreply.github.com>2018-10-16 05:25:34 +0100
commit40ab3e011de5be83b342e5d2b67c2837294b2d58 (patch)
tree64f5379133fe2c47ee19428d29129cea35e4bab8 /games/minimal/mods
parentb6adb7f09e4375f145c3ddb592527c1dd0b026a2 (diff)
downloadminetest-40ab3e011de5be83b342e5d2b67c2837294b2d58.tar.gz
minetest-40ab3e011de5be83b342e5d2b67c2837294b2d58.tar.bz2
minetest-40ab3e011de5be83b342e5d2b67c2837294b2d58.zip
Add disable_repair group to prevent tool repair (#7381)
Diffstat (limited to 'games/minimal/mods')
-rw-r--r--games/minimal/mods/experimental/init.lua28
1 files changed, 28 insertions, 0 deletions
diff --git a/games/minimal/mods/experimental/init.lua b/games/minimal/mods/experimental/init.lua
index 4d4e3e90c..e8aeff2b3 100644
--- a/games/minimal/mods/experimental/init.lua
+++ b/games/minimal/mods/experimental/init.lua
@@ -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 = {