changed arguments of the modescripptevents to strings

This commit is contained in:
kremsy
2017-04-13 22:59:41 +02:00
parent cffbc6cd89
commit 7835f89eae
3 changed files with 21 additions and 10 deletions

View File

@@ -215,7 +215,7 @@ class ModeScriptEventManager implements UsageInformationAble {
* @param $seconds < the duration of the extension in seconds.
*/
public function extendManiaPlanetWarmup($seconds) {
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.WarmUp.Extend', array($seconds * 1000));
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.WarmUp.Extend', array(strval($seconds * 1000)));
}
/**
@@ -233,7 +233,7 @@ class ModeScriptEventManager implements UsageInformationAble {
* @param int $time Timer before the end of the warmup when all players are ready. Use a negative value to prevent the warmup from ending even if all players are ready.
*/
public function blockEndWarmUp($time = -1) {
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.WarmUp.BlockEndWarmUp', array(true, $time));
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.WarmUp.BlockEndWarmUp', array("True", strval($time)));
}
/**
@@ -242,7 +242,7 @@ class ModeScriptEventManager implements UsageInformationAble {
* @param int $time Timer before the end of the warmup when all players are ready. Use a negative value to prevent the warmup from ending even if all players are ready.
*/
public function unBlockEndWarmUp($time = -1) {
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.WarmUp.BlockEndWarmUp', array(false, $time));
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.WarmUp.BlockEndWarmUp', array("False", strval($time)));
}
/**
@@ -277,7 +277,7 @@ class ModeScriptEventManager implements UsageInformationAble {
*/
public function startPause() {
$responseId = $this->generateResponseId();
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.Pause.SetActive', array(true, $responseId));
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.Pause.SetActive', array("True", $responseId));
return new InvokeScriptCallback($this->maniaControl, Callbacks::MP_PAUSE_STATUS, $responseId);
}
@@ -289,7 +289,7 @@ class ModeScriptEventManager implements UsageInformationAble {
*/
public function endPause() {
$responseId = $this->generateResponseId();
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.Pause.SetActive', array(false, $responseId));
$this->maniaControl->getClient()->triggerModeScriptEvent('Maniaplanet.Pause.SetActive', array("False", $responseId));
return new InvokeScriptCallback($this->maniaControl, Callbacks::MP_PAUSE_STATUS, $responseId);
}

View File

@@ -90,6 +90,9 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
$this->maniaControl->getAuthenticationManager()->definePermissionLevel(self::SETTING_PERMISSION_CANCEL_VOTE, AuthenticationManager::AUTH_LEVEL_MODERATOR);
$this->maniaControl->getAuthenticationManager()->definePermissionLevel(self::SETTING_PERMISSION_HANDLE_WARMUP, AuthenticationManager::AUTH_LEVEL_MODERATOR);
//Triggers a WarmUp Status Callback
$this->maniaControl->getModeScriptEventManager()->getWarmupStatus();
$this->updateCancelVoteMenuItem();
$this->updateWarmUpMenuItems();
}
@@ -121,7 +124,7 @@ class Commands implements CallbackListener, CommandListener, ManialinkPageAnswer
/**
* Handle the WarmupStatus Callback, and removes or adds the Menu Items for extending / Stopping warmup
*
* @param $warmupEnabled
* @param \ManiaControl\Callbacks\Structures\Common\StatusCallbackStructure $structure
*/
public function handleWarmUpStatus(StatusCallbackStructure $structure) {
if ($structure->isAvailable()) {