mirror of
https://github.com/mt-mods/round_trunks.git
synced 2024-12-13 09:33:18 +01:00
use lbm for fixing trunks
This commit is contained in:
parent
10a403d351
commit
883e2b8c30
16
init.lua
16
init.lua
@ -12,7 +12,7 @@ local trees={
|
||||
{ "default:cactus", "default_cactus_top.png" }
|
||||
}
|
||||
|
||||
--local trees2 = {}
|
||||
local trees2 = {}
|
||||
|
||||
for _,tree in pairs(trees) do
|
||||
local nodename, top = unpack(tree)
|
||||
@ -34,7 +34,7 @@ for _,tree in pairs(trees) do
|
||||
paramtype = "light",
|
||||
})
|
||||
|
||||
--trees2[#trees2+1] = nodename
|
||||
trees2[#trees2+1] = nodename
|
||||
|
||||
minetest.register_node(":"..nodename.."_cube", def)
|
||||
|
||||
@ -56,15 +56,13 @@ for _,tree in pairs(trees) do
|
||||
})
|
||||
end
|
||||
|
||||
--[[ If this abm was good for something, it should have been documented.
|
||||
minetest.register_abm({
|
||||
-- [[ This lbm should fix black trunks.
|
||||
minetest.register_lbm({
|
||||
name = "round_trunks:trunkfix",
|
||||
nodenames = trees2,
|
||||
chance = 2,
|
||||
interval = 1,
|
||||
action = function(pos, node)
|
||||
if node.param1 == 0 then
|
||||
minetest.set_node(pos, {name = node.name, param2 = node.param2 })
|
||||
end
|
||||
node.param1 = nil
|
||||
minetest.set_node(pos, node)
|
||||
end
|
||||
})
|
||||
--]]
|
||||
|
Loading…
Reference in New Issue
Block a user