Remove unused loop variables, trailing whitespace and fix mixed-whitespace indentations

This commit is contained in:
HybridDog
2021-02-05 17:17:50 +01:00
parent 2294a23582
commit 17a602a5a1
14 changed files with 43 additions and 43 deletions

View File

@ -39,7 +39,7 @@ end
local check_for_liquids_v2 = function(pos, limit)
local coords = make_coords_offsets(pos, false)
local total = 0
for index, tpos in ipairs(coords) do
for _, tpos in ipairs(coords) do
if total >= limit then break end
local name = minetest.get_node(tpos).name
if name == "default:water_source" then
@ -153,7 +153,7 @@ local get_neighbour_positions = function(pos, node)
-- then, check each possible neighbour to see if they can be reached from this node.
local connections = {}
for index, offset in ipairs(candidates) do
for _, offset in ipairs(candidates) do
local npos = vector.add(pos, offset)
local neighbour = minetest.get_node(npos)
local nodename = neighbour.name
@ -317,7 +317,7 @@ flowlogic.run_transition = function(node, currentpressure)
local nodename_prev = simplesetdef[1].nodename
local result_nodename = node.name
for index, element in ipairs(simplesetdef) do
for _, element in ipairs(simplesetdef) do
-- find the highest element that is below the current pressure.
local threshold = element.threshold
if threshold > currentpressure then

View File

@ -106,7 +106,7 @@ register.directional_horizonal_rotate = function(nodename, doubleended)
end
local directionfn = function(node, direction)
local result = false
for index, endvec in ipairs(getends(node)) do
for _, endvec in ipairs(getends(node)) do
if vector.equals(direction, endvec) then result = true end
end
return result