Compare commits

...

2 Commits

Author SHA1 Message Date
Beu
fb3bf97bfc fix small warning for undefined variable 2023-12-23 12:47:23 +01:00
Beu
96757006a1 fix score not sent when S_RoundsPerMap = 0 2023-12-23 12:46:51 +01:00
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ use ManiaControl\Callbacks\TimerListener; // for pause
class MatchManagerCore implements CallbackListener, CommandListener, TimerListener, CommunicationListener, Plugin {
const PLUGIN_ID = 152;
const PLUGIN_VERSION = 4.6;
const PLUGIN_VERSION = 4.7;
const PLUGIN_NAME = 'MatchManager Core';
const PLUGIN_AUTHOR = 'Beu';
@ -1561,7 +1561,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
} elseif ($structure->getSection() == "EndRound") {
$timestamp = time();
if ($this->nbmaps != 0 && $this->nbrounds <= $this->settings_nbroundsbymap) {
if ($this->nbmaps != 0 && ($this->nbrounds <= $this->settings_nbroundsbymap || $this->settings_nbroundsbymap <= 0)) {
//
// Players Scores
//

View File

@ -510,10 +510,10 @@ class MatchManagerGSheet implements CallbackListener, TimerListener, CommandLis
$data->data[3] = new \stdClass;
$data->data[3]->range = "'" . $sheetname . "'!" . self::MODE_SPECIFICS_SETTINGS[$this->currentdatamode]["TeamsScoreTable_BeginLetter"] . "2";
$data->data[3]->values = $currentteamsscore;
} else {
}
$nbmaps = $this->MatchManagerCore->getMapNumber();
$nbrounds = $this->MatchManagerCore->getRoundNumber();
}
$asyncHttpRequest = new AsyncHttpRequest($this->maniaControl, 'https://sheets.googleapis.com/v4/spreadsheets/' . $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCHMANAGERGSHEET_SPREADSHEET) . '/values:batchUpdate');
$asyncHttpRequest->setContentType(AsyncHttpRequest::CONTENT_TYPE_JSON);