diff --git a/ReplayBrowser/Pages/Shared/MainLayout.razor b/ReplayBrowser/Pages/Shared/MainLayout.razor index 59251ed..dea3ef0 100644 --- a/ReplayBrowser/Pages/Shared/MainLayout.razor +++ b/ReplayBrowser/Pages/Shared/MainLayout.razor @@ -191,12 +191,26 @@ return 1; } return 0; - }); + }); + + data.roundEndPlayers.forEach(player => { + let job = "Unknown"; + if (player.jobPrototypes.length > 0) { + job = player.jobPrototypes[0]; + } + let playerText = `${player.playerOocName} was ${player.playerIcName} playing role of ${job}`; + if (player.antagPrototypes.length > 0) { + playerText = `${player.playerOocName} was ${player.playerIcName} playing role of ${job}`; + } + // Need to show the guid as well + playerText += `
${player.playerGuid}`; + playerList += playerText + "
"; + }); + players.innerHTML = playerList; } if (!data.roundEndText || data.roundEndText.trim() == "") { endTextElement.innerHTML = "No round end text available."; - return } else { const colorTagPattern = new RegExp("\\[color=(.*?)\\](.*?)\\[/color\\]", "g"); const colorTagReplacement = "$2"; @@ -209,21 +223,6 @@ .replaceAll("\n", "
") .replaceAll(boldTagPattern, boldTagReplacement); } - - data.roundEndPlayers.forEach(player => { - let job = "Unknown"; - if (player.jobPrototypes.length > 0) { - job = player.jobPrototypes[0]; - } - let playerText = `${player.playerOocName} was ${player.playerIcName} playing role of ${job}`; - if (player.antagPrototypes.length > 0) { - playerText = `${player.playerOocName} was ${player.playerIcName} playing role of ${job}`; - } - // Need to show the guid as well - playerText += `
${player.playerGuid}`; - playerList += playerText + "
"; - }); - players.innerHTML = playerList; } \ No newline at end of file