ruby: use ui.follow_item/unit in unit_find, show non-english names by default

develop
jj 2012-09-17 21:16:01 +02:00
parent 2032f8e407
commit 57d01f0008
2 changed files with 5 additions and 1 deletions

@ -26,6 +26,8 @@ module DFHack
u = world.units.active[ui_selected_unit]
u.inventory[ui_look_cursor].item if u and u.pos.z == cursor.z and
ui_unit_view_mode.value == :Inventory and u.inventory[ui_look_cursor]
else
ui.follow_item_tg if ui.follow_item != -1
end
end
elsif what.kind_of?(Integer)

@ -24,6 +24,8 @@ module DFHack
when :LookAround
k = ui_look_list.items[ui_look_cursor]
k.unit if k.type == :Unit
else
ui.follow_unit_tg if ui.follow_unit != -1
end
end
elsif what.kind_of?(Integer)
@ -104,7 +106,7 @@ module DFHack
end
class LanguageName
def to_s(english=true)
def to_s(english=false)
df.translate_name(self, english)
end
end