Repairing drain-aquifer layer counting.

develop
Eric Wald 2014-10-12 22:28:23 -06:00
parent b0b1dd62d1
commit 5d53163e16
1 changed files with 3 additions and 3 deletions

@ -1,7 +1,7 @@
-- Remove all aquifers from the map -- Remove all aquifers from the map
local function drain() local function drain()
local last_layer = nil local layers = {}
local layer_count = 0 local layer_count = 0
local tile_count = 0 local tile_count = 0
@ -19,8 +19,8 @@ local function drain()
end end
end end
if block.map_pos.z ~= last_layer then if not layers[block.map_pos.z] then
last_layer = block.map_pos.z layers[block.map_pos.z] = true
layer_count = layer_count + 1 layer_count = layer_count + 1
end end
end end