reformated code.

This commit is contained in:
Michieal 2023-02-09 22:36:25 -05:00 committed by Gitea
parent 1558c852d8
commit f6b77aa458
1 changed files with 17 additions and 17 deletions

View File

@ -70,26 +70,26 @@ local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap"
-- For when I learn more about the pistons... -- For when I learn more about the pistons...
function mcl_bamboo.break_orphaned(pos) function mcl_bamboo.break_orphaned(pos)
mcl_bamboo.mcl_log("Break_Orphaned called.") mcl_bamboo.mcl_log("Break_Orphaned called.")
local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0)) local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0))
local node_name = node_below.name local node_name = node_below.name
-- short circuit checks. -- 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 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 return
end end
-- dig the node. -- dig the node.
minetest.remove_node(pos) -- if that fails, remove the node minetest.remove_node(pos) -- if that fails, remove the node
local istack = ItemStack("mcl_bamboo:bamboo") local istack = ItemStack("mcl_bamboo:bamboo")
local sound_params = { local sound_params = {
pos = pos, pos = pos,
gain = 1.0, -- default gain = 1.0, -- default
max_hear_distance = 10, -- default, uses a Euclidean metric max_hear_distance = 10, -- default, uses a Euclidean metric
} }
minetest.remove_node(pos) minetest.remove_node(pos)
minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true) minetest.sound_play(mcl_sounds.node_sound_wood_defaults().dug, sound_params, true)
minetest.add_item(pos, istack) minetest.add_item(pos, istack)
end end
--]] --]]