changes for new structure
This commit is contained in:
committed by
Steffen Schröder
parent
027af49bc9
commit
0c6d8c010c
@ -105,8 +105,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
||||
$map = $nextQueued[1];
|
||||
$this->maniaControl->chat->sendInformation("Next map is $<" . $map->name . "$> from $<" . $map->authorNick . "$> requested by $<" . $requester->nickname . "$>.", $player->login);
|
||||
} else {
|
||||
$this->maniaControl->client->query('GetNextMapIndex');
|
||||
$mapIndex = $this->maniaControl->client->getResponse();
|
||||
$mapIndex = $this->maniaControl->client->getNextMapIndex();
|
||||
$maps = $this->maniaControl->mapManager->getMaps();
|
||||
$map = $maps[$mapIndex];
|
||||
$this->maniaControl->chat->sendInformation("Next map is $<" . $map->name . "$> from $<" . $map->authorNick . "$>.", $player->login);
|
||||
@ -186,7 +185,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
||||
$message = '$<' . $player->nickname . '$> skipped the current Map!';
|
||||
$this->maniaControl->chat->sendSuccess($message);
|
||||
$this->maniaControl->log($message, true);
|
||||
$this->maniaControl->client->query('NextMap');
|
||||
$this->maniaControl->client->nextMap();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -203,7 +202,7 @@ class MapCommands implements CommandListener, ManialinkPageAnswerListener, Callb
|
||||
$message = '$<' . $player->nickname . '$> restarted the current Map!';
|
||||
$this->maniaControl->chat->sendSuccess($message);
|
||||
$this->maniaControl->log($message, true);
|
||||
$this->maniaControl->client->query('RestartMap');
|
||||
$this->maniaControl->client->restartMap();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -727,7 +727,7 @@ class MapList implements ManialinkPageAnswerListener, CallbackListener {
|
||||
$this->showMapList($player);
|
||||
break;
|
||||
case self::ACTION_SWITCH_MAP:
|
||||
$this->maniaControl->client->query('JumpToMapIndex', $mapId);
|
||||
$this->maniaControl->client->jumpToMapIndex($mapId);
|
||||
$mapList = $this->maniaControl->mapManager->getMaps();
|
||||
$map = $mapList[$mapId];
|
||||
|
||||
|
@ -153,9 +153,9 @@ class MapQueue implements CallbackListener, CommandListener {
|
||||
$map = $this->nextMap[1];
|
||||
|
||||
|
||||
$success = $this->maniaControl->client->query('ChooseNextMap', $map->fileName);
|
||||
if(!$success) {
|
||||
trigger_error('[' . $this->maniaControl->client->getErrorCode() . '] ChooseNextMap - ' . $this->maniaControl->client->getErrorCode(), E_USER_WARNING);
|
||||
$success = $this->maniaControl->client->chooseNextMap($map->fileName);
|
||||
if(!$success) { //TODO error code?
|
||||
//trigger_error('[' . $this->maniaControl->client->getErrorCode() . '] ChooseNextMap - ' . $this->maniaControl->client->getErrorCode(), E_USER_WARNING);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user