Skip to content

Commit 27eedcb

Browse files
committed
Don't crash when mesecons disabled
1 parent 71ff1f5 commit 27eedcb

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

streets_bollards/init.lua

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,22 @@ minetest.register_node("streets:bollard_driver", {
3232
-- on_rightclick = toggle_bollard, -- Automatic bollards mustn't be toggled manually!
3333
mesecons = {
3434
effector = {
35-
rules = mesecon.rules.default,
35+
rules = {
36+
{x= 0, y= 0, z=-1},
37+
{x= 0, y= 0, z= 1},
38+
{x= 1, y= 0, z= 0},
39+
{x=-1, y= 0, z= 0},
40+
{x= 0, y=-1, z= 0},
41+
{x= 0, y= 1, z= 0},
42+
{x= 1, y= 1, z= 0},
43+
{x= 1, y=-1, z= 0},
44+
{x=-1, y= 1, z= 0},
45+
{x=-1, y=-1, z= 0},
46+
{x= 0, y= 1, z= 1},
47+
{x= 0, y=-1, z= 1},
48+
{x= 0, y= 1, z=-1},
49+
{x= 0, y=-1, z=-1}
50+
},
3651
action_off = function(pos, node)
3752
toggle_bollard(vector.add(pos, vector.new(0, 1, 0)), node, nil, nil, { type = "node", under = vector.add(pos, vector.new(0, -1, 0)), above = vector.add(pos, vector.new(0, 1, 0)) }, "up")
3853
end,

0 commit comments

Comments
 (0)