|
1 | 1 | -- Localize globals
|
2 |
| -local assert, ipairs, math, minetest, pairs, table, type, vector |
3 |
| - = assert, ipairs, math, minetest, pairs, table, type, vector |
| 2 | +local assert, ipairs, math, minetest, table, type, vector |
| 3 | + = assert, ipairs, math, minetest, table, type, vector |
4 | 4 |
|
5 | 5 | -- Set environment
|
6 | 6 | local _ENV = ...
|
@@ -48,7 +48,7 @@ local function get_node_boxes(pos, type)
|
48 | 48 | if box_type == "leveled" then
|
49 | 49 | boxes = table.copy(boxes)
|
50 | 50 | local level = (paramtype2 == "leveled" and node.param2 or node_def.leveled or 0) / 255 - 0.5
|
51 |
| - for _, box in pairs(boxes) do |
| 51 | + for _, box in ipairs(boxes) do |
52 | 52 | box[5] = level
|
53 | 53 | end
|
54 | 54 | elseif box_type == "wallmounted" then
|
@@ -92,7 +92,7 @@ local function get_node_boxes(pos, type)
|
92 | 92 | matchers[i] = nodename_matcher(nodename_or_group)
|
93 | 93 | end
|
94 | 94 | local function connects_to(nodename)
|
95 |
| - for _, matcher in pairs(matchers) do |
| 95 | + for _, matcher in ipairs(matchers) do |
96 | 96 | if matcher(nodename) then
|
97 | 97 | return true
|
98 | 98 | end
|
@@ -130,7 +130,7 @@ local function get_node_boxes(pos, type)
|
130 | 130 | if axis == 2 then
|
131 | 131 | sin = -sin
|
132 | 132 | end
|
133 |
| - for _, box in pairs(boxes) do |
| 133 | + for _, box in ipairs(boxes) do |
134 | 134 | for off = 0, 3, 3 do
|
135 | 135 | local axis_1, axis_2 = other_axis_1 + off, other_axis_2 + off
|
136 | 136 | local value_1, value_2 = box[axis_1], box[axis_2]
|
|
0 commit comments