TrackManiaControl/core/Callbacks/Callbacks.php

146 lines
4.9 KiB
PHP
Raw Normal View History

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-12-21 23:21:59 +01:00
// TODO implement all STOP callbacks
// 22-3-2017 Added/Fixed TM Callback for WayPoint // Need to Add better checks eventually
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>
2017-02-04 11:49:23 +01:00
* @copyright 2014-2017 ManiaControl Team
2014-04-24 17:41:05 +02:00
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/
interface Callbacks {
/*
* ManiaControl Callbacks
*/
const ONINIT = 'Callbacks.OnInit';
const AFTERINIT = 'Callbacks.AfterInit';
const ONSHUTDOWN = 'Callbacks.OnShutdown';
2015-06-26 16:53:41 +02:00
const ONRESTART = 'Callbacks.OnRestart';
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
*/
//NEW Callbacks
const XMLRPC_CALLBACKSLIST = 'Callbacks.XmlRpcCallbacksList';
//OLD Callbacks
2014-05-13 18:26:38 +02:00
/** 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-12-21 23:21:59 +01:00
/** BeginTurnStop Callback: TurnNumber */
const BEGINTURNSTOP = 'Callbacks.BeginTurnStop';
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';
2014-12-21 23:21:59 +01:00
/** EndTurnStop Callback: TurnNumber */
const ENDTURNSTOP = 'Callbacks.EndTurnStop';
2014-05-13 18:26:38 +02:00
/** EndRound Callback: RoundNumber */
const ENDROUND = 'Callbacks.EndRound';
2015-01-23 19:05:07 +01:00
/** EndRound Callback: RoundNumber */
const ENDROUNDSTOP = 'Callbacks.EndRoundStop';
2014-05-13 18:26:38 +02:00
/** 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';
/** 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';
2015-08-20 18:48:14 +02:00
/** Scores Callback (returned after LibXmlRpc_PlayerRanking): Scores */
const SCORESREADY = 'Callbacks.ScoresReady';
/** Scores Callback (returned after LibXmlRpc_PlayerRanking in SM, or LibXmlRpc_TeamsScores in Trackmania): Scores */
const SCORES = 'Callbacks.Scores';
2017-02-04 11:41:31 +01:00
/** Rankings Callback */
const RANKINGS = 'Callbacks.Rankings';
2014-05-13 18:26:38 +02:00
/** 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
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';
/** 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
/** OnShoot Callback: Player, WeaponNumber (see Weapons Structure) */
2014-10-10 14:40:00 +02:00
const ONSHOOT = 'Callbacks.OnShoot';
/** OnHit Callback: PlayerHitStructure */
2014-10-10 14:40:00 +02:00
const ONHIT = 'Callbacks.OnHit';
/** OnNearMiss Callback: NearMissStructure */
const ONNEARMISS = 'Callbacks.OnNearMiss';
/** 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";
2017-02-04 11:41:31 +01:00
/** Joust Selected Players */
const JOUST_SELECTEDPLAYERS = "Callbacks.JoustSelectedPlayers";
2014-05-24 16:11:35 +02:00
/*
* TrackMania Callbacks
*/
2014-05-24 16:20:29 +02:00
/** OnStartLine Callback */
const ONSTARTLINE = 'Callbacks.StartLine';
2014-05-24 16:20:29 +02:00
/** OnWayPoint Callback */
const ONWAYPOINT = 'Callbacks.WayPoint';
2014-05-24 16:20:29 +02:00
/** OnGiveUp Callback */
const ONGIVEUP = 'Callbacks.GiveUp';
2014-05-24 16:20:29 +02:00
/** OnRespawn Callback */
const ONRESPAWN = 'Callbacks.Respawn';
2014-05-24 16:20:29 +02:00
/** OnStunt Callback */
const ONSTUNT = 'Callbacks.Stunt';
2014-12-20 18:43:51 +01:00
2014-05-13 18:26:38 +02:00
}