mirror of
https://github.com/mt-mods/round_trunks.git
synced 2024-10-05 17:23:04 +02: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" }
|
{ "default:cactus", "default_cactus_top.png" }
|
||||||
}
|
}
|
||||||
|
|
||||||
--local trees2 = {}
|
local trees2 = {}
|
||||||
|
|
||||||
for _,tree in pairs(trees) do
|
for _,tree in pairs(trees) do
|
||||||
local nodename, top = unpack(tree)
|
local nodename, top = unpack(tree)
|
||||||
@ -34,7 +34,7 @@ for _,tree in pairs(trees) do
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
})
|
})
|
||||||
|
|
||||||
--trees2[#trees2+1] = nodename
|
trees2[#trees2+1] = nodename
|
||||||
|
|
||||||
minetest.register_node(":"..nodename.."_cube", def)
|
minetest.register_node(":"..nodename.."_cube", def)
|
||||||
|
|
||||||
@ -56,15 +56,13 @@ for _,tree in pairs(trees) do
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[ If this abm was good for something, it should have been documented.
|
-- [[ This lbm should fix black trunks.
|
||||||
minetest.register_abm({
|
minetest.register_lbm({
|
||||||
|
name = "round_trunks:trunkfix",
|
||||||
nodenames = trees2,
|
nodenames = trees2,
|
||||||
chance = 2,
|
|
||||||
interval = 1,
|
|
||||||
action = function(pos, node)
|
action = function(pos, node)
|
||||||
if node.param1 == 0 then
|
node.param1 = nil
|
||||||
minetest.set_node(pos, {name = node.name, param2 = node.param2 })
|
minetest.set_node(pos, node)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
--]]
|
--]]
|
||||||
|
Loading…
Reference in New Issue
Block a user