mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 03:24:55 +02:00
restore set outfit
This commit is contained in:
@@ -15,4 +15,5 @@ Module
|
||||
|
||||
onLoad: |
|
||||
require 'game'
|
||||
return true
|
||||
require 'thing'
|
||||
return true
|
||||
|
19
modules/game/thing.lua
Normal file
19
modules/game/thing.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
|
||||
-- public functions
|
||||
function Thing:createMenu(menuPosition)
|
||||
local menu = createWidget('PopupMenu')
|
||||
menu:addOption('Look', function() Game.look(self) end)
|
||||
|
||||
-- Open or Use, depending if thing is a container
|
||||
if self:isContainer() then
|
||||
menu:addOption('Open', function() print('open') end)
|
||||
else
|
||||
menu:addOption('Use', function() print('use') end)
|
||||
end
|
||||
|
||||
if self:asLocalPlayer() then
|
||||
menu:addOption('Set Outfit', function() Game.openOutfitWindow() end)
|
||||
end
|
||||
|
||||
menu:display(menuPosition)
|
||||
end
|
Reference in New Issue
Block a user