Fix use-with issue #508
This commit is contained in:
parent
72b3403728
commit
b96be291bb
|
@ -354,7 +354,11 @@ function onUseWith(clickedWidget, mousePosition)
|
||||||
if clickedWidget:getClassName() == 'UIMap' then
|
if clickedWidget:getClassName() == 'UIMap' then
|
||||||
local tile = clickedWidget:getTile(mousePosition)
|
local tile = clickedWidget:getTile(mousePosition)
|
||||||
if tile then
|
if tile then
|
||||||
g_game.useWith(selectedThing, tile:getTopMultiUseThing())
|
if selectedThing:isFluidContainer() then
|
||||||
|
g_game.useWith(selectedThing, tile:getTopMultiUseThing())
|
||||||
|
else
|
||||||
|
g_game.useWith(selectedThing, tile:getTopUseThing())
|
||||||
|
end
|
||||||
end
|
end
|
||||||
elseif clickedWidget:getClassName() == 'UIItem' and not clickedWidget:isVirtual() then
|
elseif clickedWidget:getClassName() == 'UIItem' and not clickedWidget:isVirtual() then
|
||||||
g_game.useWith(selectedThing, clickedWidget:getItem())
|
g_game.useWith(selectedThing, clickedWidget:getItem())
|
||||||
|
|
Loading…
Reference in New Issue