keep last info when match end

This commit is contained in:
Beu 2022-03-05 18:03:51 +01:00
parent 05eb948bf3
commit 7c707baaca

View File

@ -36,7 +36,7 @@ class MatchManagerGSheet implements CallbackListener, TimerListener, CommandLis
* Constants * Constants
*/ */
const PLUGIN_ID = 156; const PLUGIN_ID = 156;
const PLUGIN_VERSION = 1.1; const PLUGIN_VERSION = 1.2;
const PLUGIN_NAME = 'MatchManager GSheet'; const PLUGIN_NAME = 'MatchManager GSheet';
const PLUGIN_AUTHOR = 'Beu'; const PLUGIN_AUTHOR = 'Beu';
@ -451,7 +451,11 @@ class MatchManagerGSheet implements CallbackListener, TimerListener, CommandLis
$data->data[0] = new \stdClass; $data->data[0] = new \stdClass;
$data->data[0]->range = "'" . $sheetname . "'!B2"; $data->data[0]->range = "'" . $sheetname . "'!B2";
$data->data[0]->values = array(array($matchstatus),array($this->MatchManagerCore->getCountMap()),array($this->MatchManagerCore->getCountRound()),array($this->maniaControl->getPlayerManager()->getPlayerCount()),array($this->maniaControl->getPlayerManager()->getSpectatorCount())); if ($this->matchstatus == "ended") {
$data->data[0]->values = array(array($matchstatus));
} else {
$data->data[0]->values = array(array($matchstatus),array($this->MatchManagerCore->getCountMap()),array($this->MatchManagerCore->getCountRound()),array($this->maniaControl->getPlayerManager()->getPlayerCount()),array($this->maniaControl->getPlayerManager()->getSpectatorCount()));
}
$data->data[1] = new \stdClass; $data->data[1] = new \stdClass;
$data->data[1]->range = "'" . $sheetname . "'!A9"; $data->data[1]->range = "'" . $sheetname . "'!A9";