Compare commits
5 Commits
803b58eb08
...
master
Author | SHA1 | Date | |
---|---|---|---|
787964a8ed
|
|||
af10e1678a
|
|||
33cc10b6c1
|
|||
5d2c6c4627
|
|||
36280769bb
|
@ -26,7 +26,7 @@ class SmallTextOverlay implements TimerListener, CallbackListener, Plugin {
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 195;
|
const PLUGIN_ID = 195;
|
||||||
const PLUGIN_VERSION = 1.1;
|
const PLUGIN_VERSION = 1.4;
|
||||||
const PLUGIN_NAME = 'SmallTextOverlay';
|
const PLUGIN_NAME = 'SmallTextOverlay';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ use ManiaControl\Settings\Setting;
|
|||||||
use ManiaControl\Settings\SettingManager;
|
use ManiaControl\Settings\SettingManager;
|
||||||
use ManiaControl\Callbacks\TimerListener;
|
use ManiaControl\Callbacks\TimerListener;
|
||||||
use ManiaControl\Callbacks\Callbacks;
|
use ManiaControl\Callbacks\Callbacks;
|
||||||
|
use ManiaControl\Logger;
|
||||||
use ManiaControl\Players\Player;
|
use ManiaControl\Players\Player;
|
||||||
use ManiaControl\Players\PlayerManager;
|
use ManiaControl\Players\PlayerManager;
|
||||||
|
|
||||||
@ -31,10 +32,12 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 174;
|
const PLUGIN_ID = 174;
|
||||||
const PLUGIN_VERSION = 2.1;
|
const PLUGIN_VERSION = 2.3;
|
||||||
const PLUGIN_NAME = 'MatchManager Admin UI';
|
const PLUGIN_NAME = 'MatchManager Admin UI';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
const LOG_PREFIX = '[MatchManagerAdminUI] ';
|
||||||
|
|
||||||
const MLID_ADMINUI_SIDEMENU = 'Matchmanager.AdminUI';
|
const MLID_ADMINUI_SIDEMENU = 'Matchmanager.AdminUI';
|
||||||
|
|
||||||
const SETTING_POSX = 'Position X of the plugin';
|
const SETTING_POSX = 'Position X of the plugin';
|
||||||
@ -123,6 +126,23 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
|
|||||||
public function unload() {
|
public function unload() {
|
||||||
$this->maniaControl->getManialinkManager()->hideManialink(self::MLID_ADMINUI_SIDEMENU);
|
$this->maniaControl->getManialinkManager()->hideManialink(self::MLID_ADMINUI_SIDEMENU);
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Custom log function to add prefix
|
||||||
|
*
|
||||||
|
* @param mixed $message
|
||||||
|
*/
|
||||||
|
private function log(mixed $message) {
|
||||||
|
Logger::log(self::LOG_PREFIX . $message);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Custom logError function to add prefix
|
||||||
|
*
|
||||||
|
* @param mixed $message
|
||||||
|
*/
|
||||||
|
private function logError(mixed $message) {
|
||||||
|
Logger::logError(self::LOG_PREFIX . $message);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* afterPluginInit
|
* afterPluginInit
|
||||||
@ -178,6 +198,8 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
|
|||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function generateManialink() {
|
public function generateManialink() {
|
||||||
|
$this->log("Generating interface with ". count($this->menuItems) . " items");
|
||||||
|
|
||||||
$quadStyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultQuadStyle();
|
$quadStyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultQuadStyle();
|
||||||
$quadSubstyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultQuadSubstyle();
|
$quadSubstyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultQuadSubstyle();
|
||||||
$itemMarginFactorX = 1.3;
|
$itemMarginFactorX = 1.3;
|
||||||
@ -272,7 +294,7 @@ class MatchManagerAdminUI implements CallbackListener, ManialinkPageAnswerListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MatchManagerAdminUI_MenuItem {
|
class MatchManagerAdminUI_MenuItem {
|
||||||
private string $actionId ;
|
private string $actionId;
|
||||||
private int $order = 100;
|
private int $order = 100;
|
||||||
private string $description = '';
|
private string $description = '';
|
||||||
private string $text = '';
|
private string $text = '';
|
||||||
|
@ -28,7 +28,7 @@ class MatchManagerAutomaticLauncher implements CallbackListener, TimerListener,
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 172;
|
const PLUGIN_ID = 172;
|
||||||
const PLUGIN_VERSION = 1.1;
|
const PLUGIN_VERSION = 1.2;
|
||||||
const PLUGIN_NAME = 'MatchManager Automatic Launcher';
|
const PLUGIN_NAME = 'MatchManager Automatic Launcher';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
|
|||||||
* MARK: Constants
|
* MARK: Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 152;
|
const PLUGIN_ID = 152;
|
||||||
const PLUGIN_VERSION = 5.8;
|
const PLUGIN_VERSION = 5.9;
|
||||||
const PLUGIN_NAME = 'MatchManager Core';
|
const PLUGIN_NAME = 'MatchManager Core';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
@ -1198,6 +1198,7 @@ class MatchManagerCore implements CallbackListener, CommandListener, TimerListen
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Define Gamemode
|
// Define Gamemode
|
||||||
|
$scriptName = '-';
|
||||||
if ($this->currentsettingmode != 'All from file') {
|
if ($this->currentsettingmode != 'All from file') {
|
||||||
if (empty($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_CUSTOM_GAMEMODE))) {
|
if (empty($this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_CUSTOM_GAMEMODE))) {
|
||||||
$scriptName = "Trackmania/TM_" ;
|
$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);
|
$maplist = 'MatchSettings' . DIRECTORY_SEPARATOR . $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_POST_MATCH_MAPLIST);
|
||||||
if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {
|
if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {
|
||||||
$this->maniaControl->getClient()->loadMatchSettings($maplist);
|
$this->maniaControl->getClient()->loadMatchSettings($maplist);
|
||||||
} else {
|
} else if ($this->currentmap !== null) {
|
||||||
if ($this->currentmap->mapType == "TrackMania\TM_Race") {
|
if ($this->currentmap->mapType == "TrackMania\TM_Race") {
|
||||||
$scriptname = "Trackmania/TM_TimeAttack_Online.Script.txt" ;
|
$scriptname = "Trackmania/TM_TimeAttack_Online.Script.txt" ;
|
||||||
} else if ($this->currentmap->mapType == "TrackMania\TM_Royal") {
|
} 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);
|
$maplist = 'MatchSettings' . DIRECTORY_SEPARATOR . $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MATCH_POST_MATCH_MAPLIST);
|
||||||
if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {
|
if (is_file($this->maniaControl->getServer()->getDirectory()->getMapsFolder() . $maplist)) {
|
||||||
$this->maniaControl->getClient()->loadMatchSettings($maplist);
|
$this->maniaControl->getClient()->loadMatchSettings($maplist);
|
||||||
} else {
|
} else if ($this->currentmap !== null) {
|
||||||
if ($this->currentmap->mapType == "TrackMania\TM_Race") {
|
if ($this->currentmap->mapType == "TrackMania\TM_Race") {
|
||||||
$scriptname = "Trackmania/TM_TimeAttack_Online.Script.txt" ;
|
$scriptname = "Trackmania/TM_TimeAttack_Online.Script.txt" ;
|
||||||
} else if ($this->currentmap->mapType == "TrackMania\TM_Royal") {
|
} else if ($this->currentmap->mapType == "TrackMania\TM_Royal") {
|
||||||
|
@ -34,7 +34,7 @@ class MatchManagerECircuitMania implements CallbackListener, ManialinkPageAnswer
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 213;
|
const PLUGIN_ID = 213;
|
||||||
const PLUGIN_VERSION = 1.0;
|
const PLUGIN_VERSION = 1.1;
|
||||||
const PLUGIN_NAME = 'MatchManager eCircuitMania';
|
const PLUGIN_NAME = 'MatchManager eCircuitMania';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ class MatchManagerGSheet implements CallbackListener, TimerListener, CommandLis
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 156;
|
const PLUGIN_ID = 156;
|
||||||
const PLUGIN_VERSION = 2.3;
|
const PLUGIN_VERSION = 2.4;
|
||||||
const PLUGIN_NAME = 'MatchManager GSheet';
|
const PLUGIN_NAME = 'MatchManager GSheet';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ class MatchManagerMultipleConfigManager implements ManialinkPageAnswerListener,
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 171;
|
const PLUGIN_ID = 171;
|
||||||
const PLUGIN_VERSION = 1.6;
|
const PLUGIN_VERSION = 1.7;
|
||||||
const PLUGIN_NAME = 'MatchManager Multiple Config Manager';
|
const PLUGIN_NAME = 'MatchManager Multiple Config Manager';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class MatchManagerPlayersPause implements ManialinkPageAnswerListener, CommandLi
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 159;
|
const PLUGIN_ID = 159;
|
||||||
const PLUGIN_VERSION = 1.5;
|
const PLUGIN_VERSION = 1.6;
|
||||||
const PLUGIN_NAME = 'MatchManager Players Pause';
|
const PLUGIN_NAME = 'MatchManager Players Pause';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class MatchManagerReadyButton implements ManialinkPageAnswerListener, CommandLis
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 158;
|
const PLUGIN_ID = 158;
|
||||||
const PLUGIN_VERSION = 1.5;
|
const PLUGIN_VERSION = 1.6;
|
||||||
const PLUGIN_NAME = 'MatchManager Ready Button';
|
const PLUGIN_NAME = 'MatchManager Ready Button';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ class MatchManagerTMWTDuoIntegration implements CallbackListener, ManialinkPageA
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 211;
|
const PLUGIN_ID = 211;
|
||||||
const PLUGIN_VERSION = 1.1;
|
const PLUGIN_VERSION = 1.2;
|
||||||
const PLUGIN_NAME = 'MatchManager TMWT Duo Integration';
|
const PLUGIN_NAME = 'MatchManager TMWT Duo Integration';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class MatchManagerWidget implements ManialinkPageAnswerListener, CallbackListene
|
|||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const PLUGIN_ID = 153;
|
const PLUGIN_ID = 153;
|
||||||
const PLUGIN_VERSION = 1.8;
|
const PLUGIN_VERSION = 1.9;
|
||||||
const PLUGIN_NAME = 'MatchManager Widget';
|
const PLUGIN_NAME = 'MatchManager Widget';
|
||||||
const PLUGIN_AUTHOR = 'Beu';
|
const PLUGIN_AUTHOR = 'Beu';
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user