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;
|
$pauseExists = false;
|
||||||
foreach ($scriptInfos->commandDescs as $param) {
|
foreach ($scriptInfos->commandDescs as $param) {
|
||||||
if ($param->name === "Command_ForceWarmUp") {
|
if ($param->name === "Command_ForceWarmUp" || $param->name === "Command_SetPause") {
|
||||||
$pauseExists = true;
|
$pauseExists = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -251,8 +251,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
|||||||
$itemQuad->setAction(self::ACTION_START_VOTE . 'skipmap');
|
$itemQuad->setAction(self::ACTION_START_VOTE . 'skipmap');
|
||||||
$this->addVoteMenuItem($itemQuad, 15, 'Vote for a Map Skip');
|
$this->addVoteMenuItem($itemQuad, 15, 'Vote for a Map Skip');
|
||||||
|
|
||||||
if ($this->maniaControl->getServer()->isTeamMode()
|
if ($this->maniaControl->getServer()->isTeamMode()) {
|
||||||
) {
|
|
||||||
//Menu TeamBalance
|
//Menu TeamBalance
|
||||||
$itemQuad = new Quad_Icons128x32_1();
|
$itemQuad = new Quad_Icons128x32_1();
|
||||||
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_RT_Team);
|
$itemQuad->setSubStyle($itemQuad::SUBSTYLE_RT_Team);
|
||||||
@ -295,8 +294,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
|||||||
$itemMarginFactorY = 1.2;
|
$itemMarginFactorY = 1.2;
|
||||||
|
|
||||||
//If game is shootmania lower the icons position by 20
|
//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;
|
$posY -= $shootManiaOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -544,10 +542,21 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
|||||||
break;
|
break;
|
||||||
case 'pausegame':
|
case 'pausegame':
|
||||||
try {
|
try {
|
||||||
|
//Gamemodes like Elite, Speedball
|
||||||
$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_ForceWarmUp' => true));
|
$this->maniaControl->getClient()->sendModeScriptCommands(array('Command_ForceWarmUp' => true));
|
||||||
$this->maniaControl->getChat()->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!');
|
$this->maniaControl->getChat()->sendInformation('$f8fVote to $fffpause the current Game$f8f has been successful!');
|
||||||
} catch (GameModeException $ex) {
|
} 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;
|
break;
|
||||||
case 'replay':
|
case 'replay':
|
||||||
$this->maniaControl->getMapManager()->getMapQueue()->addFirstMapToMapQueue($this->currentVote->voter, $this->maniaControl->getMapManager()->getCurrentMap());
|
$this->maniaControl->getMapManager()->getMapQueue()->addFirstMapToMapQueue($this->currentVote->voter, $this->maniaControl->getMapManager()->getCurrentMap());
|
||||||
|
Loading…
Reference in New Issue
Block a user