mirror of
https://github.com/edubart/otclient.git
synced 2025-10-17 04:53:27 +02:00
Use new coding style in game modules
Lots of refactoring and changes Remove docs folder
This commit is contained in:
@@ -1,23 +1,19 @@
|
||||
PlayerMount = {}
|
||||
|
||||
function PlayerMount.init()
|
||||
function init()
|
||||
if g_game.getFeature(GamePlayerMount) then
|
||||
g_keyboard.bindKeyDown('Ctrl+R', PlayerMount.toggleMount, gameRootPanel)
|
||||
g_keyboard.bindKeyDown('Ctrl+R', toggleMount, gameRootPanel)
|
||||
end
|
||||
end
|
||||
|
||||
function PlayerMount.terminate()
|
||||
function terminate()
|
||||
if g_game.getFeature(GamePlayerMount) then
|
||||
g_keyboard.unbindKeyDown('Ctrl+R', gameRootPanel)
|
||||
end
|
||||
|
||||
PlayerMount = nil
|
||||
end
|
||||
|
||||
function PlayerMount.toggleMount()
|
||||
function toggleMount()
|
||||
g_game.mount(not g_game.isMounted())
|
||||
end
|
||||
|
||||
function PlayerMount.dismount()
|
||||
function dismount()
|
||||
g_game.mount(false)
|
||||
end
|
||||
|
@@ -3,10 +3,7 @@ Module
|
||||
description: Manage player mounts
|
||||
author: BeniS
|
||||
website: www.otclient.info
|
||||
|
||||
@onLoad: |
|
||||
dofile 'playermount'
|
||||
PlayerMount.init()
|
||||
|
||||
@onUnload: |
|
||||
PlayerMount.terminate()
|
||||
sandboxed: true
|
||||
scripts: [playermount.lua]
|
||||
@onLoad: init()
|
||||
@onUnload: terminate()
|
||||
|
Reference in New Issue
Block a user