Implement rule violations, closes #218

This commit is contained in:
Eduardo Bart
2013-01-27 07:44:15 -02:00
parent 6c59124cb2
commit 9aca1644e6
15 changed files with 282 additions and 38 deletions

View File

@@ -1,9 +1,28 @@
function init()
g_keyboard.bindKeyDown('Ctrl+R', toggleMount, gameRootPanel)
connect(g_game, {
onGameStart = online,
onGameEnd = offline
})
if g_game.isOnline() then online() end
end
function terminate()
g_keyboard.unbindKeyDown('Ctrl+R', gameRootPanel)
disconnect(g_game, {
onGameStart = online,
onGameEnd = offline
})
end
function online()
if g_game.getFeature(GamePlayerMounts) then
g_keyboard.bindKeyDown('Ctrl+R', toggleMount)
end
end
function offline()
if g_game.getFeature(GamePlayerMounts) then
g_keyboard.unbindKeyDown('Ctrl+R')
end
end
function toggleMount()