Fix fix/dry-buckets

develop
lethosor 2015-11-26 16:50:46 -05:00
parent 3783cbb672
commit c09eafcaf3
1 changed files with 2 additions and 2 deletions

@ -15,10 +15,10 @@ local water_type = dfhack.matinfo.find('WATER').type
for _,item in ipairs(df.global.world.items.all) do for _,item in ipairs(df.global.world.items.all) do
container = dfhack.items.getContainer(item) container = dfhack.items.getContainer(item)
if container ~= nil if container ~= nil
and container:getType() == dfhack.item_type.BUCKET and container:getType() == df.item_type.BUCKET
and not (container.flags.in_job or container.flags.in_building) and not (container.flags.in_job or container.flags.in_building)
and item:getMaterial() == water_type and item:getMaterial() == water_type
and item:getType() == dfhack.item_type.LIQUID_MISC and item:getType() == df.item_type.LIQUID_MISC
and not (item.flags.in_job or item.flags.in_building) then and not (item.flags.in_job or item.flags.in_building) then
dfhack.items.remove(item) dfhack.items.remove(item)
emptied = emptied + 1 emptied = emptied + 1