Remove trailing whitespace

This commit is contained in:
Jeija
2015-10-04 13:30:34 +02:00
parent 24958e253b
commit 97f7b5745f
15 changed files with 99 additions and 99 deletions

View File

@ -30,7 +30,7 @@
-- action_change = function
-- rules = rules/get_rules
-- },
-- conductor =
-- conductor =
-- {
-- state = mesecon.state.on/off
-- offstate = opposite state (for state = on only)

View File

@ -496,7 +496,7 @@ function mesecon.find_receptor_on(pos, link)
end
end
end
end
depth = depth + 1
end
@ -533,7 +533,7 @@ function mesecon.rules_link_rule_all(output, rule)
return {}
end
local rules = {}
for _, inputrule in ipairs(mesecon.flattenrules(inputrules)) do
-- Check if input accepts from output
if mesecon.cmpPos(mesecon.addPosRule(input, inputrule), output) then
@ -552,7 +552,7 @@ function mesecon.rules_link_rule_all_inverted(input, rule)
return {}
end
local rules = {}
for _, outputrule in ipairs(mesecon.flattenrules(outputrules)) do
if mesecon.cmpPos(mesecon.addPosRule(output, outputrule), input) then
table.insert(rules, mesecon.invertRule(outputrule))
@ -607,8 +607,8 @@ function mesecon.rotate_rules_right(rules)
local nr = {}
for i, rule in ipairs(rules) do
table.insert(nr, {
x = -rule.z,
y = rule.y,
x = -rule.z,
y = rule.y,
z = rule.x,
name = rule.name})
end
@ -619,8 +619,8 @@ function mesecon.rotate_rules_left(rules)
local nr = {}
for i, rule in ipairs(rules) do
table.insert(nr, {
x = rule.z,
y = rule.y,
x = rule.z,
y = rule.y,
z = -rule.x,
name = rule.name})
end
@ -631,8 +631,8 @@ function mesecon.rotate_rules_down(rules)
local nr = {}
for i, rule in ipairs(rules) do
table.insert(nr, {
x = -rule.y,
y = rule.x,
x = -rule.y,
y = rule.x,
z = rule.z,
name = rule.name})
end
@ -643,8 +643,8 @@ function mesecon.rotate_rules_up(rules)
local nr = {}
for i, rule in ipairs(rules) do
table.insert(nr, {
x = rule.y,
y = -rule.x,
x = rule.y,
y = -rule.x,
z = rule.z,
name = rule.name})
end

View File

@ -21,7 +21,7 @@ mesecon.rules.buttonlike =
{{x = 1, y = 0, z = 0},
{x = 1, y = 1, z = 0},
{x = 1, y =-1, z = 0},
{x = 1, y =-1, z = 1},
{x = 1, y =-1, z = 1},
{x = 1, y =-1, z =-1},
{x = 2, y = 0, z = 0}}
@ -38,7 +38,7 @@ mesecon.rules.alldirs =
{x= 0, y=-1, z= 0},
{x= 0, y= 0, z= 1},
{x= 0, y= 0, z=-1}}
mesecon.rules.buttonlike_get = function(node)
local rules = mesecon.rules.buttonlike
if node.param2 == 2 then

View File

@ -129,7 +129,7 @@ function mesecon.set_bit(binary,bit,value)
end
end
return binary
end
function mesecon.invertRule(r)
@ -203,7 +203,7 @@ function mesecon.flipstate(pos, node)
local newstate
if (nodedef.__mesecon_state == "on") then newstate = "off" end
if (nodedef.__mesecon_state == "off") then newstate = "on" end
minetest.swap_node(pos, {name = nodedef.__mesecon_basename .. "_" .. newstate,
param2 = node.param2})

View File

@ -135,7 +135,7 @@ nid_inc = function (nid)
end
-- BUT: Skip impossible nodeids:
if ((nid[0] == 0 and nid[4] == 1) or (nid[1] == 0 and nid[5] == 1)
if ((nid[0] == 0 and nid[4] == 1) or (nid[1] == 0 and nid[5] == 1)
or (nid[2] == 0 and nid[6] == 1) or (nid[3] == 0 and nid[7] == 1)) then
return nid_inc(nid)
end