-
Notifications
You must be signed in to change notification settings - Fork 18
/
common.lua
40 lines (36 loc) · 925 Bytes
/
common.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
scifi_nodes.slope_selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
}
}
scifi_nodes.slope_collision_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
}
}