compatibility updates
This commit is contained in:
parent
4385942d32
commit
d478e81c08
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
use ManiaControl\Callbacks\CallbackListener;
|
use ManiaControl\Callbacks\CallbackListener;
|
||||||
use ManiaControl\Callbacks\CallbackManager;
|
use ManiaControl\Callbacks\CallbackManager;
|
||||||
use ManiaControl\FileUtil;
|
use ManiaControl\Files\FileUtil;
|
||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
use ManiaControl\Plugins\Plugin;
|
use ManiaControl\Plugins\Plugin;
|
||||||
|
|
||||||
|
@ -522,7 +522,7 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
|
|||||||
// Background Quad
|
// Background Quad
|
||||||
$backgroundQuad = new Quad();
|
$backgroundQuad = new Quad();
|
||||||
$frame->add($backgroundQuad);
|
$frame->add($backgroundQuad);
|
||||||
$backgroundQuad->setSize($width, $height);
|
$backgroundQuad->setSize($width, $height);
|
||||||
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
$backgroundQuad->setStyles($quadStyle, $quadSubstyle);
|
||||||
|
|
||||||
//Vote for label
|
//Vote for label
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
use ManiaControl\ManiaControl;
|
use ManiaControl\ManiaControl;
|
||||||
use ManiaControl\Callbacks\CallbackListener;
|
use ManiaControl\Callbacks\CallbackListener;
|
||||||
use ManiaControl\Callbacks\CallbackManager;
|
use ManiaControl\Callbacks\CallbackManager;
|
||||||
|
use ManiaControl\Maps\Map;
|
||||||
use ManiaControl\Plugins\Plugin;
|
use ManiaControl\Plugins\Plugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -22,6 +23,7 @@ class EndurancePlugin implements CallbackListener, Plugin {
|
|||||||
*/
|
*/
|
||||||
/** @var maniaControl $maniaControl */
|
/** @var maniaControl $maniaControl */
|
||||||
private $maniaControl = null;
|
private $maniaControl = null;
|
||||||
|
/** @var Map $currentMap */
|
||||||
private $currentMap = null;
|
private $currentMap = null;
|
||||||
private $playerLapTimes = array();
|
private $playerLapTimes = array();
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ class LocalRecordsPlugin implements CallbackListener, TimerListener, Plugin {
|
|||||||
if (!$this->updateManialink) return;
|
if (!$this->updateManialink) return;
|
||||||
$this->updateManialink = false;
|
$this->updateManialink = false;
|
||||||
$manialink = $this->buildManialink();
|
$manialink = $this->buildManialink();
|
||||||
$this->sendManialink($manialink);
|
$this->maniaControl->manialinkManager->sendManialink($manialink);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -270,24 +270,6 @@ class LocalRecordsPlugin implements CallbackListener, TimerListener, Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Send manialink to clients
|
|
||||||
*
|
|
||||||
* @param string $manialink
|
|
||||||
* @param string $login
|
|
||||||
*/
|
|
||||||
private function sendManialink($manialink, $login = null) {
|
|
||||||
if ($login) {
|
|
||||||
if (!$this->maniaControl->client->query('SendDisplayManialinkPageToLogin', $login, $manialink, 0, false)) {
|
|
||||||
trigger_error("Couldn't send manialink to player '{$login}'. " . $this->maniaControl->getClientErrorText());
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!$this->maniaControl->client->query('SendDisplayManialinkPage', $manialink, 0, false)) {
|
|
||||||
trigger_error("Couldn't send manialink to players. " . $this->maniaControl->getClientErrorText());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle ClientUpdated callback
|
* Handle ClientUpdated callback
|
||||||
*
|
*
|
||||||
|
@ -126,8 +126,10 @@ class ObstaclePlugin implements CallbackListener, CommandListener, Plugin {
|
|||||||
// Send jump callback
|
// Send jump callback
|
||||||
$params = explode(' ', $chatCallback[1][2], 2);
|
$params = explode(' ', $chatCallback[1][2], 2);
|
||||||
$param = $player->login . ";" . $params[1] . ";";
|
$param = $player->login . ";" . $params[1] . ";";
|
||||||
if (!$this->maniaControl->client->query('TriggerModeScriptEvent', self::CB_JUMPTO, $param)) {
|
try{
|
||||||
trigger_error("Couldn't send jump callback for '{$player->login}'. " . $this->maniaControl->getClientErrorText());
|
$this->maniaControl->client->triggerModeScriptEvent(self::CB_JUMPTO, $param);
|
||||||
|
} catch(\Exception $e){
|
||||||
|
trigger_error("Couldn't send jump callback for '{$player->login}'. " . $e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user