Creative: Override the hand instead of re-registering

Allows the initial hand registration to alter the 'wield_scale' without
needing to also alter it in creative mod.
Also make default mod a dependency again, as the initial hand
registration is required.
This commit is contained in:
Paramat 2019-08-31 19:44:17 +01:00 committed by GitHub
parent 5c3e4b1d20
commit e8097c9e87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View File

@ -40,10 +40,8 @@ if creative_mode_cache then
local digtime = 42 local digtime = 42
local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256} local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
minetest.register_item(":", { -- Override the hand tool
type = "none", minetest.override_item("", {
wield_image = "wieldhand.png",
wield_scale = {x = 1, y = 1, z = 2.5},
range = 10, range = 10,
tool_capabilities = { tool_capabilities = {
full_punch_interval = 0.5, full_punch_interval = 0.5,

View File

@ -1,4 +1,3 @@
name = creative name = creative
description = Minetest Game mod: creative description = Minetest Game mod: creative
depends = sfinv depends = default, sfinv
optional_depends = default