resolved two todos
This commit is contained in:
parent
e3d67d4f6d
commit
1a9c182f15
@ -106,7 +106,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
|||||||
$this->maniaControl->chat->sendError("Couldn't remove map.", $player->login);
|
$this->maniaControl->chat->sendError("Couldn't remove map.", $player->login);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//TODO message
|
|
||||||
//RemoveMap
|
//RemoveMap
|
||||||
$this->maniaControl->mapManager->removeMap($player, $map->uid);
|
$this->maniaControl->mapManager->removeMap($player, $map->uid);
|
||||||
}
|
}
|
||||||
@ -124,8 +124,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Shuffles the maps
|
// Shuffles the maps
|
||||||
$this->maniaControl->mapManager->shuffleMapList();
|
$this->maniaControl->mapManager->shuffleMapList($player);
|
||||||
//TODO message
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -188,7 +188,7 @@ class MapManager implements CallbackListener {
|
|||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function shuffleMapList() {
|
public function shuffleMapList($admin = null) {
|
||||||
shuffle($this->maps);
|
shuffle($this->maps);
|
||||||
|
|
||||||
$mapArray = array();
|
$mapArray = array();
|
||||||
@ -205,6 +205,12 @@ class MapManager implements CallbackListener {
|
|||||||
|
|
||||||
$this->fetchCurrentMap();
|
$this->fetchCurrentMap();
|
||||||
|
|
||||||
|
if($admin != null) {
|
||||||
|
$message = '$<' . $admin->nickname . '$> shuffled the Maplist!';
|
||||||
|
$this->maniaControl->chat->sendSuccess($message);
|
||||||
|
$this->maniaControl->log($message, true);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user