mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2024-12-23 00:20:17 +01:00
23 lines
462 B
Lua
23 lines
462 B
Lua
|
|
|
|
scifi_nodes.get_switch_rules = function(param2)
|
|
|
|
-- param2 = 2
|
|
local rules = {
|
|
{x=1, y=-1, z=-1},
|
|
{x=1, y=-1, z=1},
|
|
{x=0, y=-1, z=-1},
|
|
{x=0, y=-1, z=1},
|
|
}
|
|
|
|
-- Left and right when looking to +y ?
|
|
if param2 == 3 then
|
|
rules = mesecon.rotate_rules_right(mesecon.rotate_rules_right (rules))
|
|
elseif param2 == 4 then
|
|
rules = mesecon.rotate_rules_right(rules)
|
|
elseif param2 == 5 then
|
|
rules = mesecon.rotate_rules_left(rules)
|
|
end
|
|
return rules
|
|
end
|