2014-04-24 17:41:05 +02:00
|
|
|
<?php
|
2014-05-13 18:26:38 +02:00
|
|
|
|
2014-06-14 17:10:19 +02:00
|
|
|
// TODO: method class for all the libxmlrpc get Methods, to fetch the callback asnyc
|
2014-05-02 17:50:30 +02:00
|
|
|
|
2014-06-14 17:10:19 +02:00
|
|
|
namespace ManiaControl\Callbacks;
|
2014-05-13 18:26:38 +02:00
|
|
|
|
2014-04-24 17:41:05 +02:00
|
|
|
/**
|
|
|
|
* Callbacks Interface
|
|
|
|
*
|
2014-05-02 17:50:30 +02:00
|
|
|
* @author ManiaControl Team <mail@maniacontrol.com>
|
|
|
|
* @copyright 2014 ManiaControl Team
|
2014-04-24 17:41:05 +02:00
|
|
|
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
|
|
|
*/
|
|
|
|
interface Callbacks {
|
2014-05-24 16:39:12 +02:00
|
|
|
/*
|
|
|
|
* ManiaControl Callbacks
|
|
|
|
*/
|
|
|
|
const ONINIT = 'Callbacks.OnInit';
|
|
|
|
const AFTERINIT = 'Callbacks.AfterInit';
|
|
|
|
const ONSHUTDOWN = 'Callbacks.OnShutdown';
|
|
|
|
|
2014-05-13 18:26:38 +02:00
|
|
|
/** Script Callback: CallbackName, CallbackData */
|
2014-04-24 21:55:47 +02:00
|
|
|
const SCRIPTCALLBACK = 'Callbacks.ScriptCallback';
|
2014-05-13 18:26:38 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Common Callbacks
|
|
|
|
*/
|
|
|
|
/** BeginMatch Callback: MatchNumber */
|
|
|
|
const BEGINMATCH = 'Callbacks.BeginMatch';
|
|
|
|
/** LoadingMap Callback: MapNumber */
|
|
|
|
const LOADINGMAP = 'Callbacks.LoadingMap';
|
|
|
|
/** BeginMap Callback: Map */
|
|
|
|
const BEGINMAP = 'Callbacks.BeginMap';
|
|
|
|
/** BeginSubMatch Callback: SubmatchNumber */
|
|
|
|
const BEGINSUBMATCH = 'Callbacks.BeginSubmatch';
|
|
|
|
/** BeginRound Callback: RoundNumber */
|
|
|
|
const BEGINROUND = 'Callbacks.BeginRound';
|
|
|
|
/** BeginTurn Callback: TurnNumber */
|
|
|
|
const BEGINTURN = 'Callbacks.BeginTurn';
|
2014-05-24 16:11:35 +02:00
|
|
|
/** BeginPlaying Callback */
|
|
|
|
const BEGINPLAYING = 'Callbacks.BeginPlaying';
|
|
|
|
/** EndPlaying Callback */
|
|
|
|
const ENDPLAYING = 'Callbacks.EndPlaying';
|
2014-05-13 18:26:38 +02:00
|
|
|
/** EndTurn Callback: TurnNumber */
|
|
|
|
const ENDTURN = 'Callbacks.EndTurn';
|
|
|
|
/** EndRound Callback: RoundNumber */
|
|
|
|
const ENDROUND = 'Callbacks.EndRound';
|
|
|
|
/** EndSubmatch Callback: SubmatchNumber */
|
|
|
|
const ENDSUBMATCH = 'Callbacks.EndSubmatch';
|
|
|
|
/** EndMap Callback: Map */
|
|
|
|
const ENDMAP = 'Callbacks.EndMap';
|
2014-05-24 16:11:35 +02:00
|
|
|
/** BeginPodium Callback */
|
|
|
|
const BEGINPODIUM = 'Callbacks.BeginPodium';
|
|
|
|
/** EndPodium Callback */
|
|
|
|
const ENDPODIUM = 'Callbacks.EndPodium';
|
|
|
|
/** UnloadingMap Callback */
|
|
|
|
const UNLOADINGMAP = 'Callbacks.UnloadingMap';
|
2014-05-24 16:39:12 +02:00
|
|
|
/** EndMatch Callback: MatchNumber */
|
|
|
|
const ENDMATCH = 'Callbacks.EndMatch';
|
2014-05-13 18:26:38 +02:00
|
|
|
|
|
|
|
/** BeginWarmup Callback */
|
|
|
|
const BEGINWARMUP = 'Callbacks.BeginWarmUp';
|
|
|
|
/** EndWarmup Callback */
|
|
|
|
const ENDWARMUP = 'Callbacks.EndWarmUp';
|
|
|
|
|
|
|
|
/** PlayerRanking Callback, returned after LibXmlRpc_PlayerRanking
|
2014-04-24 23:11:09 +02:00
|
|
|
* try to avoid to use this, just use the Get function of the RankingsManager instead
|
|
|
|
* param1 Player $player
|
|
|
|
* param2 int $rank
|
|
|
|
* param3 int $currentPoints
|
|
|
|
* param4 int AFKStatus */
|
|
|
|
const PLAYERRANKING = 'Callbacks.PlayerRanking';
|
|
|
|
|
2014-05-13 18:26:38 +02:00
|
|
|
/*
|
|
|
|
* ShootMania Callbacks
|
|
|
|
*/
|
|
|
|
/** RankingsUpdated Callback: SortedRankings */
|
2014-04-24 23:11:09 +02:00
|
|
|
const RANKINGSUPDATED = 'Callbacks.RankingsUpdated';
|
2014-05-13 18:26:38 +02:00
|
|
|
/** Scores Callback (returned after LibXmlRpc_PlayerRanking): Scores */
|
2014-04-24 23:11:09 +02:00
|
|
|
const SCORES = 'Callbacks.Scores';
|
2014-05-13 18:26:38 +02:00
|
|
|
|
2014-04-24 23:11:09 +02:00
|
|
|
/** Returns the AFKStatus of an Player, returned after param1 Scores */ //returned after TODO
|
|
|
|
const AFKSTATUS = 'Callbacks.AfkStatus';
|
2014-04-27 15:12:09 +02:00
|
|
|
/** Returns if the GameMode has Warmup activated, returned after param1 Scores */ //returned after TODO
|
2014-04-24 23:11:09 +02:00
|
|
|
const WARMUPSTATUS = 'Callbacks.WarmupStatus';
|
2014-05-24 16:11:35 +02:00
|
|
|
|
2014-10-10 16:19:46 +02:00
|
|
|
/** OnShoot Callback: Player, WeaponNumber (see Weapons Structure) */
|
2014-10-10 14:40:00 +02:00
|
|
|
const ONSHOOT = 'Callbacks.OnShoot';
|
|
|
|
|
2014-10-10 16:19:46 +02:00
|
|
|
/** OnHit Callback: PlayerHitStructure */
|
2014-10-10 14:40:00 +02:00
|
|
|
const ONHIT = 'Callbacks.OnHit';
|
|
|
|
/** OnNearMiss Callback: NearMissStructure */
|
|
|
|
const ONNEARMISS = 'Callbacks.OnNearMiss';
|
2014-10-10 16:19:46 +02:00
|
|
|
/** OnArmorEmpty Callback: ArmorEmptyStructure */
|
|
|
|
const ONARMOREMPTY = 'Callbacks.OnArmorEmpty';
|
|
|
|
/** OnCapture Callback: CaptureStructure */
|
|
|
|
const ONCAPTURE = 'Callbacks.OnCapture';
|
|
|
|
/** OnPlayerRequestRespawn Callback: Player */
|
|
|
|
const ONPLAYERREQUESTRESPAWN = 'Callbacks.OnPlayerRequestRespawn';
|
2014-10-10 14:40:00 +02:00
|
|
|
|
2014-12-20 18:43:51 +01:00
|
|
|
/** Elite OnBeginTurn Callback: EliteBeginTurnStructure */
|
|
|
|
const ELITE_ONBEGINTURN = "Callbacks.EliteOnBeginTurn";
|
|
|
|
/** Elite OnEndTurn Callback: integer (VictoryTypes) */
|
|
|
|
const ELITE_ONENDTURN = "Callbacks.EliteOnEndTurn";
|
|
|
|
|
2014-05-24 16:11:35 +02:00
|
|
|
/*
|
|
|
|
* TrackMania Callbacks
|
|
|
|
*/
|
2014-05-24 16:20:29 +02:00
|
|
|
/** OnStartLine Callback */
|
|
|
|
const ONSTARTLINE = 'Callbacks.OnStartLine';
|
|
|
|
/** OnWayPoint Callback */
|
|
|
|
const ONWAYPOINT = 'Callbacks.OnWayPoint';
|
|
|
|
/** OnGiveUp Callback */
|
|
|
|
const ONGIVEUP = 'Callbacks.OnGiveUp';
|
|
|
|
/** OnRespawn Callback */
|
|
|
|
const ONRESPAWN = 'Callbacks.OnRespawn';
|
|
|
|
/** OnStunt Callback */
|
|
|
|
const ONSTUNT = 'Callbacks.OnStunt';
|
2014-12-20 18:43:51 +01:00
|
|
|
|
2014-05-13 18:26:38 +02:00
|
|
|
}
|