diff options
author | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2021-02-05 18:03:54 +0000 |
---|---|---|
committer | Vanessa Dannenberg <vanessa.e.dannenberg@gmail.com> | 2021-02-05 18:03:54 +0000 |
commit | f0ef43823cb198a3f426d7d1db88d42f5079fbbd (patch) | |
tree | 27f0ebea3b8ac8f36eea8fb58d38947fab81e31d /pressure_logic | |
parent | 2294a235826810864c1dbae7db644dfbc4722e6c (diff) | |
parent | 17a602a5a1d3b0362152222dc62c102c399ec4a4 (diff) | |
download | pipeworks-f0ef43823cb198a3f426d7d1db88d42f5079fbbd.tar pipeworks-f0ef43823cb198a3f426d7d1db88d42f5079fbbd.tar.gz pipeworks-f0ef43823cb198a3f426d7d1db88d42f5079fbbd.tar.bz2 pipeworks-f0ef43823cb198a3f426d7d1db88d42f5079fbbd.tar.xz pipeworks-f0ef43823cb198a3f426d7d1db88d42f5079fbbd.zip |
Merge branch 'm_unused_loop_vars' into 'master'
Remove unused loop variables, trailing whitespace and fix mixed-whitespace indentations
See merge request VanessaE/pipeworks!34
Diffstat (limited to 'pressure_logic')
-rw-r--r-- | pressure_logic/abms.lua | 6 | ||||
-rw-r--r-- | pressure_logic/flowable_node_registry_install.lua | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/pressure_logic/abms.lua b/pressure_logic/abms.lua index 47e8949..b69fa60 100644 --- a/pressure_logic/abms.lua +++ b/pressure_logic/abms.lua @@ -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 diff --git a/pressure_logic/flowable_node_registry_install.lua b/pressure_logic/flowable_node_registry_install.lua index 7f671a8..b561ca6 100644 --- a/pressure_logic/flowable_node_registry_install.lua +++ b/pressure_logic/flowable_node_registry_install.lua @@ -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 |