added pause vote for chase / (and combo?)
This commit is contained in:
parent
35bb8a1a37
commit
1b719f0972
@ -229,7 +229,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
|
||||
$pauseExists = false;
|
||||
foreach ($scriptInfos->commandDescs as $param) {
|
||||
if ($param->name === "Command_ForceWarmUp") {
|
||||
if ($param->name === "Command_ForceWarmUp" || $param->name === "Command_SetPause") {
|
||||
$pauseExists = true;
|
||||
break;
|
||||
}
|
||||
@ -251,8 +251,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
$itemQuad->setAction(self::ACTION_START_VOTE . 'skipmap');
|
||||
$this->addVoteMenuItem($itemQuad, 15, 'Vote for a Map Skip');
|
||||
|
||||
if ($this->maniaControl->getServer()->isTeamMode()
|
||||
) {
|
||||
if ($this->maniaControl->getServer()->isTeamMode()) {
|
||||
//Menu TeamBalance
|
||||
$itemQuad = new Quad_Icons128x32_1();
|
||||
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_RT_Team);
|
||||
@ -295,8 +294,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
$itemMarginFactorY = 1.2;
|
||||
|
||||
//If game is shootmania lower the icons position by 20
|
||||
if ($this->maniaControl->getMapManager()->getCurrentMap()->getGame() === 'sm'
|
||||
) {
|
||||
if ($this->maniaControl->getMapManager()->getCurrentMap()->getGame() === 'sm') {
|
||||
$posY -= $shootManiaOffset;
|
||||
}
|
||||
|
||||
@ -544,10 +542,21 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
||||
break;
|
||||
case 'pausegame':
|
||||
try {
|
||||
//Gamemodes like Elite, Speedball
|
||||
$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_ForceWarmUp' => true));
|
||||
$this->maniaControl->getChat()->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!');
|
||||
} catch (GameModeException $ex) {
|
||||
}
|
||||
|
||||
try {
|
||||
//Chase and Combo?
|
||||
$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_SetPause' => true));
|
||||
$this->maniaControl->getChat()->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!');
|
||||
|
||||
//Especially for chase, force end of the round to reach a draw
|
||||
$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_ForceEndRound' => true));
|
||||
} catch (GameModeException $ex) {
|
||||
}
|
||||
break;
|
||||
case 'replay':
|
||||
$this->maniaControl->getMapManager()->getMapQueue()->addFirstMapToMapQueue($this->currentVote->voter, $this->maniaControl->getMapManager()->getCurrentMap());
|
||||
|
Loading…
Reference in New Issue
Block a user