mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-24 11:53:46 +01:00
reformated code.
This commit is contained in:
parent
1558c852d8
commit
f6b77aa458
@ -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
|
||||
--]]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user