code tidy

This commit is contained in:
BuckarooBanzay 2023-03-14 14:09:38 +01:00
parent 89cb60e394
commit c821fef3ad
2 changed files with 2 additions and 8 deletions

View File

@ -98,12 +98,7 @@ function building_lib.check_condition_group(mapblock_pos1, mapblock_pos2, condit
end
end
while true do
local mapblock_pos = it()
if not mapblock_pos then
break
end
for mapblock_pos in it do
success, err = building_lib.check_condition_table(conditions, mapblock_pos)
if not success then
group_match = false

View File

@ -33,8 +33,7 @@ building_lib.register_placement("mapblock_lib", {
local iterator = mapblock_lib.pos_iterator(catalog_pos1, catalog_pos2)
local worker
worker = function()
local function worker()
local catalog_pos = iterator()
if not catalog_pos then
return callback()