remove code from uimap to lua

This commit is contained in:
Henrique Santiago
2012-01-09 16:06:16 -02:00
parent b00076bcb9
commit 4bfd335c98
5 changed files with 27 additions and 20 deletions

View File

@@ -17,3 +17,4 @@ Module
require 'game'
require 'thing'
require 'creature'
require 'map'

16
modules/game/map.lua Normal file
View 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