From 40ab3e011de5be83b342e5d2b67c2837294b2d58 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 16 Oct 2018 06:25:34 +0200 Subject: Add disable_repair group to prevent tool repair (#7381) --- games/minimal/mods/experimental/init.lua | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'games/minimal/mods/experimental') 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 = { -- cgit v1.2.3