refactored phpdoc, return/break statements, uses
This commit is contained in:
@ -967,6 +967,7 @@ class Dedimania implements CallbackListener, CommandListener, TimerListener, Plu
|
||||
} else if ($scriptName == 'TimeAttack' || $scriptName == 'Laps' || $scriptName == 'TeamAttack' || $scriptName == 'TimeAttackPlus') {
|
||||
return 'TA';
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
case 3:
|
||||
|
@ -218,7 +218,6 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
$karmaGauge->setColor($karmaColor . '7');
|
||||
$karmaLabel->setText(' ' . round($karma * 100.) . '% (' . $voteCount . ')');
|
||||
} else {
|
||||
$karma = 0.;
|
||||
$karmaGauge->setRatio(0.);
|
||||
$karmaGauge->setColor('00fb');
|
||||
$karmaLabel->setText('-');
|
||||
@ -227,7 +226,8 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
// Loop players
|
||||
foreach($players as $login => $player) {
|
||||
// Get player vote
|
||||
//$vote = $this->getPlayerVote($player, $map); //TODO what is this for, vote nowhere used?
|
||||
// TODO: show the player his own vote in some way
|
||||
//$vote = $this->getPlayerVote($player, $map);
|
||||
|
||||
// Adjust manialink for player's vote
|
||||
$votesFrame = $this->manialink->votesFrame;
|
||||
|
@ -359,9 +359,8 @@ class LocalRecordsPlugin implements CallbackListener, CommandListener, TimerList
|
||||
}
|
||||
|
||||
$mysqli = $this->maniaControl->database->mysqli;
|
||||
$removeRecord = $records[$recordId-1];
|
||||
$query = "DELETE FROM `" . self::TABLE_RECORDS . "` WHERE `mapIndex` = ".$currentMap->index." AND `playerIndex` = ".$player->index."";
|
||||
$result = $mysqli->query($query);
|
||||
$mysqli->query($query);
|
||||
if ($mysqli->error) {
|
||||
trigger_error($mysqli->error);
|
||||
return null;
|
||||
|
@ -366,7 +366,7 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
||||
* @return bool
|
||||
*/
|
||||
private function addPlayerToQueue(Player $player) {
|
||||
if($this->maniaControl->client->getServerPassword() != false && $this->maniaControl->settingManager->getSetting($this, self::QUEUE_ACTIVE_ON_PASS) == false) return;
|
||||
if($this->maniaControl->client->getServerPassword() != false && $this->maniaControl->settingManager->getSetting($this, self::QUEUE_ACTIVE_ON_PASS) == false) return false;
|
||||
|
||||
foreach($this->queue as $queuedPlayer) {
|
||||
if($queuedPlayer->login == $player->login) {
|
||||
@ -379,6 +379,8 @@ class QueuePlugin implements CallbackListener, CommandListener, ManialinkPageAns
|
||||
$this->queue[count($this->queue)] = $player;
|
||||
$this->sendChatMessage('$<$fff' . $player->nickname . '$> just joined the queue!');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -319,7 +319,6 @@ class TeamSpeakPlugin implements CallbackListener, CommandListener, ManialinkPag
|
||||
$frame->add($users[$userid]);
|
||||
$y = 17.5 + ($i * 2.5);
|
||||
$users[$userid]->setY($height / 2 - $y);
|
||||
$x = $startx;
|
||||
if ($channel['pid'] != 0) {
|
||||
$x = $startx + 7;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user