Skip to content

Commit 5e62296

Browse files
authored
Merge pull request #1357 from myk002/myk_dry_buckets
[fix/dry-buckets] don't empty buckets for in-use wells
2 parents fdd0c91 + 4d888cf commit 5e62296

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Template for new versions:
3434
- `gui/settings-manager`: standing orders save/load now includes the reserved barrels setting
3535

3636
## Fixes
37+
- `fix/dry-buckets`: don't empty buckets for wells that are actively in use
3738

3839
## Misc Improvements
3940
- `immortal-cravings`: goblins and other naturally non-eating/non-drinking races will now also satisfy their needs for eating and drinking

fix/dry-buckets.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ local emptied = 0
1111
local in_building = 0
1212
for _,item in ipairs(df.global.world.items.other.BUCKET) do
1313
if item.flags.in_job then goto continue end
14+
local well = dfhack.items.getHolderBuilding(item)
15+
if well and well:getType() == df.building_type.Well and well.well_tag.whole ~= 0 then
16+
-- bucket is in a well and the well is actively being used
17+
goto continue
18+
end
1419
local emptied_bucket = false
1520
local freed_in_building = false
1621
for _,contained_item in ipairs(dfhack.items.getContainedItems(item)) do

0 commit comments

Comments
 (0)