You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
515 B
20 lines
515 B
13 years ago
|
|
||
|
-- 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
|