From 28402ca6637118e2a86207899d28ffc0634aba26 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Mon, 5 Apr 2021 10:16:56 +0200 Subject: [PATCH] store tool wield scale in a global var --- mods/CORE/mcl_init/init.lua | 3 +++ mods/ITEMS/mcl_tools/init.lua | 2 +- mods/ITEMS/mcl_tools/mod.conf | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mods/CORE/mcl_init/init.lua b/mods/CORE/mcl_init/init.lua index 014a30d1e..066e555df 100644 --- a/mods/CORE/mcl_init/init.lua +++ b/mods/CORE/mcl_init/init.lua @@ -21,6 +21,9 @@ mcl_vars.gui_bg_img = "background9[1,1;1,1;mcl_base_textures_background9.png;tru -- Legacy mcl_vars.inventory_header = "" +-- Tool wield size +mcl_vars.tool_wield_scale = { x = 1.8, y = 1.8, z = 1 } + -- Mapgen variables local mg_name = minetest.get_mapgen_setting("mg_name") local minecraft_height_limit = 256 diff --git a/mods/ITEMS/mcl_tools/init.lua b/mods/ITEMS/mcl_tools/init.lua index bc6bed09f..b50782ec4 100644 --- a/mods/ITEMS/mcl_tools/init.lua +++ b/mods/ITEMS/mcl_tools/init.lua @@ -70,7 +70,7 @@ local shovel_use = S("To turn a grass block into a grass path, hold the shovel i local shears_longdesc = S("Shears are tools to shear sheep and to mine a few block types. Shears are a special mining tool and can be used to obtain the original item from grass, leaves and similar blocks that require cutting.") local shears_use = S("To shear sheep or carve faceless pumpkins, use the “place” key on them. Faces can only be carved at the side of faceless pumpkins. Mining works as usual, but the drops are different for a few blocks.") -local wield_scale = { x = 1.8, y = 1.8, z = 1 } +local wield_scale = mcl_vars.tool_wield_scale -- Picks minetest.register_tool("mcl_tools:pick_wood", { diff --git a/mods/ITEMS/mcl_tools/mod.conf b/mods/ITEMS/mcl_tools/mod.conf index f40547c26..d2d93197b 100644 --- a/mods/ITEMS/mcl_tools/mod.conf +++ b/mods/ITEMS/mcl_tools/mod.conf @@ -1,2 +1,2 @@ name = mcl_tools -depends = mcl_sounds +depends = mcl_sounds, mcl_init