diff --git a/core/Classes/ChatMessage.php b/core/Classes/ChatMessage.php index 5c51637b..70f22239 100644 --- a/core/Classes/ChatMessage.php +++ b/core/Classes/ChatMessage.php @@ -146,13 +146,13 @@ public function getMessage(): string $parts .= $part; } - $message = sprintf('$s$%s$<$fff%s$> $s%s', $this->color, $this->icon, $parts); + $message = ($this->icon ? $this->icon . ' ' : '') . sprintf('$%s%s', $this->color, $parts); if (substr($message, -1) != '.') { $message .= '.'; } - return $message; + return '$z$s' . preg_replace('/\$s/i', '', $message); } /** diff --git a/core/Classes/Utility.php b/core/Classes/Utility.php index af874f2b..21aea6a5 100644 --- a/core/Classes/Utility.php +++ b/core/Classes/Utility.php @@ -111,7 +111,6 @@ public static function sendRecordsChunk(string $table, string $configId, string $fill = config($configId . '.rows', 16); if ($count <= $fill) { - dump("default"); $recordsJson = DB::table($table) ->selectRaw('Rank as rank, `' . $table . '`.Score as score, NickName as name, Login as login, "[]" as cps') ->leftJoin('players', 'players.id', '=', $table . '.Player') diff --git a/core/Controllers/ChatController.php b/core/Controllers/ChatController.php index c6efa08d..ae3628ac 100644 --- a/core/Controllers/ChatController.php +++ b/core/Controllers/ChatController.php @@ -145,7 +145,9 @@ public static function playerChat(Player $player, $text) { Log::write('[' . $player . '] ' . $text . '', true); - $name = $player->NickName; + $name = preg_replace('/\$s/i', '', $player->NickName); + $text = preg_replace('/\$s/i', '', $text); + if ($player->isSpectator()) { $name = '$<$eee$> $fff' . $name; } @@ -153,7 +155,7 @@ public static function playerChat(Player $player, $text) $chatColor = config('theme.chat.text'); $groupIcon = $player->group->chat_prefix ?? ''; $groupColor = $player->group->color ?? $chatColor; - $chatText = sprintf('$<$%s%s [$<%s$>]$> $%s%s', $groupColor, $groupIcon, $name, $chatColor, $text); + $chatText = sprintf('$z$s$<$%s%s [$<%s$>]$> $%s%s', $groupColor, $groupIcon, secondary($name), $chatColor, $text); Server::ChatSendServerMessage($chatText); } diff --git a/core/Modules/Dedimania/Dedimania.php b/core/Modules/Dedimania/Dedimania.php index a292dd4b..2d0bb041 100644 --- a/core/Modules/Dedimania/Dedimania.php +++ b/core/Modules/Dedimania/Dedimania.php @@ -154,6 +154,9 @@ public static function sendUpdatedDedis(Player $player = null) Utility::sendRecordsChunk(self::TABLE, 'locals', 'LocalRecords.update', $player); } + /** + * @param Map $map + */ public static function beginMap(Map $map) { self::getChallengeRecords($map, ModeController::isTimeAttack()); diff --git a/core/Modules/Statistics/Statistics.php b/core/Modules/Statistics/Statistics.php index c56b56ac..51c8e9eb 100644 --- a/core/Modules/Statistics/Statistics.php +++ b/core/Modules/Statistics/Statistics.php @@ -77,8 +77,10 @@ public static function showScores(Collection $players) //Top Ranks $statCollection->push(new StatisticWidget('Rank', " Top Ranks", '', '.', null, true, false)); - //Top Donators - $statCollection->push(new StatisticWidget('Donations', " Top Donators", '', ' Planets')); + //Top Planets-Donators + if(isManiaPlanet()){ + $statCollection->push(new StatisticWidget('Donations', " Top Donators", '', ' Planets')); + } //Round average if (self::$scores->count() > 0) { diff --git a/core/Modules/Statistics/Templates/widgets.latte.xml b/core/Modules/Statistics/Templates/widgets.latte.xml index 9e306929..12d8055d 100644 --- a/core/Modules/Statistics/Templates/widgets.latte.xml +++ b/core/Modules/Statistics/Templates/widgets.latte.xml @@ -7,7 +7,7 @@