fixed leftover maniascript logging
This commit is contained in:
parent
2442177166
commit
2cdb00131a
@ -254,7 +254,6 @@ Void {$updatePageFunction}(Text _PagingId, Text _PageLabelId, Integer _BrowseAct
|
||||
PageFound = True;
|
||||
}
|
||||
}
|
||||
log(Now^PageFound^CurrentPage^_Pages);
|
||||
if (!PageFound && _BrowseAction != 0) {
|
||||
declare Text ChunkAction;
|
||||
if (_BrowseAction < 0) {
|
||||
@ -265,7 +264,6 @@ Void {$updatePageFunction}(Text _PagingId, Text _PageLabelId, Integer _BrowseAct
|
||||
if (_ChunkActionAppendPageNumber) {
|
||||
ChunkAction ^= CurrentPage;
|
||||
}
|
||||
log(Now^ChunkAction);
|
||||
TriggerPageAction(ChunkAction);
|
||||
}
|
||||
if (_PageLabelId == \"\") return;
|
||||
|
@ -158,6 +158,23 @@ class ManialinkManager implements ManialinkPageAnswerListener, CallbackListener
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Hide the Manialink with the given Id
|
||||
*
|
||||
* @param mixed $manialinkId
|
||||
* @param mixed $logins
|
||||
*/
|
||||
public function hideManialink($manialinkId, $logins = null) {
|
||||
if (is_array($manialinkId)) {
|
||||
foreach ($manialinkId as $mlId) {
|
||||
$this->hideManialink($mlId, $logins);
|
||||
}
|
||||
} else {
|
||||
$emptyManialink = new ManiaLink($manialinkId);
|
||||
$this->sendManialink($emptyManialink, $logins);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the given manialink to players
|
||||
*
|
||||
|
@ -68,6 +68,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
private $maniaControl = null;
|
||||
private $updateManialink = false;
|
||||
/**
|
||||
*
|
||||
* @var ManiaLink $manialink
|
||||
*/
|
||||
private $manialink = null;
|
||||
@ -126,6 +127,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
// Open MX-Karma Session
|
||||
$this->mxKarmaOpenSession();
|
||||
$this->mxKarma['startTime'] = time();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -134,8 +136,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
* @see \ManiaControl\Plugins\Plugin::unload()
|
||||
*/
|
||||
public function unload() {
|
||||
$emptyManialink = new ManiaLink(self::MLID_KARMA);
|
||||
$this->maniaControl->manialinkManager->sendManialink($emptyManialink);
|
||||
$this->maniaControl->manialinkManager->hideManialink(self::MLID_KARMA);
|
||||
$this->maniaControl->callbackManager->unregisterCallbackListener($this);
|
||||
$this->maniaControl->timerManager->unregisterTimerListenings($this);
|
||||
unset($this->maniaControl);
|
||||
@ -220,10 +221,12 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
|
||||
// Update karma gauge & label
|
||||
/**
|
||||
*
|
||||
* @var Gauge $karmaGauge
|
||||
*/
|
||||
$karmaGauge = $this->manialink->karmaGauge;
|
||||
/**
|
||||
*
|
||||
* @var Label $karmaLabel
|
||||
*/
|
||||
$karmaLabel = $this->manialink->karmaLabel;
|
||||
@ -775,6 +778,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
$properties['playerlogins'] = array();
|
||||
foreach ($this->maniaControl->playerManager->getPlayers() as $plyr) {
|
||||
/**
|
||||
*
|
||||
* @var Player $player
|
||||
*/
|
||||
$properties['playerlogins'][] = $plyr->login;
|
||||
|
Loading…
Reference in New Issue
Block a user