ruby: extend item_find to work on constructed coffers

develop
jj 2012-07-04 17:48:44 +02:00
parent cdd711efa4
commit 7c4f60df1d
1 changed files with 3 additions and 2 deletions

@ -15,8 +15,9 @@ module DFHack
when :Item when :Item
k.item k.item
when :Building when :Building
# hilight a constructed bed # hilight a constructed bed/coffer
k.building.contained_items[0].item if k.building.contained_items.length == 1 mats = k.building.contained_items.find_all { |i| i.use_mode == 2 }
mats[0].item if mats.length == 1
end end
when :BuildingItems when :BuildingItems
bld = world.selected_building bld = world.selected_building