]> git.lizzy.rs Git - xdecor.git/commitdiff
Fix random placing of painting ignoring number 1
authorkilbith <jeanpatrick.guerrero@gmail.com>
Sat, 16 Jan 2016 21:47:17 +0000 (22:47 +0100)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Sat, 16 Jan 2016 21:47:17 +0000 (22:47 +0100)
nodes.lua

index 87ab473eb5ea410d3f445e0ee186c07bcce7e110..b62b795eb1aa8fc1e250758e40ca8d5df69fa81c 100644 (file)
--- a/nodes.lua
+++ b/nodes.lua
@@ -340,7 +340,9 @@ xdecor.register("painting_1", {
        },
        on_construct = function(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
 })