Add porcelain pickaxe to test tool uses

particuarly to falsify the claim in https://git.minetest.land/MineClone2/MineClone2/issues/3931
that the last use of a tool does not respect dig times - it does.
This commit is contained in:
cora 2023-09-13 17:08:15 +02:00
parent c5e46b6efb
commit dbf80270ef
2 changed files with 26 additions and 0 deletions

24
toolstest/init.lua Normal file
View File

@ -0,0 +1,24 @@
local modname = minetest.get_current_modname()
--local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
minetest.register_tool("toolstest:fragile_pick", {
description = S("Porcellain Pickaxe"),
_doc_items_longdesc = S("Fast digging but fragile pickaxe with 2 uses"),
_doc_items_hidden = false,
inventory_image = "default_tool_woodpick.png^[colorize:#FAFAFE",
groups = { tool=1, pickaxe=1, dig_speed_class=2, enchantability=15 },
tool_capabilities = {
-- 1/1.2
full_punch_interval = 0.83333333,
max_drop_level=1,
damage_groups = {fleshy=2},
punch_attack_uses = 2,
},
sound = { breaks = "default_tool_breaks" },
_repair_material = "group:wood",
_mcl_toollike_wield = true,
_mcl_diggroups = {
pickaxey = { speed = 9.5, level = 6, uses = 2 }
},
})

2
toolstest/mod.conf Normal file
View File

@ -0,0 +1,2 @@
name = toolstest
author = cora