added more libxmlrpc callbacks

This commit is contained in:
Steffen Schröder 2014-05-24 16:11:35 +02:00
parent cb29330a50
commit 7fc0228952
2 changed files with 29 additions and 2 deletions

View File

@ -30,6 +30,10 @@ interface Callbacks {
const BEGINROUND = 'Callbacks.BeginRound';
/** BeginTurn Callback: TurnNumber */
const BEGINTURN = 'Callbacks.BeginTurn';
/** BeginPlaying Callback */
const BEGINPLAYING = 'Callbacks.BeginPlaying';
/** EndPlaying Callback */
const ENDPLAYING = 'Callbacks.EndPlaying';
/** EndTurn Callback: TurnNumber */
const ENDTURN = 'Callbacks.EndTurn';
/** EndRound Callback: RoundNumber */
@ -38,8 +42,12 @@ interface Callbacks {
const ENDSUBMATCH = 'Callbacks.EndSubmatch';
/** EndMap Callback: Map */
const ENDMAP = 'Callbacks.EndMap';
/** EndMatch Callback: MatchNumber */
const ENDMATCH = 'Callbacks.EndMatch';
/** BeginPodium Callback */
const BEGINPODIUM = 'Callbacks.BeginPodium';
/** EndPodium Callback */
const ENDPODIUM = 'Callbacks.EndPodium';
/** UnloadingMap Callback */
const UNLOADINGMAP = 'Callbacks.UnloadingMap';
/** BeginWarmup Callback */
const BEGINWARMUP = 'Callbacks.BeginWarmUp';
@ -66,4 +74,8 @@ interface Callbacks {
const AFKSTATUS = 'Callbacks.AfkStatus';
/** Returns if the GameMode has Warmup activated, returned after param1 Scores */ //returned after TODO
const WARMUPSTATUS = 'Callbacks.WarmupStatus';
/*
* TrackMania Callbacks
*/
}

View File

@ -53,6 +53,12 @@ class LibXmlRpcCallbacks implements CallbackListener {
case 'LibXmlRpc_BeginTurn':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::BEGINTURN, $data[0]);
break;
case 'LibXmlRpc_BeginPlaying':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::BEGINPLAYING, $data[0]);
break;
case 'LibXmlRpc_EndPlaying':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::ENDPLAYING, $data[0]);
break;
case 'LibXmlRpc_EndTurn':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::ENDTURN, $data[0]);
break;
@ -66,6 +72,15 @@ class LibXmlRpcCallbacks implements CallbackListener {
case 'LibXmlRpc_EndMap':
$this->maniaControl->mapManager->handleScriptEndMap($data[1]);
break;
case 'LibXmlRpc_BeginPodium':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::BEGINPODIUM, $data[0]);
break;
case 'LibXmlRpc_EndPodium':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::ENDPODIUM, $data[0]);
break;
case 'LibXmlRpc_UnloadingMap':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::UNLOADINGMAP, $data[0]);
break;
case 'LibXmlRpc_EndMatch':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::ENDMATCH, $data[0]);
break;