revert match settings manager (nevermind)

This commit is contained in:
Steffen Schröder
2014-05-11 16:02:29 +02:00
parent 0834d2c587
commit f9df0fc325
10 changed files with 67 additions and 136 deletions

View File

@ -25,7 +25,7 @@ use ManiaControl\Manialinks\ManialinkPageAnswerListener;
use ManiaControl\Players\Player;
use ManiaControl\Players\PlayerManager;
use ManiaControl\Plugins\Plugin;
use ManiaControl\Server\MatchSettingsManager;
use ManiaControl\Server\Server;
use ManiaControl\Server\ServerCommands;
use Maniaplanet\DedicatedServer\Structures\VoteRatio;
use Maniaplanet\DedicatedServer\Xmlrpc\NotInScriptModeException;
@ -139,7 +139,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERMANIALINKPAGEANSWER, $this, 'handleManialinkPageAnswer');
$this->maniaControl->callbackManager->registerCallbackListener(self::CB_CUSTOM_VOTE_FINISHED, $this, 'handleVoteFinished');
$this->maniaControl->callbackManager->registerCallbackListener(PlayerManager::CB_PLAYERCONNECT, $this, 'handlePlayerConnect');
$this->maniaControl->callbackManager->registerCallbackListener(MatchSettingsManager::CB_TEAM_MODE_CHANGED, $this, 'constructMenu');
$this->maniaControl->callbackManager->registerCallbackListener(Server::CB_TEAM_MODE_CHANGED, $this, 'constructMenu');
//Settings
$this->maniaControl->settingManager->initSetting($this, self::SETTING_VOTE_ICON_POSX, 156.);
@ -243,7 +243,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
$itemQuad->setAction(self::ACTION_START_VOTE . 'skipmap');
$this->addVoteMenuItem($itemQuad, 15, 'Vote for a Mapskip');
if ($this->maniaControl->server->matchSettingsManager->isTeamMode()) {
if ($this->maniaControl->server->isTeamMode()) {
//Menu TeamBalance
$itemQuad = new Quad_Icons128x32_1();
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_RT_Team);

View File

@ -358,7 +358,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
* @return String
*/
private function getGameModeString() {
$gameMode = $this->maniaControl->server->matchSettingsManager->getGameMode();
$gameMode = $this->maniaControl->server->getGameMode();
$scriptNameResponse = $this->maniaControl->client->getScriptName();
$scriptName = str_replace('.Script.txt', '', $scriptNameResponse["CurrentValue"]);
if ($gameMode === null) {

View File

@ -335,7 +335,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
$properties = array();
$gameMode = $this->maniaControl->server->matchSettingsManager->getGameMode(true);
$gameMode = $this->maniaControl->server->getGameMode(true);
if ($gameMode == 'Script') {
$scriptName = $this->maniaControl->client->getScriptName();
$properties['gamemode'] = $scriptName["CurrentValue"];
@ -384,7 +384,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
$self->maniaControl->log("MX-Karma Votes successfully fetched");
} else {
$self->maniaControl->log("Error while fetching votes: " . $data->data->message);
if($data->data->message == "invalid session"){
if ($data->data->message == "invalid session") {
unset($this->mxKarma['session']);
return;
}
@ -444,7 +444,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
return;
}
$gameMode = $this->maniaControl->server->matchSettingsManager->getGameMode(true);
$gameMode = $this->maniaControl->server->getGameMode(true);
if (count($votes) == 0) {
return;
@ -481,7 +481,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
$self->maniaControl->log("Votes successfully permitted");
} else {
$self->maniaControl->log("Error while updating votes: " . $data->data->message);
if($data->data->message == "invalid session"){
if ($data->data->message == "invalid session") {
unset($this->mxKarma['session']);
return;
}