mirror of
https://github.com/minetest/minetest.git
synced 2024-12-28 19:50:28 +01:00
Devtest hand tool: Update capabilities, add creative mode capabilities (#10484)
This commit is contained in:
parent
fc2e120b03
commit
2f871e3b49
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
Tool types:
|
Tool types:
|
||||||
|
|
||||||
* Hand: basic tool/weapon (just for convenience, not optimized for testing)
|
* Hand: basic tool/weapon (special capabilities in creative mode)
|
||||||
* Pickaxe: dig cracky
|
* Pickaxe: dig cracky
|
||||||
* Axe: dig choppy
|
* Axe: dig choppy
|
||||||
* Shovel: dig crumbly
|
* Shovel: dig crumbly
|
||||||
@ -24,21 +24,49 @@ Tool materials:
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
-- The hand
|
-- The hand
|
||||||
minetest.register_item(":", {
|
if minetest.settings:get_bool("creative_mode") then
|
||||||
type = "none",
|
local digtime = 42
|
||||||
wield_image = "wieldhand.png",
|
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
|
||||||
wield_scale = {x=1,y=1,z=2.5},
|
|
||||||
tool_capabilities = {
|
minetest.register_item(":", {
|
||||||
full_punch_interval = 1.0,
|
type = "none",
|
||||||
max_drop_level = 0,
|
wield_image = "wieldhand.png",
|
||||||
groupcaps = {
|
wield_scale = {x = 1, y = 1, z = 2.5},
|
||||||
crumbly = {times={[3]=1.50}, uses=0, maxlevel=0},
|
range = 10,
|
||||||
snappy = {times={[3]=1.50}, uses=0, maxlevel=0},
|
tool_capabilities = {
|
||||||
oddly_breakable_by_hand = {times={[1]=7.00,[2]=4.00,[3]=2.00}, uses=0, maxlevel=0},
|
full_punch_interval = 0.5,
|
||||||
},
|
max_drop_level = 3,
|
||||||
damage_groups = {fleshy=1},
|
groupcaps = {
|
||||||
}
|
crumbly = caps,
|
||||||
})
|
cracky = caps,
|
||||||
|
snappy = caps,
|
||||||
|
choppy = caps,
|
||||||
|
oddly_breakable_by_hand = caps,
|
||||||
|
-- dig_immediate group doesn't use value 1. Value 3 is instant dig
|
||||||
|
dig_immediate =
|
||||||
|
{times = {[2] = digtime, [3] = 0}, uses = 0, maxlevel = 256},
|
||||||
|
},
|
||||||
|
damage_groups = {fleshy = 10},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
else
|
||||||
|
minetest.register_item(":", {
|
||||||
|
type = "none",
|
||||||
|
wield_image = "wieldhand.png",
|
||||||
|
wield_scale = {x = 1, y = 1, z = 2.5},
|
||||||
|
tool_capabilities = {
|
||||||
|
full_punch_interval = 0.9,
|
||||||
|
max_drop_level = 0,
|
||||||
|
groupcaps = {
|
||||||
|
crumbly = {times = {[2] = 3.00, [3] = 0.70}, uses = 0, maxlevel = 1},
|
||||||
|
snappy = {times = {[3] = 0.40}, uses = 0, maxlevel = 1},
|
||||||
|
oddly_breakable_by_hand =
|
||||||
|
{times = {[1] = 3.50, [2] = 2.00, [3] = 0.70}, uses = 0}
|
||||||
|
},
|
||||||
|
damage_groups = {fleshy = 1},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
-- Mese Pickaxe: special tool that digs "everything" instantly
|
-- Mese Pickaxe: special tool that digs "everything" instantly
|
||||||
minetest.register_tool("basetools:pick_mese", {
|
minetest.register_tool("basetools:pick_mese", {
|
||||||
|
Loading…
Reference in New Issue
Block a user