From 897169cf61d27e702f5642cb7f7cd6366b923f14 Mon Sep 17 00:00:00 2001 From: Thijs Stobbelaar Date: Wed, 27 Sep 2023 15:30:47 +0200 Subject: [PATCH 1/2] map names --- latestmatches.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/latestmatches.php b/latestmatches.php index f4d2bf5..c94dac8 100644 --- a/latestmatches.php +++ b/latestmatches.php @@ -35,7 +35,19 @@ error_reporting(E_ALL); echo "
"; $selected_player = $_POST['selected_player'] ?? $players_matches[0]['playername']; - + $mapNames = array( + "Baltic_Main" => "Erangel (Remastered)", + "Chimera_Main" => "Paramo", + "Desert_Main" => "Miramar", + "DihorOtok_Main" => "Vikendi", + "Erangel_Main" => "Erangel", + "Heaven_Main" => "Haven", + "Kiki_Main" => "Deston", + "Range_Main" => "Camp Jackal", + "Savage_Main" => "Sanhok", + "Summerland_Main" => "Karakin", + "Tiger_Main" => "Taego" + ); // Display the player's match stats foreach ($players_matches as $player_data) { if ($player_data['playername'] === $selected_player) { @@ -49,7 +61,7 @@ error_reporting(E_ALL); $matchType = $match['matchType']; $gameMode = $match['gameMode']; - $mapName = $match['mapName']; + $mapName = isset($mapNames[$match['mapName']]) ? $mapNames[$match['mapName']] : $match['mapName']; $kills = $match['stats']['kills']; $damage = $match['stats']['damageDealt']; $timeSurvived = $match['stats']['timeSurvived']; -- 2.49.1 From 2b8b9f92afb051ab75094eb5e2a436a16495bf90 Mon Sep 17 00:00:00 2001 From: Thijs Stobbelaar Date: Wed, 27 Sep 2023 15:32:03 +0200 Subject: [PATCH 2/2] erengel --- discord/report_new_matches.ps1 | 2 +- latestmatches.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/report_new_matches.ps1 b/discord/report_new_matches.ps1 index bce9eb8..d8a1396 100644 --- a/discord/report_new_matches.ps1 +++ b/discord/report_new_matches.ps1 @@ -48,7 +48,7 @@ function send-discord { } $map_map = @{ - "Baltic_Main" = "Erangel (Remastered)" + "Baltic_Main" = "Erangel" "Chimera_Main" = "Paramo" "Desert_Main" = "Miramar" "DihorOtok_Main" = "Vikendi" diff --git a/latestmatches.php b/latestmatches.php index c94dac8..a151365 100644 --- a/latestmatches.php +++ b/latestmatches.php @@ -36,7 +36,7 @@ error_reporting(E_ALL); $selected_player = $_POST['selected_player'] ?? $players_matches[0]['playername']; $mapNames = array( - "Baltic_Main" => "Erangel (Remastered)", + "Baltic_Main" => "Erangel", "Chimera_Main" => "Paramo", "Desert_Main" => "Miramar", "DihorOtok_Main" => "Vikendi", -- 2.49.1