Creative: Override the hand instead of re-registering
authorParamat <paramat@users.noreply.github.com>
Sat, 31 Aug 2019 18:44:17 +0000 (19:44 +0100)
committerGitHub <noreply@github.com>
Sat, 31 Aug 2019 18:44:17 +0000 (19:44 +0100)
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.

mods/creative/init.lua
mods/creative/mod.conf

index d1878f6a62e14c179a814c737cddd95d4037122f..7b7903d13410c91781e50b6b200fbc32244e7170 100644 (file)
@@ -40,10 +40,8 @@ if creative_mode_cache then
        local digtime = 42
        local caps = {times = {digtime, digtime, digtime}, uses = 0, maxlevel = 256}
 
-       minetest.register_item(":", {
-               type = "none",
-               wield_image = "wieldhand.png",
-               wield_scale = {x = 1, y = 1, z = 2.5},
+       -- Override the hand tool
+       minetest.override_item("", {
                range = 10,
                tool_capabilities = {
                        full_punch_interval = 0.5,
index 8f3fcd9f9745d188c42f6de2b319c6c8c916338b..0b3f745dc403981a02a9533f543fde6b88d8f5c8 100644 (file)
@@ -1,4 +1,3 @@
 name = creative
 description = Minetest Game mod: creative
-depends = sfinv
-optional_depends = default
+depends = default, sfinv