mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-25 18:00:19 +01:00
Make nr in rules rotation local in order not to pullute the holy global namespace
This commit is contained in:
parent
2bbc9dd4b7
commit
7e231b99a6
@ -428,7 +428,7 @@ end
|
||||
|
||||
--Rules rotation Functions:
|
||||
function mesecon:rotate_rules_right(rules)
|
||||
nr = {}
|
||||
local nr = {}
|
||||
for i, rule in ipairs(rules) do
|
||||
table.insert(nr, {
|
||||
x = -rule.z,
|
||||
@ -439,7 +439,7 @@ function mesecon:rotate_rules_right(rules)
|
||||
end
|
||||
|
||||
function mesecon:rotate_rules_left(rules)
|
||||
nr = {}
|
||||
local nr = {}
|
||||
for i, rule in ipairs(rules) do
|
||||
table.insert(nr, {
|
||||
x = rule.z,
|
||||
@ -450,7 +450,7 @@ function mesecon:rotate_rules_left(rules)
|
||||
end
|
||||
|
||||
function mesecon:rotate_rules_down(rules)
|
||||
nr = {}
|
||||
local nr = {}
|
||||
for i, rule in ipairs(rules) do
|
||||
table.insert(nr, {
|
||||
x = -rule.y,
|
||||
@ -461,7 +461,7 @@ function mesecon:rotate_rules_down(rules)
|
||||
end
|
||||
|
||||
function mesecon:rotate_rules_up(rules)
|
||||
nr = {}
|
||||
local nr = {}
|
||||
for i, rule in ipairs(rules) do
|
||||
table.insert(nr, {
|
||||
x = rule.y,
|
||||
|
Loading…
Reference in New Issue
Block a user