mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-08-19 21:44:12 +02:00
Undo mesecon.register_mvps_dropper() and use abms until more research can be done.
This commit is contained in:
parent
6c0525f00e
commit
1558c852d8
@ -69,6 +69,7 @@ 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
|
||||
|
||||
|
@ -35,23 +35,37 @@ minetest.register_abm({
|
||||
end,
|
||||
})
|
||||
|
||||
--[[ TODO: Figure out how to make this work:
|
||||
local function dropper_call(node, pushdir, stack, stackid)
|
||||
mcl_bamboo.mcl_log("mvps_dropper call for bamboo:")
|
||||
-- mcl_bamboo.break_orphaned()
|
||||
|
||||
mcl_bamboo.mcl_log(dump(node))
|
||||
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mesecons_mvps") then
|
||||
if mesecons_mvps then
|
||||
if mesecon then
|
||||
mcl_bamboo.mcl_log("registering mvps_dropper for bamboo:")
|
||||
for x = 1, #mcl_bamboo.bamboo_index do
|
||||
mesecon.register_mvps_dropper(mcl_bamboo.bamboo_index[x], mcl_bamboo.break_orphaned)
|
||||
mesecon.register_mvps_dropper(mcl_bamboo.bamboo_index[x],dropper_call)
|
||||
mcl_bamboo.mcl_log("registering: " .. mcl_bamboo.bamboo_index[x])
|
||||
end
|
||||
end
|
||||
else
|
||||
minetest.register_abm({
|
||||
label = "Break Orphaned Bamboo",
|
||||
nodenames = mcl_bamboo.bamboo_index,
|
||||
interval = 1.5,
|
||||
chance = 1,
|
||||
action = function(pos, _)
|
||||
mcl_bamboo.break_orphaned(pos)
|
||||
end,
|
||||
})
|
||||
end
|
||||
--]]
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Break Orphaned Bamboo",
|
||||
nodenames = mcl_bamboo.bamboo_index,
|
||||
interval = 1.5,
|
||||
chance = 1,
|
||||
action = function(pos, _)
|
||||
mcl_bamboo.break_orphaned(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
-- Base Aliases.
|
||||
local SCAFFOLDING_NAME = "mcl_bamboo:scaffolding"
|
||||
|
Loading…
Reference in New Issue
Block a user