From: Paramat Date: Sat, 31 Aug 2019 18:44:17 +0000 (+0100) Subject: Creative: Override the hand instead of re-registering X-Git-Tag: 5.1.0~28 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e8097c9e87b01771b7d9785d7e68e4a507bce09c;p=oweals%2Fminetest_game.git 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. --- diff --git a/mods/creative/init.lua b/mods/creative/init.lua index d1878f6a..7b7903d1 100644 --- a/mods/creative/init.lua +++ b/mods/creative/init.lua @@ -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, diff --git a/mods/creative/mod.conf b/mods/creative/mod.conf index 8f3fcd9f..0b3f745d 100644 --- a/mods/creative/mod.conf +++ b/mods/creative/mod.conf @@ -1,4 +1,3 @@ name = creative description = Minetest Game mod: creative -depends = sfinv -optional_depends = default +depends = default, sfinv