mirror of
https://github.com/edubart/otclient.git
synced 2025-11-30 07:26:49 +01:00
remove code from uimap to lua
This commit is contained in:
@@ -17,3 +17,4 @@ Module
|
||||
require 'game'
|
||||
require 'thing'
|
||||
require 'creature'
|
||||
require 'map'
|
||||
|
||||
16
modules/game/map.lua
Normal file
16
modules/game/map.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
function UIMap:onMousePress(mousePos, mouseButton)
|
||||
|
||||
local tile = self:getTile(mousePos)
|
||||
if not tile then return false end
|
||||
|
||||
if not Options.classicControl then
|
||||
|
||||
if mouseButton == MouseRightButton then
|
||||
Game.createThingMenu(mousePos, tile:getTopLookThing(), tile:getTopUseThing(), tile:getTopCreature())
|
||||
return true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
Reference in New Issue
Block a user