force to play button on non team modes

This commit is contained in:
kremsy 2014-02-01 19:43:44 +01:00 committed by Steffen Schröder
parent 600a181974
commit 0db776a2e5

View File

@ -278,7 +278,7 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
// Description Label
$script->addTooltip($playerQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Advanced Player Actions on " . $listPlayer->nickname));
if($this->maniaControl->server->isTeamMode()){
if ($this->maniaControl->server->isTeamMode()) {
// Force to Red-Team Quad
$redQuad = new Quad_Emblems();
$playerFrame->add($redQuad);
@ -302,15 +302,18 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
// Force to Blue-Team Description Label
$script->addTooltip($blueQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Force " . $listPlayer->nickname . '$z to Blue Team!'));
}else{
} else {
// Force to Play
$redQuad = new Quad_Emblems();
$playerFrame->add($redQuad);
$redQuad->setX($x + 145);
$redQuad->setZ(0.1);
$redQuad->setSubStyle($redQuad::SUBSTYLE_2);
$redQuad->setSize(3.8, 3.8);
$redQuad->setAction(self::ACTION_FORCE_PLAY . "." . $listPlayer->login);
$playQuad = new Quad_Emblems();
$playerFrame->add($playQuad);
$playQuad->setX($x + 143);
$playQuad->setZ(0.1);
$playQuad->setSubStyle($playQuad::SUBSTYLE_2);
$playQuad->setSize(3.8, 3.8);
$playQuad->setAction(self::ACTION_FORCE_PLAY . "." . $listPlayer->login);
// Force to Blue-Team Description Label
$script->addTooltip($playQuad, $descriptionLabel, array(Script::OPTION_TOOLTIP_TEXT => "Force " . $listPlayer->nickname . '$z to Play!'));
}
// Force to Spectator Quad
@ -628,6 +631,9 @@ class PlayerList implements ManialinkPageAnswerListener, CallbackListener, Timer
case self::ACTION_FORCE_SPEC:
$this->maniaControl->playerManager->playerActions->forcePlayerToSpectator($adminLogin, $targetLogin, PlayerActions::SPECTATOR_BUT_KEEP_SELECTABLE);
break;
case self::ACTION_FORCE_PLAY:
$this->maniaControl->playerManager->playerActions->forcePlayerToPlay($adminLogin, $targetLogin);
break;
case self::ACTION_MUTE_PLAYER:
$this->maniaControl->playerManager->playerActions->mutePlayer($adminLogin, $targetLogin);
$this->showPlayerList($this->maniaControl->playerManager->getPlayer($adminLogin));