This commit is contained in:
kremsy 2014-01-11 16:36:34 +01:00 committed by Steffen Schröder
parent 85e5c543e1
commit 7bc09fca3b
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
$this->maniaControl->commandManager->registerCommandListener('restartmap', $this, 'command_RestartMap', true); $this->maniaControl->commandManager->registerCommandListener('restartmap', $this, 'command_RestartMap', true);
$this->maniaControl->commandManager->registerCommandListener('addmap', $this, 'command_AddMap', 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(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 // Register for player chat commands
$this->maniaControl->commandManager->registerCommandListener(array('maps', 'list'), $this, 'command_List'); $this->maniaControl->commandManager->registerCommandListener(array('maps', 'list'), $this, 'command_List');
@ -122,7 +122,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
return; return;
} }
// add Map from Mania Exchange // Shuffles the maps
$this->maniaControl->mapManager->shuffleMapList(); $this->maniaControl->mapManager->shuffleMapList();
//TODO message //TODO message
} }

View File

@ -172,7 +172,7 @@ class MapManager implements CallbackListener {
$mapList = $this->maniaControl->client->getResponse(); $mapList = $this->maniaControl->client->getResponse();
shuffle($mapList); 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()); trigger_error("Couldn't shuffle mapList. " . $this->maniaControl->getClientErrorText());
return false; return false;
} }