summaryrefslogtreecommitdiff
path: root/plugins/ruby/item.rb
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-09-27 10:36:14 +0400
committerAlexander Gavrilov2012-09-27 10:36:14 +0400
commit2e5f3c46201d8450a39b52117dbd4f1544771189 (patch)
tree1215abb52b93463c894b459462bb30cf36be8c81 /plugins/ruby/item.rb
parentac9e78a6130d896510f186cc8f8ed5046cac45be (diff)
parent7cc29250f8622a317da464a2b7356a246082abc0 (diff)
downloaddfhack-2e5f3c46201d8450a39b52117dbd4f1544771189.tar.gz
dfhack-2e5f3c46201d8450a39b52117dbd4f1544771189.tar.bz2
dfhack-2e5f3c46201d8450a39b52117dbd4f1544771189.tar.xz
Merge remote-tracking branch 'jjyg/master'
Diffstat (limited to 'plugins/ruby/item.rb')
-rw-r--r--plugins/ruby/item.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/ruby/item.rb b/plugins/ruby/item.rb
index 032c0d8c..fc840f7a 100644
--- a/plugins/ruby/item.rb
+++ b/plugins/ruby/item.rb
@@ -4,9 +4,14 @@ module DFHack
# arg similar to unit.rb/unit_find; no arg = 'k' menu
def item_find(what=:selected, y=nil, z=nil)
if what == :selected
- if curview._rtti_classname == :viewscreen_itemst
+ case curview._rtti_classname
+ when :viewscreen_itemst
ref = curview.entry_ref[curview.cursor_pos]
ref.item_tg if ref.kind_of?(GeneralRefItem)
+ when :viewscreen_storesst # z/stocks
+ if curview.in_group_mode == 0 and curview.in_right_list == 1
+ curview.items[curview.item_cursor]
+ end
else
case ui.main.mode
when :LookAround