From 7bc09fca3bfbd9ac8ed80ba24aee3f4c14cdf2e8 Mon Sep 17 00:00:00 2001 From: kremsy Date: Sat, 11 Jan 2014 16:36:34 +0100 Subject: [PATCH] shuffle --- application/core/Maps/MapCommands.php | 4 ++-- application/core/Maps/MapManager.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/application/core/Maps/MapCommands.php b/application/core/Maps/MapCommands.php index df2bba55..6d7a18f0 100644 --- a/application/core/Maps/MapCommands.php +++ b/application/core/Maps/MapCommands.php @@ -46,7 +46,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb $this->maniaControl->commandManager->registerCommandListener('restartmap', $this, 'command_RestartMap', true); $this->maniaControl->commandManager->registerCommandListener('addmap', $this, 'command_AddMap', true); $this->maniaControl->commandManager->registerCommandListener(array('removemap', 'removethis', 'erasemap', 'erasethis'), $this, 'command_RemoveMap', true); - $this->maniaControl->commandManager->registerCommandListener('shufflemaps', $this, 'command_ShuffleMap', true); + $this->maniaControl->commandManager->registerCommandListener(array('shufflemaps', 'shuffle'), $this, 'command_ShuffleMap', true); // Register for player chat commands $this->maniaControl->commandManager->registerCommandListener(array('maps', 'list'), $this, 'command_List'); @@ -122,7 +122,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb return; } - // add Map from Mania Exchange + // Shuffles the maps $this->maniaControl->mapManager->shuffleMapList(); //TODO message } diff --git a/application/core/Maps/MapManager.php b/application/core/Maps/MapManager.php index b51c9866..1f6a795d 100644 --- a/application/core/Maps/MapManager.php +++ b/application/core/Maps/MapManager.php @@ -172,7 +172,7 @@ class MapManager implements CallbackListener { $mapList = $this->maniaControl->client->getResponse(); shuffle($mapList); - if(!$this->maniaControl->client->query('hooseNextChallengeLis', $mapList)) { + if(!$this->maniaControl->client->query('ChooseNextChallengeList', $mapList)) { trigger_error("Couldn't shuffle mapList. " . $this->maniaControl->getClientErrorText()); return false; }