This commit is contained in:
Simon Hirsig
2017-11-01 15:51:38 +01:00
parent 8b254ac40f
commit 2ae5dd1da0
2 changed files with 3 additions and 5 deletions
+3 -3
View File
@@ -7,10 +7,10 @@ local T = require 'T'
local info = require 'aux.util.info'
do
local orig = UseContainerItem
local orig = SetItemRef
_G.SetItemRef = T.vararg-function(arg)
if arg[3] ~= 'RightButton' or not index(get_active_tab(), 'CLICK_LINK') or not strfind(arg[1], '^item:%d+') then
return orig.SetItemRef(unpack(arg))
return orig(unpack(arg))
end
local item_info = info.item(tonumber(select(3, strfind(arg[1], '^item:(%d+)'))))
if item_info then
@@ -23,7 +23,7 @@ do
local orig = UseContainerItem
_G.UseContainerItem = T.vararg-function(arg)
if modified() or not get_active_tab() then
return orig.UseContainerItem(unpack(arg))
return orig(unpack(arg))
end
local item_info = info.container_item(arg[1], arg[2])
if item_info and get_active_tab().USE_ITEM then