Fix random placing of painting ignoring number 1

This commit is contained in:
kilbith 2016-01-16 22:47:17 +01:00
parent aa49b0eb3b
commit 7431a31a4f

View File

@ -340,7 +340,9 @@ xdecor.register("painting_1", {
}, },
on_construct = function(pos) on_construct = function(pos)
local node = minetest.get_node(pos) local node = minetest.get_node(pos)
minetest.set_node(pos, {name="xdecor:painting_"..math.random(1,4), param2=node.param2}) local random = math.random(4)
if random == 1 then return end
minetest.set_node(pos, {name="xdecor:painting_"..random, param2=node.param2})
end end
}) })