mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-03-21 03:20:38 +01:00
use ifs again
This commit is contained in:
parent
c16fc71746
commit
182e7ab96b
@ -142,7 +142,11 @@ plg.register_nodes({
|
||||
if o and o.type == "io" then
|
||||
local num = abcd2[o.port]
|
||||
num = num + dir
|
||||
num = (2 ^ num % 2) * 4 + num - math.floor(num / 5) * 4
|
||||
if num > 4 then
|
||||
num = 1
|
||||
elseif num < 1 then
|
||||
num = 4
|
||||
end
|
||||
instr[i][op].port = abcd1[num]
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user