1
0
mirror of https://github.com/D00Med/scifi_nodes.git synced 2025-06-30 15:10:46 +02:00

move switches,palm-scanner and digicode to own file

This commit is contained in:
Thomas Rudin
2019-09-09 18:23:50 +02:00
parent 707c21250e
commit 974c147b45
6 changed files with 363 additions and 357 deletions

22
common.lua Normal file
View File

@ -0,0 +1,22 @@
function scifi_nodes.get_switch_rules(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