ruby: fix unit_find for advmode

develop
jj 2012-11-16 17:39:08 +01:00
parent dd89baf6f8
commit 423c122424
1 changed files with 10 additions and 1 deletions

@ -21,7 +21,7 @@ module DFHack
when :SelectTrainer when :SelectTrainer
v.trainer_unit[v.trainer_cursor] v.trainer_unit[v.trainer_cursor]
end end
else when :viewscreen_dwarfmodest
case ui.main.mode case ui.main.mode
when :ViewUnits when :ViewUnits
# nobody selected => idx == 0 # nobody selected => idx == 0
@ -33,6 +33,15 @@ module DFHack
else else
ui.follow_unit_tg if ui.follow_unit != -1 ui.follow_unit_tg if ui.follow_unit != -1
end end
when :viewscreen_dungeonmodest
case ui_advmode.menu
when :Default
world.units.active[0]
else
unit_find(cursor) # XXX
end
when :viewscreen_dungeon_monsterstatusst
curview.unit
end end
elsif what.kind_of?(Integer) elsif what.kind_of?(Integer)
# search by id # search by id