- moved map begin+end callbacks to map manager

- callback manager cleanup
This commit is contained in:
Steffen Schröder
2014-02-19 16:27:56 +01:00
parent ff9c21a8af
commit 71ab8764df
8 changed files with 112 additions and 91 deletions

View File

@ -42,7 +42,7 @@ class MapQueue implements CallbackListener, CommandListener {
public function __construct(ManiaControl $maniaControl) {
$this->maniaControl = $maniaControl;
$this->maniaControl->callbackManager->registerCallbackListener(CallbackManager::CB_ENDMAP, $this, 'endMap');
$this->maniaControl->callbackManager->registerCallbackListener(MapManager::CB_ENDMAP, $this, 'endMap');
// Init settings
$this->maniaControl->settingManager->initSetting($this, self::SETTING_SKIP_MAP_ON_LEAVE, true);
@ -140,9 +140,9 @@ class MapQueue implements CallbackListener, CommandListener {
/**
* Called on endmap
*
* @param array $callback
* @param Map $map
*/
public function endMap(array $callback) {
public function endMap(Map $map) {
$this->nextMap = null;
if ($this->maniaControl->settingManager->getSetting($this, self::SETTING_SKIP_MAP_ON_LEAVE) == TRUE) {