Compare commits

..

3 Commits

Author SHA1 Message Date
beu
787964a8ed improve logging 2025-06-22 19:59:01 +02:00
beu
af10e1678a bump version 2025-06-22 19:56:53 +02:00
beu
33cc10b6c1 fix non-blocking errors 2025-06-22 19:38:50 +02:00
3 changed files with 7 additions and 6 deletions

View File

@ -26,7 +26,7 @@ class SmallTextOverlay implements TimerListener, CallbackListener, Plugin {
* Constants
*/
const PLUGIN_ID = 195;
const PLUGIN_VERSION = 1.1;
const PLUGIN_VERSION = 1.4;
const PLUGIN_NAME = 'SmallTextOverlay';
const PLUGIN_AUTHOR = 'Beu';

View File

@ -32,7 +32,7 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
* Constants
*/
const PLUGIN_ID = 174;
const PLUGIN_VERSION = 2.2;
const PLUGIN_VERSION = 2.3;
const PLUGIN_NAME = 'MatchManager Admin UI';
const PLUGIN_AUTHOR = 'Beu';
@ -198,6 +198,8 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
* @return void
*/
public function generateManialink() {
$this->log("Generating interface with ". count($this->menuItems) . " items");
$quadStyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultQuadStyle();
$quadSubstyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultQuadSubstyle();
$itemMarginFactorX = 1.3;
@ -277,14 +279,12 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
public function addMenuItem(MatchManagerAdminUI_MenuItem $menuItem) {
$this->removeMenuItem($menuItem->getActionId());
$this->log("New Menu Item: ". $menuItem->getActionId());
$this->menuItems[] = $menuItem;
$this->updateManialink = true;
}
public function removeMenuItem(string $actionId) {
$this->log("Removing Menu Item: ". $actionId);
$this->menuItems = array_filter($this->menuItems, function($menuItem) use ($actionId) {
return $menuItem->getActionId() !== $actionId;
});

View File

@ -1198,6 +1198,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
}
// Define Gamemode
$scriptName = '-';
if ($this->currentsettingmode != 'All from file') {
if (empty($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_CUSTOM_GAMEMODE))) {
$scriptName = "Trackmania/TM_" ;
@ -1304,7 +1305,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
$maplist = 'MatchSettings' . DIRECTORY_SEPARATOR . $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_POST_MATCH_MAPLIST);
if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {
$this->maniaControl->getClient()->loadMatchSettings($maplist);
} else {
} else if ($this->currentmap !== null) {
if ($this->currentmap->mapType == "TrackMania\TM_Race") {
$scriptname = "Trackmania/TM_TimeAttack_Online.Script.txt" ;
} else if ($this->currentmap->mapType == "TrackMania\TM_Royal") {
@ -1414,7 +1415,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
$maplist = 'MatchSettings' . DIRECTORY_SEPARATOR . $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_POST_MATCH_MAPLIST);
if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {
$this->maniaControl->getClient()->loadMatchSettings($maplist);
} else {
} else if ($this->currentmap !== null) {
if ($this->currentmap->mapType == "TrackMania\TM_Race") {
$scriptname = "Trackmania/TM_TimeAttack_Online.Script.txt" ;
} else if ($this->currentmap->mapType == "TrackMania\TM_Royal") {