jukebox beginn

This commit is contained in:
kremsy
2013-12-28 19:48:06 +01:00
parent ebe09a8828
commit 5bc897cf33
5 changed files with 73 additions and 4 deletions

View File

@ -9,6 +9,7 @@ use ManiaControl\FileUtil;
use ManiaControl\ManiaControl;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\Players\PlayerList;
use MXInfoFetcher;
@ -32,6 +33,11 @@ class MapManager implements CallbackListener {
private $mapListUids = array();
private $currentMap = null;
/**
* Public Properties
*/
public $jukebox = null;
/**
* Construct map manager
*
@ -45,11 +51,13 @@ class MapManager implements CallbackListener {
// Create map commands instance
$this->mapCommands = new MapCommands($maniaControl);
$this->jukebox = new Jukebox($this->maniaControl);
// Register for callbacks
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_ONINIT, $this, 'handleOnInit');
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MC_BEGINMAP, $this, 'handleBeginMap');
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_MP_MAPLISTMODIFIED, $this, 'mapListModified');
}
/**
@ -201,12 +209,20 @@ class MapManager implements CallbackListener {
}
/**
* @return null
* @return currentMap
*/
public function getCurrentMap(){
return $this->currentMap;
}
/**
* Returns map By UID
* @param $uid
* @return mixed
*/
public function getMapByUid($uid){
return $this->mapListUids[$uid];
}
/**