diff --git a/core/Callbacks/Structures/TrackMania/OnRespawnStructure.php b/core/Callbacks/Structures/TrackMania/OnRespawnStructure.php index 96070671..b4c9b8d4 100644 --- a/core/Callbacks/Structures/TrackMania/OnRespawnStructure.php +++ b/core/Callbacks/Structures/TrackMania/OnRespawnStructure.php @@ -40,11 +40,11 @@ class OnRespawnStructure extends BasePlayerTimeStructure { $this->numberOfRespawns = (int) $jsonObj->nbrespawns; $this->raceTime = (int) $jsonObj->racetime; $this->lapTime = (int) $jsonObj->laptime; - $this->stuntsScore = $jsonObj->stuntsscore; + if (isset($jsonObj->stuntsscore)) $this->stuntsScore = $jsonObj->stuntsscore; $this->checkPointInRace = (int) $jsonObj->checkpointinrace; $this->checkPointInLap = (int) $jsonObj->checkpointinlap; $this->speed = $jsonObj->speed; - $this->distance = $jsonObj->distance; + if (isset($jsonObj->distance)) $this->distance = $jsonObj->distance; } /** diff --git a/core/Manialinks/ElementBuilder.php b/core/Manialinks/ElementBuilder.php index af84843b..f7999f5e 100644 --- a/core/Manialinks/ElementBuilder.php +++ b/core/Manialinks/ElementBuilder.php @@ -48,6 +48,8 @@ class ElementBuilder { /** * Private Properties */ + /** @var ManiaControl $maniaControl */ + private $maniaControl = null; /** @var array $actions */ private $actions = array(); /** @var array $columns */ @@ -173,6 +175,7 @@ class ElementBuilder { * @param float $textSize */ public function buildKarmaGauge($map, $width, $height, $textSize = 0.9) { + /** @var \MCTeam\KarmaPlugin $karmaPlugin */ $karmaPlugin = $this->maniaControl->getPluginManager()->getPlugin(self::DEFAULT_KARMA_PLUGIN); if (!$karmaPlugin) { return null; diff --git a/core/Maps/Map.php b/core/Maps/Map.php index 2022290f..176e55f7 100644 --- a/core/Maps/Map.php +++ b/core/Maps/Map.php @@ -88,9 +88,13 @@ class Map implements Dumpable, UsageInformationAble { $this->nbCheckpoints = $mpMap->nbCheckpoints; $this->nbLaps = $mpMap->nbLaps; + $this->authorNick = $mpMap->authorNickname; + $player = $this->maniaControl->getPlayerManager()->getPlayer($this->authorLogin); if ($player) { $this->authorNick = $player->nickname; + } else if ($mpMap->authorNickname !== "") { + $this->authorNick = $mpMap->authorNickname; } else { $this->authorNick = $this->authorLogin; } diff --git a/core/Players/PlayerDetailed.php b/core/Players/PlayerDetailed.php index 9a4b1938..90c15638 100644 --- a/core/Players/PlayerDetailed.php +++ b/core/Players/PlayerDetailed.php @@ -32,6 +32,14 @@ class PlayerDetailed { /** @var ManiaControl $maniaControl */ private $maniaControl = null; + private $width; + private $height; + + private $contentY; + private $infoColWidth; + private $margin; + private $padding; + /** * Create a new Player Detailed Instance * @@ -43,8 +51,6 @@ class PlayerDetailed { // Settings $this->width = $this->maniaControl->getManialinkManager()->getStyleManager()->getListWidgetsWidth(); $this->height = $this->maniaControl->getManialinkManager()->getStyleManager()->getListWidgetsHeight(); - $this->quadStyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultMainWindowStyle(); - $this->quadSubstyle = $this->maniaControl->getManialinkManager()->getStyleManager()->getDefaultMainWindowSubStyle(); //Class variables $this->contentY = $this->height / 2 - 15; diff --git a/core/Settings/Setting.php b/core/Settings/Setting.php index b03b34b1..9c6dee23 100644 --- a/core/Settings/Setting.php +++ b/core/Settings/Setting.php @@ -42,6 +42,7 @@ class Setting implements UsageInformationAble { public $fetchTime = null; public $description = null; public $priority = null; + public $changed = null; /** * Construct a new setting instance diff --git a/libs/Maniaplanet/DedicatedServer/Structures/Map.php b/libs/Maniaplanet/DedicatedServer/Structures/Map.php index 0957af60..27f91483 100755 --- a/libs/Maniaplanet/DedicatedServer/Structures/Map.php +++ b/libs/Maniaplanet/DedicatedServer/Structures/Map.php @@ -18,6 +18,8 @@ class Map extends AbstractStructure /** var string */ public $author; /** var string */ + public $authorNickname; + /** var string */ public $environnement; /** var string */ public $mood; diff --git a/libs/Maniaplanet/DedicatedServer/Structures/PlayerInfo.php b/libs/Maniaplanet/DedicatedServer/Structures/PlayerInfo.php index 983920e9..acc6c6f9 100755 --- a/libs/Maniaplanet/DedicatedServer/Structures/PlayerInfo.php +++ b/libs/Maniaplanet/DedicatedServer/Structures/PlayerInfo.php @@ -20,6 +20,8 @@ class PlayerInfo extends Player /** @var bool */ public $isInOfficialMode; /** @var int */ + public $ladderScore; + /** @var int */ public $ladderRanking; /** @var int */ public $spectatorStatus; diff --git a/libs/Maniaplanet/DedicatedServer/Structures/ServerOptions.php b/libs/Maniaplanet/DedicatedServer/Structures/ServerOptions.php index fe78f770..f726d966 100755 --- a/libs/Maniaplanet/DedicatedServer/Structures/ServerOptions.php +++ b/libs/Maniaplanet/DedicatedServer/Structures/ServerOptions.php @@ -7,6 +7,7 @@ namespace Maniaplanet\DedicatedServer\Structures; +#[\AllowDynamicProperties] // Allow Dynamic Properties for php 8.2 and above class ServerOptions extends AbstractStructure { /** @var string */ @@ -17,6 +18,8 @@ class ServerOptions extends AbstractStructure public $password; /** @var string */ public $passwordForSpectator; + /** @var string */ + public $nextCallVoteTimeOut; /** @var float */ public $callVoteRatio;