minor spelling & phpdoc improvements
This commit is contained in:
parent
16d2571485
commit
23c58b47ff
@ -56,7 +56,7 @@ class AdminLists implements ManialinkPageAnswerListener, CallbackListener {
|
||||
$itemQuad = new Quad_UIConstruction_Buttons();
|
||||
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_Author);
|
||||
$itemQuad->setAction(self::ACTION_OPEN_ADMINLISTS);
|
||||
$this->maniaControl->actionsMenu->addMenuItem($itemQuad, false, 50, 'Open Adminlist');
|
||||
$this->maniaControl->actionsMenu->addMenuItem($itemQuad, false, 50, 'Open AdminList');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,7 +1,9 @@
|
||||
<?php
|
||||
|
||||
namespace ManiaControl\Callbacks;
|
||||
|
||||
//TODO method class for all the libxmlrpc get Methods, to fetch the callback asnyc
|
||||
|
||||
/**
|
||||
* Callbacks Interface
|
||||
*
|
||||
@ -10,35 +12,41 @@ namespace ManiaControl\Callbacks;
|
||||
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
|
||||
*/
|
||||
interface Callbacks {
|
||||
//Common Callbacks
|
||||
/** Script Callback: CallbackName, CallbackData */
|
||||
const SCRIPTCALLBACK = 'Callbacks.ScriptCallback';
|
||||
/** BeginMatch Callback, param1 MatchNumber */
|
||||
const BEGINMATCH = "Callbacks.BeginMatch";
|
||||
/** LoadingMap Callback, Number of Map */
|
||||
const LOADINGMAP = "Callbacks.LoadingMap";
|
||||
/** BeginMap Callback, triggered by MapManager, param1 Map Object */
|
||||
const BEGINMAP = "Callbacks.BeginMap";
|
||||
/** BeginSubMatch Callback, param1 Number of Submatch */
|
||||
const BEGINSUBMATCH = "Callbacks.BeginSubmatch";
|
||||
/** BeginRound Callback, param1 Number of Round */
|
||||
const BEGINROUND = "Callbacks.BeginRound";
|
||||
/** BeginTurn Callback, param1 Number of Turn */
|
||||
const BEGINTURN = "Callbacks.BeginTurn";
|
||||
/** EndTurn Callback, param1 Number of Turn */
|
||||
const ENDTURN = "Callbacks.EndTurn";
|
||||
/** EndRound Callback, param1 Number of Round */
|
||||
const ENDROUND = "Callbacks.EndRound";
|
||||
/** EndSubMatch Callback, param1 Number of Submatch */
|
||||
const ENDSUBMATCH = "Callbacks.EndSubmatch";
|
||||
/** BeginMap Callback, triggered by MapManager, param1 Map Object */
|
||||
const ENDMAP = "Callbacks.EndMap";
|
||||
/** EndMatch Callback, param1 MatchNumber */
|
||||
const ENDMATCH = "Callbacks.EndMatch";
|
||||
/** BeginWarmup Callback, no parameters */
|
||||
const BEGINWARMUP = "Callbacks.BeginWarmUp";
|
||||
/** EndWarmup Callback, no parameters */
|
||||
const ENDWARMUP = "Callbacks.EndWarmUp";
|
||||
/** PlayerRanking callback, returned after LibXmlRpc_PlayerRanking
|
||||
|
||||
/*
|
||||
* 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';
|
||||
/** 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';
|
||||
/** EndMatch Callback: MatchNumber */
|
||||
const ENDMATCH = 'Callbacks.EndMatch';
|
||||
|
||||
/** BeginWarmup Callback */
|
||||
const BEGINWARMUP = 'Callbacks.BeginWarmUp';
|
||||
/** EndWarmup Callback */
|
||||
const ENDWARMUP = 'Callbacks.EndWarmUp';
|
||||
|
||||
/** PlayerRanking Callback, returned after LibXmlRpc_PlayerRanking
|
||||
* try to avoid to use this, just use the Get function of the RankingsManager instead
|
||||
* param1 Player $player
|
||||
* param2 int $rank
|
||||
@ -46,13 +54,16 @@ interface Callbacks {
|
||||
* param4 int AFKStatus */
|
||||
const PLAYERRANKING = 'Callbacks.PlayerRanking';
|
||||
|
||||
//ShootMania Callbacks
|
||||
/** RankingsUpdated Callback, param1 Sorted Rankings */
|
||||
/*
|
||||
* ShootMania Callbacks
|
||||
*/
|
||||
/** RankingsUpdated Callback: SortedRankings */
|
||||
const RANKINGSUPDATED = 'Callbacks.RankingsUpdated';
|
||||
/** RankingsUpdated Callback, returned after LibXmlRpc_PlayerRanking param1 Scores */
|
||||
/** Scores Callback (returned after LibXmlRpc_PlayerRanking): Scores */
|
||||
const SCORES = 'Callbacks.Scores';
|
||||
|
||||
/** 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
|
||||
const WARMUPSTATUS = 'Callbacks.WarmupStatus';
|
||||
}
|
||||
}
|
||||
|
@ -754,7 +754,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
|
||||
// Set status to target player login
|
||||
$this->playersListShown[$caller->login] = $login;
|
||||
|
||||
// Reopen playerlist
|
||||
// Reopen PlayerList
|
||||
$this->showPlayerList($caller);
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_ONINIT, $this, 'handleOnInit');
|
||||
|
||||
// Register for commands
|
||||
$this->maniaControl->commandManager->registerCommandListener('setservername', $this, 'command_SetServerName', true, 'Sets the servername.');
|
||||
$this->maniaControl->commandManager->registerCommandListener('setservername', $this, 'command_SetServerName', true, 'Sets the ServerName.');
|
||||
$this->maniaControl->commandManager->registerCommandListener('setpwd', $this, 'command_SetPwd', true, 'Sets play password.');
|
||||
$this->maniaControl->commandManager->registerCommandListener('setspecpwd', $this, 'command_SetSpecPwd', true, 'Sets spectator password.');
|
||||
$this->maniaControl->commandManager->registerCommandListener('setmaxplayers', $this, 'command_SetMaxPlayers', true, 'Sets the maximum number of players.');
|
||||
|
@ -20,8 +20,8 @@ class StatisticCollector implements CallbackListener {
|
||||
* Constants
|
||||
*/
|
||||
const SETTING_COLLECT_STATS_ENABLED = 'Collect Stats Enabled';
|
||||
const SETTING_COLLECT_STATS_MINPLAYERS = 'Minimum Playercount for Collecting Stats';
|
||||
const SETTING_ON_SHOOT_PRESTORE = 'Prestore Shoots before insert into Database';
|
||||
const SETTING_COLLECT_STATS_MINPLAYERS = 'Minimum Player Count for Collecting Stats';
|
||||
const SETTING_ON_SHOOT_PRESTORE = 'Prestore Shots before Insert into Database';
|
||||
/*
|
||||
* Statistics
|
||||
*/
|
||||
|
@ -335,7 +335,9 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
||||
}
|
||||
|
||||
/**
|
||||
* Build map info struct for dedimania requests
|
||||
* Build Map Info Array for Dedimania Requests
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function getMapInfo() {
|
||||
$map = $this->maniaControl->mapManager->getCurrentMap();
|
||||
|
@ -449,7 +449,7 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Provide an overview ManiaLink with donators
|
||||
* Provide an Overview ManiaLink with Donators
|
||||
*
|
||||
* @param Player $player
|
||||
*/
|
||||
|
@ -364,11 +364,9 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
if (!$player) {
|
||||
$properties['getvotesonly'] = false;
|
||||
$properties['playerlogins'] = array();
|
||||
foreach ($this->maniaControl->playerManager->getPlayers() as $plyr) {
|
||||
/**
|
||||
* @var Player $player
|
||||
*/
|
||||
$properties['playerlogins'][] = $plyr->login;
|
||||
foreach ($this->maniaControl->playerManager->getPlayers() as $loopPlayer) {
|
||||
/** @var Player $loopPlayer */
|
||||
$properties['playerlogins'][] = $loopPlayer->login;
|
||||
}
|
||||
} else {
|
||||
$properties['getvotesonly'] = true;
|
||||
@ -1003,7 +1001,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Mx Karma Votes at Mapend
|
||||
* Save Mx Karma Votes at MapEnd
|
||||
*/
|
||||
public function sendMxKarmaVotes(Map $map) {
|
||||
if (!$this->maniaControl->settingManager->getSettingValue($this, self::SETTING_MX_KARMA_ACTIVATED)) {
|
||||
|
@ -130,8 +130,8 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
|
||||
$this->maniaControl->callbackManager->registerCallbackListener(Callbacks::ENDMAP, $this, 'handleEndMap');
|
||||
|
||||
//Register CommandListener
|
||||
$this->maniaControl->commandManager->registerCommandListener('rank', $this, 'command_showRank', false, 'Shows your current serverrank.');
|
||||
$this->maniaControl->commandManager->registerCommandListener('nextrank', $this, 'command_nextRank', false, 'Shows the person in front of you in the serverranking.');
|
||||
$this->maniaControl->commandManager->registerCommandListener('rank', $this, 'command_showRank', false, 'Shows your current ServerRank.');
|
||||
$this->maniaControl->commandManager->registerCommandListener('nextrank', $this, 'command_nextRank', false, 'Shows the person in front of you in the ServerRanking.');
|
||||
$this->maniaControl->commandManager->registerCommandListener(array('topranks', 'top100'), $this, 'command_topRanks', false, 'Shows an overview of the best-ranked 100 players.');
|
||||
|
||||
$this->resetRanks(); //TODO only update records count
|
||||
@ -148,7 +148,7 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
|
||||
`Avg` float NOT NULL default 0,
|
||||
KEY `PlayerIndex` (`PlayerIndex`),
|
||||
UNIQUE `Rank` (`Rank`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Mania Control Serverranking';";
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Mania Control ServerRanking';";
|
||||
$mysqli->query($query);
|
||||
if ($mysqli->error) {
|
||||
trigger_error($mysqli->error, E_USER_ERROR);
|
||||
|
@ -74,7 +74,7 @@ class ObstaclePlugin implements CallbackListener, CommandListener, Plugin {
|
||||
* @see \ManiaControl\Plugins\Plugin::getDescription()
|
||||
*/
|
||||
public static function getDescription() {
|
||||
return "Plugin offering CP Jumping and Local Records Support for the ShootManie Gamemode 'Obstacle'.";
|
||||
return "Plugin offering CP Jumping and Local Records Support for the ShootMania GameMode 'Obstacle'.";
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user