diff --git a/changelog.txt b/changelog.txt index ff9254295..50b3369c4 100644 --- a/changelog.txt +++ b/changelog.txt @@ -36,6 +36,7 @@ Template for new versions: ## Fixes - `timestream`: ensure child growth events (e.g. becoming an adult) are not skipped over +- `empty-bin`: ``--liquids`` option correctly emptying containers filled with LIQUID_MISC ## Misc Improvements - `gui/sitemap`: show whether a unit is friendly, hostile, or wildlife diff --git a/empty-bin.lua b/empty-bin.lua index f94a14081..8e38c13d8 100644 --- a/empty-bin.lua +++ b/empty-bin.lua @@ -18,7 +18,7 @@ local function emptyContainer(container) print('Emptying ' .. dfhack.items.getReadableDescription(container)) local pos = xyz2pos(dfhack.items.getPosition(container)) for _, item in ipairs(items) do - local skip_liquid = item:getType() == df.item_type.LIQUID_MISC or item:getType() == df.item_type.DRINK and not options.liquids + local skip_liquid = not options.liquids and (item:getType() == df.item_type.LIQUID_MISC or item:getType() == df.item_type.DRINK) if skip_liquid then print(' ' .. dfhack.items.getReadableDescription(item) .. ' was skipped because the --liquids flag was not provided') else