Fix wires not connected to locked repeater

This commit is contained in:
Elias Åström 2024-10-25 16:06:25 +02:00 committed by cora
parent d5268a5e39
commit 3f8b8ccff0

View File

@ -66,7 +66,7 @@ local commdef = {
_redstone = { _redstone = {
connects_to = function(node, dir) connects_to = function(node, dir)
local fourdir = minetest.dir_to_fourdir(dir) local fourdir = minetest.dir_to_fourdir(dir)
return node.param2 == fourdir or (node.param2 + 2) % 4 == fourdir return node.param2 % 4 == fourdir or (node.param2 + 2) % 4 == fourdir
end, end,
update = function(pos, node) update = function(pos, node)
local was_locked = minetest.get_item_group(node.name, "redstone_repeater") == 5 local was_locked = minetest.get_item_group(node.name, "redstone_repeater") == 5