removed unnecessary private property

This commit is contained in:
Steffen Schröder 2014-01-05 12:56:34 +01:00
parent f4b87a68a4
commit 9bba56d811

View File

@ -53,7 +53,6 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
private $serverSettings = null; private $serverSettings = null;
private $menus = array(); private $menus = array();
private $playersMenuShown = array(); private $playersMenuShown = array();
private $manialink = null;
/** /**
* Create a new Configurator * Create a new Configurator
@ -70,18 +69,14 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_WIDTH, 170.); $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_WIDTH, 170.);
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_HEIGHT, 81.); $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_HEIGHT, 81.);
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_STYLE, Quad_BgRaceScore2::STYLE); $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_STYLE, Quad_BgRaceScore2::STYLE);
$this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_SUBSTYLE, $this->maniaControl->settingManager->initSetting($this, self::SETTING_MENU_SUBSTYLE, Quad_BgRaceScore2::SUBSTYLE_HandleSelectable);
Quad_BgRaceScore2::SUBSTYLE_HandleSelectable);
// Register for page answers // Register for page answers
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_TOGGLEMENU, $this, $this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_TOGGLEMENU, $this, 'handleToggleMenuAction');
'handleToggleMenuAction'); $this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_SAVECONFIG, $this, 'handleSaveConfigAction');
$this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_SAVECONFIG, $this,
'handleSaveConfigAction');
// Register for callbacks // Register for callbacks
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERDISCONNECT, $this, $this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_PLAYERDISCONNECT, $this, 'handlePlayerDisconnect');
'handlePlayerDisconnect');
$this->maniaControl->callbackManager->registerCallbackListener(ScriptSettings::CB_SCRIPTSETTING_CHANGED, $this, 'reopenMenu'); $this->maniaControl->callbackManager->registerCallbackListener(ScriptSettings::CB_SCRIPTSETTING_CHANGED, $this, 'reopenMenu');
$this->maniaControl->callbackManager->registerCallbackListener(ServerSettings::CB_SERVERSETTING_CHANGED, $this, 'reopenMenu'); $this->maniaControl->callbackManager->registerCallbackListener(ServerSettings::CB_SERVERSETTING_CHANGED, $this, 'reopenMenu');
@ -93,7 +88,6 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
$this->serverSettings = new ServerSettings($maniaControl); $this->serverSettings = new ServerSettings($maniaControl);
$this->addMenu($this->serverSettings); $this->addMenu($this->serverSettings);
// Register for commands // Register for commands
$this->maniaControl->commandManager->registerCommandListener('config', $this, 'handleConfigCommand', true); $this->maniaControl->commandManager->registerCommandListener('config', $this, 'handleConfigCommand', true);
} }
@ -168,8 +162,8 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
* @param Player $player * @param Player $player
*/ */
public function showMenu(Player $player) { public function showMenu(Player $player) {
$this->buildManialink(); $manialink = $this->buildManialink();
$manialinkText = $this->manialink->render()->saveXML(); $manialinkText = $manialink->render()->saveXML();
$this->maniaControl->manialinkManager->sendManialink($manialinkText, $player->login); $this->maniaControl->manialinkManager->sendManialink($manialinkText, $player->login);
$this->maniaControl->manialinkManager->disableAltMenu($player); $this->maniaControl->manialinkManager->disableAltMenu($player);
$this->playersMenuShown[$player->login] = true; $this->playersMenuShown[$player->login] = true;
@ -303,7 +297,7 @@ class Configurator implements CallbackListener, CommandListener, ManialinkPageAn
$saveButton->setText('$zSave$z'); $saveButton->setText('$zSave$z');
$saveButton->setAction(self::ACTION_SAVECONFIG); $saveButton->setAction(self::ACTION_SAVECONFIG);
$this->manialink = $manialinks; return $manialinks;
} }
/** /**