From 894ff70c547327a26e2622fc2b677fa9c3eb30db Mon Sep 17 00:00:00 2001 From: kremsy Date: Fri, 10 Jan 2014 15:58:27 +0100 Subject: [PATCH] small fixes --- application/core/Maps/MapList.php | 4 ++-- application/core/Players/PlayerActions.php | 1 + application/core/Players/PlayerList.php | 9 ++++++--- application/core/Server/ServerCommands.php | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/application/core/Maps/MapList.php b/application/core/Maps/MapList.php index 5f7e0618..a3d1d62c 100644 --- a/application/core/Maps/MapList.php +++ b/application/core/Maps/MapList.php @@ -687,8 +687,8 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener { $this->maniaControl->mapManager->addMapFromMx($mapId, $player->login); break; case self::ACTION_ERASE_MAP: - //actionArray[3] = mapUid - $this->maniaControl->mapManager->removeMap($player, $actionArray[3]); + $mapUid = $actionArray[3]; + $this->maniaControl->mapManager->removeMap($player, $mapUid); $this->showMapList($player); break; case self::ACTION_SWITCH_MAP: diff --git a/application/core/Players/PlayerActions.php b/application/core/Players/PlayerActions.php index 01b2bc80..7b556819 100644 --- a/application/core/Players/PlayerActions.php +++ b/application/core/Players/PlayerActions.php @@ -292,6 +292,7 @@ class PlayerActions { $label->setStyle(Label_Text::STYLE_TextCardMedium); $label->setText($line); $label->setTextColor('ff0'); + $label->setTextSize(1.3); $y -= 4; } diff --git a/application/core/Players/PlayerList.php b/application/core/Players/PlayerList.php index 68d9abc6..4bccf55a 100644 --- a/application/core/Players/PlayerList.php +++ b/application/core/Players/PlayerList.php @@ -201,7 +201,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { $countryQuad->setImage("file://Skins/Avatars/Flags/{$countryCode}.dds"); $countryQuad->setX($x + 98); $countryQuad->setSize(4, 4); - $countryQuad->setZ(-0.1); + $countryQuad->setZ(1); $script->addTooltip($countryQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => $listPlayer->nickname . " from " . $listPlayer->path)); } @@ -240,7 +240,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { $playerQuad->setSubStyle($playerQuad::SUBSTYLE_Camera); $playerQuad->setSize(3.8, 3.8); $script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Spectate " . $listPlayer->nickname)); - $playerQuad->setAction(self::ACTION_SPECTATE_PLAYER); + $playerQuad->setAction(self::ACTION_SPECTATE_PLAYER . "." . $listPlayer->login); // Player Profile Quad $playerQuad = new Quad_UIConstruction_Buttons(); @@ -444,7 +444,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { $quad = clone $quad; $frame->add($quad); $quad->setY($y); - $quad->setAction(self::ACTION_KICK_PLAYER . "." . $login); + $quad->setAction(self::ACTION_WARN_PLAYER . "." . $login); $label = clone $label; $frame->add($label); @@ -577,8 +577,11 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener { switch($action) { case self::ACTION_SPECTATE_PLAYER: // TODO not working yet + var_dump($adminLogin); $this->maniaControl->client->query('ForceSpectator', $adminLogin, PlayerActions::SPECTATOR_SPECTATOR); + var_dump($this->maniaControl->client->getResponse()); $this->maniaControl->client->query('ForceSpectatorTarget', $adminLogin, $targetLogin, 1); + var_dump($this->maniaControl->client->getResponse()); break; case self::ACTION_OPEN_PLAYER_DETAILED: $player = $this->maniaControl->playerManager->getPlayer($adminLogin); diff --git a/application/core/Server/ServerCommands.php b/application/core/Server/ServerCommands.php index b7c4d41b..addb2e7f 100644 --- a/application/core/Server/ServerCommands.php +++ b/application/core/Server/ServerCommands.php @@ -63,7 +63,7 @@ class ServerCommands implements CallbackListener, CommandListener, ManialinkPage $itemQuad = new Quad_Icons128x32_1(); //TODO check if mode supports it $itemQuad->setSubStyle($itemQuad::SUBSTYLE_ManiaLinkSwitch); $itemQuad->setAction(self::ACTION_SET_PAUSE); - $this->maniaControl->actionsMenu->addAdminMenuItem($itemQuad, 1, 'Pauses the current game.'); + $this->maniaControl->actionsMenu->addAdminMenuItem($itemQuad, 1, 'Pauses the current game'); // Action cancel Vote $this->maniaControl->manialinkManager->registerManialinkPageAnswerListener(self::ACTION_CANCEL_VOTE, $this, 'command_cancelVote');