Skip to content

Commit

Permalink
simplify loop
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 authored Jun 25, 2024
1 parent 2682fbc commit bb8a28e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions empty-bin.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,7 @@ elseif selectedItem then
emptyContainer(selectedItem)
elseif selectedBuilding then
if not df.building_actual:is_instance(selectedBuilding) then return end
local containedItems = selectedBuilding.contained_items
for i=#containedItems-1,0,-1 do
contained = containedItems[i]
for _, contained in ipairs(selectedBuilding.contained_items) do
if contained.use_mode == df.building_item_role_type.TEMP then
emptyContainer(contained.item)
end
Expand Down

0 comments on commit bb8a28e

Please sign in to comment.