ruby: handle constructed beds in item_find in LookAround mode

develop
jj 2012-07-04 17:24:46 +02:00
parent edf0a9cb3d
commit 15cfc1d00b
1 changed files with 7 additions and 1 deletions

@ -11,7 +11,13 @@ module DFHack
case ui.main.mode case ui.main.mode
when :LookAround when :LookAround
k = ui_look_list.items[ui_look_cursor] k = ui_look_list.items[ui_look_cursor]
k.item if k.type == :Item case k.type
when :Item
k.item
when :Building
# hilight a constructed bed
k.building.contained_items[0].item if k.building.contained_items.length == 1
end
when :BuildingItems when :BuildingItems
bld = world.selected_building bld = world.selected_building
bld.contained_items[ui_building_item_cursor].item if bld bld.contained_items[ui_building_item_cursor].item if bld