From f6b77aa45808cd2d6d8ba98ac489aca2459a05c9 Mon Sep 17 00:00:00 2001 From: Michieal Date: Thu, 9 Feb 2023 22:36:25 -0500 Subject: [PATCH] reformated code. --- mods/ITEMS/mcl_bamboo/globals.lua | 34 +++++++++++++++---------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/mods/ITEMS/mcl_bamboo/globals.lua b/mods/ITEMS/mcl_bamboo/globals.lua index 8cde95aa0..f96395228 100644 --- a/mods/ITEMS/mcl_bamboo/globals.lua +++ b/mods/ITEMS/mcl_bamboo/globals.lua @@ -70,26 +70,26 @@ local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap" -- For when I learn more about the pistons... function mcl_bamboo.break_orphaned(pos) mcl_bamboo.mcl_log("Break_Orphaned called.") - local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0)) - local node_name = node_below.name + local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0)) + local node_name = node_below.name - -- short circuit checks. - if mcl_bamboo.is_dirt(node_name) or mcl_bamboo.is_bamboo(node_name) or mcl_bamboo.is_bamboo(minetest.get_node(pos).name) == false then - return - end + -- short circuit checks. + if mcl_bamboo.is_dirt(node_name) or mcl_bamboo.is_bamboo(node_name) or mcl_bamboo.is_bamboo(minetest.get_node(pos).name) == false then + return + end - -- dig the node. - minetest.remove_node(pos) -- if that fails, remove the node - local istack = ItemStack("mcl_bamboo:bamboo") - local sound_params = { - pos = pos, - gain = 1.0, -- default - max_hear_distance = 10, -- default, uses a Euclidean metric - } + -- dig the node. + minetest.remove_node(pos) -- if that fails, remove the node + local istack = ItemStack("mcl_bamboo:bamboo") + local sound_params = { + pos = pos, + gain = 1.0, -- default + max_hear_distance = 10, -- default, uses a Euclidean metric + } - minetest.remove_node(pos) - minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true) - minetest.add_item(pos, istack) + minetest.remove_node(pos) + minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true) + minetest.add_item(pos, istack) end --]]