Adds a button to toggle between the summary charts of every individual player and the ones of the teams.
Details
- Reviewers
- None
- Commits
- rP23845: Show summary graphs for teams
- Trac Tickets
- #4552
Agree on the look, the GUI, the functionality and the code.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 7444 Build 12115: Vulcan Build Jenkins Build 12114: arc lint + arc unit
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 250| 250| chartLegend.caption = g_ShowTeamCharts ? | 251| 251| g_Teams.filter(el => el !== null).map( | 252| 252| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 253| |- g_GameData.sim.playerStates[player].name | | 253|+ g_GameData.sim.playerStates[player].name | 254| 254| ).join(translateWithContext("Player listing", ", ")) | 255| 255| ).join(" ") : | 256| 256| g_GameData.sim.playerStates.slice(1).map( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 251| 251| g_Teams.filter(el => el !== null).map( | 252| 252| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 253| 253| g_GameData.sim.playerStates[player].name | 254| |- ).join(translateWithContext("Player listing", ", ")) | | 254|+ ).join(translateWithContext("Player listing", ", ")) | 255| 255| ).join(" ") : | 256| 256| g_GameData.sim.playerStates.slice(1).map( | 257| 257| (state, index) => coloredText("■", playerColors[index]) + " " + state.name | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 360| 360| | 361| 361| let series = []; | 362| 362| if (g_ShowTeamCharts) | 363| |- { | | 363|+ | 364| 364| for (let team in g_Teams) | 365| 365| { | 366| 366| let data = []; | 374| 374| } | 375| 375| series.push(data); | 376| 376| } | 377| |- } | | 377|+ | 378| 378| else | 379| 379| { | 380| 380| for (let j = 1; j <= g_PlayerCount; ++j) | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'else'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 376| 376| } | 377| 377| } | 378| 378| else | 379| |- { | | 379|+ | 380| 380| for (let j = 1; j <= g_PlayerCount; ++j) | 381| 381| { | 382| 382| let playerState = g_GameData.sim.playerStates[j]; | 390| 390| } | 391| 391| series.push(data); | 392| 392| } | 393| |- } | | 393|+ | 394| 394| | 395| 395| chart.series = series; | 396| 396| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 534| 534| Engine.GetGUIObjectByName("summaryText").caption = | 535| 535| g_GameData.gui.isInGame ? | 536| 536| translate("Current Scores") : | 537| |- g_GameData.gui.isReplay ? | | 537|+ g_GameData.gui.isReplay ? | 538| 538| translate("Scores at the end of the game.") : | 539| 539| g_GameData.gui.disconnected ? | 540| 540| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 535| 535| g_GameData.gui.isInGame ? | 536| 536| translate("Current Scores") : | 537| 537| g_GameData.gui.isReplay ? | 538| |- translate("Scores at the end of the game.") : | | 538|+ translate("Scores at the end of the game.") : | 539| 539| g_GameData.gui.disconnected ? | 540| 540| translate("You have been disconnected.") : | 541| 541| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 536| 536| translate("Current Scores") : | 537| 537| g_GameData.gui.isReplay ? | 538| 538| translate("Scores at the end of the game.") : | 539| |- g_GameData.gui.disconnected ? | | 539|+ g_GameData.gui.disconnected ? | 540| 540| translate("You have been disconnected.") : | 541| 541| !assignedState ? | 542| 542| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 537| 537| g_GameData.gui.isReplay ? | 538| 538| translate("Scores at the end of the game.") : | 539| 539| g_GameData.gui.disconnected ? | 540| |- translate("You have been disconnected.") : | | 540|+ translate("You have been disconnected.") : | 541| 541| !assignedState ? | 542| 542| translate("You have left the game.") : | 543| 543| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 538| 538| translate("Scores at the end of the game.") : | 539| 539| g_GameData.gui.disconnected ? | 540| 540| translate("You have been disconnected.") : | 541| |- !assignedState ? | | 541|+ !assignedState ? | 542| 542| translate("You have left the game.") : | 543| 543| assignedState.state == "won" ? | 544| 544| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 539| 539| g_GameData.gui.disconnected ? | 540| 540| translate("You have been disconnected.") : | 541| 541| !assignedState ? | 542| |- translate("You have left the game.") : | | 542|+ translate("You have left the game.") : | 543| 543| assignedState.state == "won" ? | 544| 544| translate("You have won the battle!") : | 545| 545| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 540| 540| translate("You have been disconnected.") : | 541| 541| !assignedState ? | 542| 542| translate("You have left the game.") : | 543| |- assignedState.state == "won" ? | | 543|+ assignedState.state == "won" ? | 544| 544| translate("You have won the battle!") : | 545| 545| assignedState.state == "defeated" ? | 546| 546| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 541| 541| !assignedState ? | 542| 542| translate("You have left the game.") : | 543| 543| assignedState.state == "won" ? | 544| |- translate("You have won the battle!") : | | 544|+ translate("You have won the battle!") : | 545| 545| assignedState.state == "defeated" ? | 546| 546| translate("You have been defeated…") : | 547| 547| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 542| 542| translate("You have left the game.") : | 543| 543| assignedState.state == "won" ? | 544| 544| translate("You have won the battle!") : | 545| |- assignedState.state == "defeated" ? | | 545|+ assignedState.state == "defeated" ? | 546| 546| translate("You have been defeated…") : | 547| 547| translate("You have abandoned the game."); | 548| 548| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 543| 543| assignedState.state == "won" ? | 544| 544| translate("You have won the battle!") : | 545| 545| assignedState.state == "defeated" ? | 546| |- translate("You have been defeated…") : | | 546|+ translate("You have been defeated…") : | 547| 547| translate("You have abandoned the game."); | 548| 548| | 549| 549| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 544| 544| translate("You have won the battle!") : | 545| 545| assignedState.state == "defeated" ? | 546| 546| translate("You have been defeated…") : | 547| |- translate("You have abandoned the game."); | | 547|+ translate("You have abandoned the game."); | 548| 548| | 549| 549| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 550| 550| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 549| 549| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 550| 550| translate("Game time elapsed: %(time)s"), { | 551| 551| "time": timeToString(g_GameData.sim.timeElapsed) | 552| |- }); | | 552|+ }); | 553| 553| | 554| 554| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 555| 555| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1370/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 250| 250| chartLegend.caption = g_ShowTeamCharts ? | 251| 251| g_Teams.filter(el => el !== null).map( | 252| 252| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 253| |- g_GameData.sim.playerStates[player].name | | 253|+ g_GameData.sim.playerStates[player].name | 254| 254| ).join(translateWithContext("Player listing", ", ")) | 255| 255| ).join(" ") : | 256| 256| g_GameData.sim.playerStates.slice(1).map( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 251| 251| g_Teams.filter(el => el !== null).map( | 252| 252| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 253| 253| g_GameData.sim.playerStates[player].name | 254| |- ).join(translateWithContext("Player listing", ", ")) | | 254|+ ).join(translateWithContext("Player listing", ", ")) | 255| 255| ).join(" ") : | 256| 256| g_GameData.sim.playerStates.slice(1).map( | 257| 257| (state, index) => coloredText("■", playerColors[index]) + " " + state.name | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'if' condition. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 361| 361| | 362| 362| let series = []; | 363| 363| if (g_ShowTeamCharts) | 364| |- { | | 364|+ | 365| 365| for (let team in g_Teams) | 366| 366| { | 367| 367| let data = []; | 375| 375| } | 376| 376| series.push(data); | 377| 377| } | 378| |- } | | 378|+ | 379| 379| else | 380| 380| { | 381| 381| for (let j = 1; j <= g_PlayerCount; ++j) | | [NORMAL] ESLintBear (curly): | | Unnecessary { after 'else'. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 377| 377| } | 378| 378| } | 379| 379| else | 380| |- { | | 380|+ | 381| 381| for (let j = 1; j <= g_PlayerCount; ++j) | 382| 382| { | 383| 383| let playerState = g_GameData.sim.playerStates[j]; | 391| 391| } | 392| 392| series.push(data); | 393| 393| } | 394| |- } | | 394|+ | 395| 395| | 396| 396| chart.series = series; | 397| 397| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 535| 535| Engine.GetGUIObjectByName("summaryText").caption = | 536| 536| g_GameData.gui.isInGame ? | 537| 537| translate("Current Scores") : | 538| |- g_GameData.gui.isReplay ? | | 538|+ g_GameData.gui.isReplay ? | 539| 539| translate("Scores at the end of the game.") : | 540| 540| g_GameData.gui.disconnected ? | 541| 541| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 536| 536| g_GameData.gui.isInGame ? | 537| 537| translate("Current Scores") : | 538| 538| g_GameData.gui.isReplay ? | 539| |- translate("Scores at the end of the game.") : | | 539|+ translate("Scores at the end of the game.") : | 540| 540| g_GameData.gui.disconnected ? | 541| 541| translate("You have been disconnected.") : | 542| 542| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 537| 537| translate("Current Scores") : | 538| 538| g_GameData.gui.isReplay ? | 539| 539| translate("Scores at the end of the game.") : | 540| |- g_GameData.gui.disconnected ? | | 540|+ g_GameData.gui.disconnected ? | 541| 541| translate("You have been disconnected.") : | 542| 542| !assignedState ? | 543| 543| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 538| 538| g_GameData.gui.isReplay ? | 539| 539| translate("Scores at the end of the game.") : | 540| 540| g_GameData.gui.disconnected ? | 541| |- translate("You have been disconnected.") : | | 541|+ translate("You have been disconnected.") : | 542| 542| !assignedState ? | 543| 543| translate("You have left the game.") : | 544| 544| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 539| 539| translate("Scores at the end of the game.") : | 540| 540| g_GameData.gui.disconnected ? | 541| 541| translate("You have been disconnected.") : | 542| |- !assignedState ? | | 542|+ !assignedState ? | 543| 543| translate("You have left the game.") : | 544| 544| assignedState.state == "won" ? | 545| 545| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 540| 540| g_GameData.gui.disconnected ? | 541| 541| translate("You have been disconnected.") : | 542| 542| !assignedState ? | 543| |- translate("You have left the game.") : | | 543|+ translate("You have left the game.") : | 544| 544| assignedState.state == "won" ? | 545| 545| translate("You have won the battle!") : | 546| 546| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 541| 541| translate("You have been disconnected.") : | 542| 542| !assignedState ? | 543| 543| translate("You have left the game.") : | 544| |- assignedState.state == "won" ? | | 544|+ assignedState.state == "won" ? | 545| 545| translate("You have won the battle!") : | 546| 546| assignedState.state == "defeated" ? | 547| 547| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 542| 542| !assignedState ? | 543| 543| translate("You have left the game.") : | 544| 544| assignedState.state == "won" ? | 545| |- translate("You have won the battle!") : | | 545|+ translate("You have won the battle!") : | 546| 546| assignedState.state == "defeated" ? | 547| 547| translate("You have been defeated…") : | 548| 548| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 543| 543| translate("You have left the game.") : | 544| 544| assignedState.state == "won" ? | 545| 545| translate("You have won the battle!") : | 546| |- assignedState.state == "defeated" ? | | 546|+ assignedState.state == "defeated" ? | 547| 547| translate("You have been defeated…") : | 548| 548| translate("You have abandoned the game."); | 549| 549| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 544| 544| assignedState.state == "won" ? | 545| 545| translate("You have won the battle!") : | 546| 546| assignedState.state == "defeated" ? | 547| |- translate("You have been defeated…") : | | 547|+ translate("You have been defeated…") : | 548| 548| translate("You have abandoned the game."); | 549| 549| | 550| 550| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 545| 545| translate("You have won the battle!") : | 546| 546| assignedState.state == "defeated" ? | 547| 547| translate("You have been defeated…") : | 548| |- translate("You have abandoned the game."); | | 548|+ translate("You have abandoned the game."); | 549| 549| | 550| 550| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 551| 551| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 550| 550| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 551| 551| translate("Game time elapsed: %(time)s"), { | 552| 552| "time": timeToString(g_GameData.sim.timeElapsed) | 553| |- }); | | 553|+ }); | 554| 554| | 555| 555| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 556| 556| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1371/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 250| 250| chartLegend.caption = g_ShowTeamCharts ? | 251| 251| g_Teams.filter(el => el !== null).map( | 252| 252| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 253| |- g_GameData.sim.playerStates[player].name | | 253|+ g_GameData.sim.playerStates[player].name | 254| 254| ).join(translateWithContext("Player listing", ", ")) | 255| 255| ).join(" ") : | 256| 256| g_GameData.sim.playerStates.slice(1).map( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 251| 251| g_Teams.filter(el => el !== null).map( | 252| 252| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 253| 253| g_GameData.sim.playerStates[player].name | 254| |- ).join(translateWithContext("Player listing", ", ")) | | 254|+ ).join(translateWithContext("Player listing", ", ")) | 255| 255| ).join(" ") : | 256| 256| g_GameData.sim.playerStates.slice(1).map( | 257| 257| (state, index) => coloredText("■", playerColors[index]) + " " + state.name | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 531| 531| Engine.GetGUIObjectByName("summaryText").caption = | 532| 532| g_GameData.gui.isInGame ? | 533| 533| translate("Current Scores") : | 534| |- g_GameData.gui.isReplay ? | | 534|+ g_GameData.gui.isReplay ? | 535| 535| translate("Scores at the end of the game.") : | 536| 536| g_GameData.gui.disconnected ? | 537| 537| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 532| 532| g_GameData.gui.isInGame ? | 533| 533| translate("Current Scores") : | 534| 534| g_GameData.gui.isReplay ? | 535| |- translate("Scores at the end of the game.") : | | 535|+ translate("Scores at the end of the game.") : | 536| 536| g_GameData.gui.disconnected ? | 537| 537| translate("You have been disconnected.") : | 538| 538| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 533| 533| translate("Current Scores") : | 534| 534| g_GameData.gui.isReplay ? | 535| 535| translate("Scores at the end of the game.") : | 536| |- g_GameData.gui.disconnected ? | | 536|+ g_GameData.gui.disconnected ? | 537| 537| translate("You have been disconnected.") : | 538| 538| !assignedState ? | 539| 539| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 534| 534| g_GameData.gui.isReplay ? | 535| 535| translate("Scores at the end of the game.") : | 536| 536| g_GameData.gui.disconnected ? | 537| |- translate("You have been disconnected.") : | | 537|+ translate("You have been disconnected.") : | 538| 538| !assignedState ? | 539| 539| translate("You have left the game.") : | 540| 540| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 535| 535| translate("Scores at the end of the game.") : | 536| 536| g_GameData.gui.disconnected ? | 537| 537| translate("You have been disconnected.") : | 538| |- !assignedState ? | | 538|+ !assignedState ? | 539| 539| translate("You have left the game.") : | 540| 540| assignedState.state == "won" ? | 541| 541| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 536| 536| g_GameData.gui.disconnected ? | 537| 537| translate("You have been disconnected.") : | 538| 538| !assignedState ? | 539| |- translate("You have left the game.") : | | 539|+ translate("You have left the game.") : | 540| 540| assignedState.state == "won" ? | 541| 541| translate("You have won the battle!") : | 542| 542| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 537| 537| translate("You have been disconnected.") : | 538| 538| !assignedState ? | 539| 539| translate("You have left the game.") : | 540| |- assignedState.state == "won" ? | | 540|+ assignedState.state == "won" ? | 541| 541| translate("You have won the battle!") : | 542| 542| assignedState.state == "defeated" ? | 543| 543| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 538| 538| !assignedState ? | 539| 539| translate("You have left the game.") : | 540| 540| assignedState.state == "won" ? | 541| |- translate("You have won the battle!") : | | 541|+ translate("You have won the battle!") : | 542| 542| assignedState.state == "defeated" ? | 543| 543| translate("You have been defeated…") : | 544| 544| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 539| 539| translate("You have left the game.") : | 540| 540| assignedState.state == "won" ? | 541| 541| translate("You have won the battle!") : | 542| |- assignedState.state == "defeated" ? | | 542|+ assignedState.state == "defeated" ? | 543| 543| translate("You have been defeated…") : | 544| 544| translate("You have abandoned the game."); | 545| 545| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 540| 540| assignedState.state == "won" ? | 541| 541| translate("You have won the battle!") : | 542| 542| assignedState.state == "defeated" ? | 543| |- translate("You have been defeated…") : | | 543|+ translate("You have been defeated…") : | 544| 544| translate("You have abandoned the game."); | 545| 545| | 546| 546| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 541| 541| translate("You have won the battle!") : | 542| 542| assignedState.state == "defeated" ? | 543| 543| translate("You have been defeated…") : | 544| |- translate("You have abandoned the game."); | | 544|+ translate("You have abandoned the game."); | 545| 545| | 546| 546| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 547| 547| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 546| 546| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 547| 547| translate("Game time elapsed: %(time)s"), { | 548| 548| "time": timeToString(g_GameData.sim.timeElapsed) | 549| |- }); | | 549|+ }); | 550| 550| | 551| 551| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 552| 552| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1372/display/redirect
In the summary we only show anything regarding teams when teams are locked.
(And there is at least one team with more than one player)
player graphs:
team graphs:
(The team color is just the color of the first player of that team.)
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 259| 259| chartLegend.caption = g_ShowTeamCharts ? | 260| 260| g_Teams.filter(el => el !== null).map( | 261| 261| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 262| |- g_GameData.sim.playerStates[player].name | | 262|+ g_GameData.sim.playerStates[player].name | 263| 263| ).join(translateWithContext("Player listing", ", ")) | 264| 264| ).join(" ") : | 265| 265| g_GameData.sim.playerStates.slice(1).map( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 260| 260| g_Teams.filter(el => el !== null).map( | 261| 261| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 262| 262| g_GameData.sim.playerStates[player].name | 263| |- ).join(translateWithContext("Player listing", ", ")) | | 263|+ ).join(translateWithContext("Player listing", ", ")) | 264| 264| ).join(" ") : | 265| 265| g_GameData.sim.playerStates.slice(1).map( | 266| 266| (state, index) => coloredText("■", playerColors[index]) + " " + state.name | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 541| 541| Engine.GetGUIObjectByName("summaryText").caption = | 542| 542| g_GameData.gui.isInGame ? | 543| 543| translate("Current Scores") : | 544| |- g_GameData.gui.isReplay ? | | 544|+ g_GameData.gui.isReplay ? | 545| 545| translate("Scores at the end of the game.") : | 546| 546| g_GameData.gui.disconnected ? | 547| 547| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 542| 542| g_GameData.gui.isInGame ? | 543| 543| translate("Current Scores") : | 544| 544| g_GameData.gui.isReplay ? | 545| |- translate("Scores at the end of the game.") : | | 545|+ translate("Scores at the end of the game.") : | 546| 546| g_GameData.gui.disconnected ? | 547| 547| translate("You have been disconnected.") : | 548| 548| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 543| 543| translate("Current Scores") : | 544| 544| g_GameData.gui.isReplay ? | 545| 545| translate("Scores at the end of the game.") : | 546| |- g_GameData.gui.disconnected ? | | 546|+ g_GameData.gui.disconnected ? | 547| 547| translate("You have been disconnected.") : | 548| 548| !assignedState ? | 549| 549| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 544| 544| g_GameData.gui.isReplay ? | 545| 545| translate("Scores at the end of the game.") : | 546| 546| g_GameData.gui.disconnected ? | 547| |- translate("You have been disconnected.") : | | 547|+ translate("You have been disconnected.") : | 548| 548| !assignedState ? | 549| 549| translate("You have left the game.") : | 550| 550| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 545| 545| translate("Scores at the end of the game.") : | 546| 546| g_GameData.gui.disconnected ? | 547| 547| translate("You have been disconnected.") : | 548| |- !assignedState ? | | 548|+ !assignedState ? | 549| 549| translate("You have left the game.") : | 550| 550| assignedState.state == "won" ? | 551| 551| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 546| 546| g_GameData.gui.disconnected ? | 547| 547| translate("You have been disconnected.") : | 548| 548| !assignedState ? | 549| |- translate("You have left the game.") : | | 549|+ translate("You have left the game.") : | 550| 550| assignedState.state == "won" ? | 551| 551| translate("You have won the battle!") : | 552| 552| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 547| 547| translate("You have been disconnected.") : | 548| 548| !assignedState ? | 549| 549| translate("You have left the game.") : | 550| |- assignedState.state == "won" ? | | 550|+ assignedState.state == "won" ? | 551| 551| translate("You have won the battle!") : | 552| 552| assignedState.state == "defeated" ? | 553| 553| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 548| 548| !assignedState ? | 549| 549| translate("You have left the game.") : | 550| 550| assignedState.state == "won" ? | 551| |- translate("You have won the battle!") : | | 551|+ translate("You have won the battle!") : | 552| 552| assignedState.state == "defeated" ? | 553| 553| translate("You have been defeated…") : | 554| 554| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 549| 549| translate("You have left the game.") : | 550| 550| assignedState.state == "won" ? | 551| 551| translate("You have won the battle!") : | 552| |- assignedState.state == "defeated" ? | | 552|+ assignedState.state == "defeated" ? | 553| 553| translate("You have been defeated…") : | 554| 554| translate("You have abandoned the game."); | 555| 555| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 550| 550| assignedState.state == "won" ? | 551| 551| translate("You have won the battle!") : | 552| 552| assignedState.state == "defeated" ? | 553| |- translate("You have been defeated…") : | | 553|+ translate("You have been defeated…") : | 554| 554| translate("You have abandoned the game."); | 555| 555| | 556| 556| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 551| 551| translate("You have won the battle!") : | 552| 552| assignedState.state == "defeated" ? | 553| 553| translate("You have been defeated…") : | 554| |- translate("You have abandoned the game."); | | 554|+ translate("You have abandoned the game."); | 555| 555| | 556| 556| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 557| 557| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 556| 556| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 557| 557| translate("Game time elapsed: %(time)s"), { | 558| 558| "time": timeToString(g_GameData.sim.timeElapsed) | 559| |- }); | | 559|+ }); | 560| 560| | 561| 561| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 562| 562| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1422/display/redirect
It's a multiple choice, either it shows the stats grouped per team, or it shows the stats grouped per player.
So naturally the options are:
- A checkbox
- A dropdown
- Radio buttons (in HTML, we don't have it in Pyrogenesis GUI)
The purpose of a button to perform an action, not to trigger an option.
So a checkbox [x] Group per team seems more nearby to the purposes of GUI object types me.
(The team color is just the color of the first player of that team.)
One reason for that being a good choice is that this is consistent with diplomacy colors (it is that way, isn't it?)
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
391 | If I'm not mistaken the duplication should be reducible. (There are some differences, but it should be possible to pass them as arguments) |
Yeah, that seems like a better alternative. (One argument for the button is that it looks more streamlined.)
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
391 | I thought about that when writing the code, but came to the conclusion that it's too different to make a deduplication produce a straight-forward result:
|
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 5. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 242| 242| chartLegend.caption = Engine.GetGUIObjectByName("toggleTeamBox").checked ? | 243| 243| g_Teams.filter(el => el !== null).map( | 244| 244| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 245| |- g_GameData.sim.playerStates[player].name | | 245|+ g_GameData.sim.playerStates[player].name | 246| 246| ).join(translateWithContext("Player listing", ", ")) | 247| 247| ).join(" ") : | 248| 248| g_GameData.sim.playerStates.slice(1).map( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 243| 243| g_Teams.filter(el => el !== null).map( | 244| 244| players => coloredText("■", playerColors[players[0] - 1]) + " " + players.map(player => | 245| 245| g_GameData.sim.playerStates[player].name | 246| |- ).join(translateWithContext("Player listing", ", ")) | | 246|+ ).join(translateWithContext("Player listing", ", ")) | 247| 247| ).join(" ") : | 248| 248| g_GameData.sim.playerStates.slice(1).map( | 249| 249| (state, index) => coloredText("■", playerColors[index]) + " " + state.name | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 524| 524| Engine.GetGUIObjectByName("summaryText").caption = | 525| 525| g_GameData.gui.isInGame ? | 526| 526| translate("Current Scores") : | 527| |- g_GameData.gui.isReplay ? | | 527|+ g_GameData.gui.isReplay ? | 528| 528| translate("Scores at the end of the game.") : | 529| 529| g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 525| 525| g_GameData.gui.isInGame ? | 526| 526| translate("Current Scores") : | 527| 527| g_GameData.gui.isReplay ? | 528| |- translate("Scores at the end of the game.") : | | 528|+ translate("Scores at the end of the game.") : | 529| 529| g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | 531| 531| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 526| 526| translate("Current Scores") : | 527| 527| g_GameData.gui.isReplay ? | 528| 528| translate("Scores at the end of the game.") : | 529| |- g_GameData.gui.disconnected ? | | 529|+ g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | 531| 531| !assignedState ? | 532| 532| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 527| 527| g_GameData.gui.isReplay ? | 528| 528| translate("Scores at the end of the game.") : | 529| 529| g_GameData.gui.disconnected ? | 530| |- translate("You have been disconnected.") : | | 530|+ translate("You have been disconnected.") : | 531| 531| !assignedState ? | 532| 532| translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 528| 528| translate("Scores at the end of the game.") : | 529| 529| g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | 531| |- !assignedState ? | | 531|+ !assignedState ? | 532| 532| translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 529| 529| g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | 531| 531| !assignedState ? | 532| |- translate("You have left the game.") : | | 532|+ translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 530| 530| translate("You have been disconnected.") : | 531| 531| !assignedState ? | 532| 532| translate("You have left the game.") : | 533| |- assignedState.state == "won" ? | | 533|+ assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | 536| 536| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 531| 531| !assignedState ? | 532| 532| translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | 534| |- translate("You have won the battle!") : | | 534|+ translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | 536| 536| translate("You have been defeated…") : | 537| 537| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 532| 532| translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | 535| |- assignedState.state == "defeated" ? | | 535|+ assignedState.state == "defeated" ? | 536| 536| translate("You have been defeated…") : | 537| 537| translate("You have abandoned the game."); | 538| 538| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 533| 533| assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | 536| |- translate("You have been defeated…") : | | 536|+ translate("You have been defeated…") : | 537| 537| translate("You have abandoned the game."); | 538| 538| | 539| 539| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 534| 534| translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | 536| 536| translate("You have been defeated…") : | 537| |- translate("You have abandoned the game."); | | 537|+ translate("You have abandoned the game."); | 538| 538| | 539| 539| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 540| 540| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 539| 539| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 540| 540| translate("Game time elapsed: %(time)s"), { | 541| 541| "time": timeToString(g_GameData.sim.timeElapsed) | 542| |- }); | | 542|+ }); | 543| 543| | 544| 544| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 545| 545| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1423/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 524| 524| Engine.GetGUIObjectByName("summaryText").caption = | 525| 525| g_GameData.gui.isInGame ? | 526| 526| translate("Current Scores") : | 527| |- g_GameData.gui.isReplay ? | | 527|+ g_GameData.gui.isReplay ? | 528| 528| translate("Scores at the end of the game.") : | 529| 529| g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 525| 525| g_GameData.gui.isInGame ? | 526| 526| translate("Current Scores") : | 527| 527| g_GameData.gui.isReplay ? | 528| |- translate("Scores at the end of the game.") : | | 528|+ translate("Scores at the end of the game.") : | 529| 529| g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | 531| 531| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 526| 526| translate("Current Scores") : | 527| 527| g_GameData.gui.isReplay ? | 528| 528| translate("Scores at the end of the game.") : | 529| |- g_GameData.gui.disconnected ? | | 529|+ g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | 531| 531| !assignedState ? | 532| 532| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 527| 527| g_GameData.gui.isReplay ? | 528| 528| translate("Scores at the end of the game.") : | 529| 529| g_GameData.gui.disconnected ? | 530| |- translate("You have been disconnected.") : | | 530|+ translate("You have been disconnected.") : | 531| 531| !assignedState ? | 532| 532| translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 528| 528| translate("Scores at the end of the game.") : | 529| 529| g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | 531| |- !assignedState ? | | 531|+ !assignedState ? | 532| 532| translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 529| 529| g_GameData.gui.disconnected ? | 530| 530| translate("You have been disconnected.") : | 531| 531| !assignedState ? | 532| |- translate("You have left the game.") : | | 532|+ translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 530| 530| translate("You have been disconnected.") : | 531| 531| !assignedState ? | 532| 532| translate("You have left the game.") : | 533| |- assignedState.state == "won" ? | | 533|+ assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | 536| 536| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 531| 531| !assignedState ? | 532| 532| translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | 534| |- translate("You have won the battle!") : | | 534|+ translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | 536| 536| translate("You have been defeated…") : | 537| 537| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 532| 532| translate("You have left the game.") : | 533| 533| assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | 535| |- assignedState.state == "defeated" ? | | 535|+ assignedState.state == "defeated" ? | 536| 536| translate("You have been defeated…") : | 537| 537| translate("You have abandoned the game."); | 538| 538| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 533| 533| assignedState.state == "won" ? | 534| 534| translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | 536| |- translate("You have been defeated…") : | | 536|+ translate("You have been defeated…") : | 537| 537| translate("You have abandoned the game."); | 538| 538| | 539| 539| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 534| 534| translate("You have won the battle!") : | 535| 535| assignedState.state == "defeated" ? | 536| 536| translate("You have been defeated…") : | 537| |- translate("You have abandoned the game."); | | 537|+ translate("You have abandoned the game."); | 538| 538| | 539| 539| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 540| 540| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/summary/summary.js | 539| 539| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 540| 540| translate("Game time elapsed: %(time)s"), { | 541| 541| "time": timeToString(g_GameData.sim.timeElapsed) | 542| |- }); | | 542|+ }); | 543| 543| | 544| 544| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 545| 545| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/differential/1424/display/redirect
One argument for the button is that it looks more streamlined
Yes, I understood your reasoning and it's not inherently wrong to use a button, especially depending on which graphics represent the control elements. I just wanted to point out that that typically checkboxes are used for binary settings and buttons for actions. If I don't use red color, it's not a contractual obligation to perform changes.
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
391 | if (Engine.GetGUIObjectByName("toggleTeamBox").checked) for (let team in g_Teams) { let playerState = g_GameData.sim.playerStates[1]; let valueFunction = (...) => g_ScorePanelsData[category].teamCounterFn(team, index, item, g_ScorePanelsData[category].counters, g_ScorePanelsData[category].headings); for (let index in playerState.sequences.time) constructValueThingSwearword(playerState, valueFunction); } else for (let j = 1; j <= g_PlayerCount; ++j) { let playerState = g_GameData.sim.playerStates[j]; let valueFunction = (...) => g_ScorePanelsData[category].counters[itemNumber].fn(playerState, index, item); constructValueThingSwearword(playerState, valueFunction); } function constructValueThingSwearword(playerState, valueFunction) { let data = []; for (let index in playerState.sequences.time) { let value = valueFunction(...); if (type) value = value[type]; data.push([playerState.sequences.time[index], value]); } series.push(data); } I don't mind if this is rejected with prejudice or used and credited (or anything else anyone could care about) |
Yes, I also understood your reasoning and found the arguments for a checkbox better than the arguments for a button, so I used a checkbox instead. (It appears that also is a reduction in LOC ;) )
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
391 | And that won't work because teamCounterFn and fn are called with different arguments. |
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
391 | Not if you pass a function instead of a number/string/object as argument and have the swearword function call that function with all arguments the two callers use, afaics. |
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
391 | Basically resolve (...) and we can say for sure if its good or not, but it looks good to me since exactly the duplicate part is abstracted, which means it's not only less lines to read but also less complex, less nesting. |
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
391 | and less fragmentation (since the shared code and unique code are on alternating lines, with the function, they are separated into one group per logic layer), if successful |
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
391 | I don't get your point. |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 486| 486| Engine.GetGUIObjectByName("summaryText").caption = | 487| 487| g_GameData.gui.isInGame ? | 488| 488| translate("Current Scores") : | 489| |- g_GameData.gui.isReplay ? | | 489|+ g_GameData.gui.isReplay ? | 490| 490| translate("Scores at the end of the game.") : | 491| 491| g_GameData.gui.disconnected ? | 492| 492| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 487| 487| g_GameData.gui.isInGame ? | 488| 488| translate("Current Scores") : | 489| 489| g_GameData.gui.isReplay ? | 490| |- translate("Scores at the end of the game.") : | | 490|+ translate("Scores at the end of the game.") : | 491| 491| g_GameData.gui.disconnected ? | 492| 492| translate("You have been disconnected.") : | 493| 493| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 488| 488| translate("Current Scores") : | 489| 489| g_GameData.gui.isReplay ? | 490| 490| translate("Scores at the end of the game.") : | 491| |- g_GameData.gui.disconnected ? | | 491|+ g_GameData.gui.disconnected ? | 492| 492| translate("You have been disconnected.") : | 493| 493| !assignedState ? | 494| 494| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 489| 489| g_GameData.gui.isReplay ? | 490| 490| translate("Scores at the end of the game.") : | 491| 491| g_GameData.gui.disconnected ? | 492| |- translate("You have been disconnected.") : | | 492|+ translate("You have been disconnected.") : | 493| 493| !assignedState ? | 494| 494| translate("You have left the game.") : | 495| 495| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 490| 490| translate("Scores at the end of the game.") : | 491| 491| g_GameData.gui.disconnected ? | 492| 492| translate("You have been disconnected.") : | 493| |- !assignedState ? | | 493|+ !assignedState ? | 494| 494| translate("You have left the game.") : | 495| 495| assignedState.state == "won" ? | 496| 496| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 491| 491| g_GameData.gui.disconnected ? | 492| 492| translate("You have been disconnected.") : | 493| 493| !assignedState ? | 494| |- translate("You have left the game.") : | | 494|+ translate("You have left the game.") : | 495| 495| assignedState.state == "won" ? | 496| 496| translate("You have won the battle!") : | 497| 497| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 492| 492| translate("You have been disconnected.") : | 493| 493| !assignedState ? | 494| 494| translate("You have left the game.") : | 495| |- assignedState.state == "won" ? | | 495|+ assignedState.state == "won" ? | 496| 496| translate("You have won the battle!") : | 497| 497| assignedState.state == "defeated" ? | 498| 498| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 493| 493| !assignedState ? | 494| 494| translate("You have left the game.") : | 495| 495| assignedState.state == "won" ? | 496| |- translate("You have won the battle!") : | | 496|+ translate("You have won the battle!") : | 497| 497| assignedState.state == "defeated" ? | 498| 498| translate("You have been defeated…") : | 499| 499| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 494| 494| translate("You have left the game.") : | 495| 495| assignedState.state == "won" ? | 496| 496| translate("You have won the battle!") : | 497| |- assignedState.state == "defeated" ? | | 497|+ assignedState.state == "defeated" ? | 498| 498| translate("You have been defeated…") : | 499| 499| translate("You have abandoned the game."); | 500| 500| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 495| 495| assignedState.state == "won" ? | 496| 496| translate("You have won the battle!") : | 497| 497| assignedState.state == "defeated" ? | 498| |- translate("You have been defeated…") : | | 498|+ translate("You have been defeated…") : | 499| 499| translate("You have abandoned the game."); | 500| 500| | 501| 501| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 496| 496| translate("You have won the battle!") : | 497| 497| assignedState.state == "defeated" ? | 498| 498| translate("You have been defeated…") : | 499| |- translate("You have abandoned the game."); | | 499|+ translate("You have abandoned the game."); | 500| 500| | 501| 501| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 502| 502| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 501| 501| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 502| 502| translate("Game time elapsed: %(time)s"), { | 503| 503| "time": timeToString(g_GameData.sim.timeElapsed) | 504| |- }); | | 504|+ }); | 505| 505| | 506| 506| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 507| 507| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2520/display/redirect
Will commit this soon.
(Still not convinced about the reduction of the duplication. It is probably doable but doesn't get more readable.)
binaries/data/mods/public/gui/summary/summary.js | ||
---|---|---|
247 | I don't think so, because g_Teams can be either an Array or false. | |
252 | Hmm, I think we couldn't do the coloring of only the square then, right? | |
binaries/data/mods/public/gui/summary/summary.xml | ||
213 | For what benefit? |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 190| 190| function constructPlayersWithColor(color, playerListing) | 191| 191| { | 192| 192| return sprintf(translateWithContext("Player listing with color indicator", | 193| |- "%(colorIndicator)s %(playerListing)s"), | | 193|+ "%(colorIndicator)s %(playerListing)s"), | 194| 194| { | 195| 195| "colorIndicator": setStringTags(translateWithContext("Charts player color indicator", "■"), { "color": color }), | 196| 196| "playerListing": playerListing | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 191| 191| { | 192| 192| return sprintf(translateWithContext("Player listing with color indicator", | 193| 193| "%(colorIndicator)s %(playerListing)s"), | 194| |- { | | 194|+ { | 195| 195| "colorIndicator": setStringTags(translateWithContext("Charts player color indicator", "■"), { "color": color }), | 196| 196| "playerListing": playerListing | 197| 197| }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 192| 192| return sprintf(translateWithContext("Player listing with color indicator", | 193| 193| "%(colorIndicator)s %(playerListing)s"), | 194| 194| { | 195| |- "colorIndicator": setStringTags(translateWithContext("Charts player color indicator", "■"), { "color": color }), | | 195|+ "colorIndicator": setStringTags(translateWithContext("Charts player color indicator", "■"), { "color": color }), | 196| 196| "playerListing": playerListing | 197| 197| }); | 198| 198| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 193| 193| "%(colorIndicator)s %(playerListing)s"), | 194| 194| { | 195| 195| "colorIndicator": setStringTags(translateWithContext("Charts player color indicator", "■"), { "color": color }), | 196| |- "playerListing": playerListing | | 196|+ "playerListing": playerListing | 197| 197| }); | 198| 198| } | 199| 199| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 194| 194| { | 195| 195| "colorIndicator": setStringTags(translateWithContext("Charts player color indicator", "■"), { "color": color }), | 196| 196| "playerListing": playerListing | 197| |- }); | | 197|+ }); | 198| 198| } | 199| 199| | 200| 200| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 221| 221| chartLegend.caption = (Engine.GetGUIObjectByName("toggleTeamBox").checked ? | 222| 222| g_Teams.filter(el => el !== null).map(players => | 223| 223| constructPlayersWithColor(playerColors[players[0] - 1], players.map(player => | 224| |- g_GameData.sim.playerStates[player].name | | 224|+ g_GameData.sim.playerStates[player].name | 225| 225| ).join(translateWithContext("Player listing", ", "))) | 226| 226| ) : | 227| 227| g_GameData.sim.playerStates.slice(1).map((state, index) => | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 222| 222| g_Teams.filter(el => el !== null).map(players => | 223| 223| constructPlayersWithColor(playerColors[players[0] - 1], players.map(player => | 224| 224| g_GameData.sim.playerStates[player].name | 225| |- ).join(translateWithContext("Player listing", ", "))) | | 225|+ ).join(translateWithContext("Player listing", ", "))) | 226| 226| ) : | 227| 227| g_GameData.sim.playerStates.slice(1).map((state, index) => | 228| 228| constructPlayersWithColor(playerColors[index], state.name)) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 497| 497| Engine.GetGUIObjectByName("summaryText").caption = | 498| 498| g_GameData.gui.isInGame ? | 499| 499| translate("Current Scores") : | 500| |- g_GameData.gui.isReplay ? | | 500|+ g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 498| 498| g_GameData.gui.isInGame ? | 499| 499| translate("Current Scores") : | 500| 500| g_GameData.gui.isReplay ? | 501| |- translate("Scores at the end of the game.") : | | 501|+ translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 499| 499| translate("Current Scores") : | 500| 500| g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| |- g_GameData.gui.disconnected ? | | 502|+ g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 500| 500| g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| |- translate("You have been disconnected.") : | | 503|+ translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| |- !assignedState ? | | 504|+ !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| |- translate("You have left the game.") : | | 505|+ translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| |- assignedState.state == "won" ? | | 506|+ assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| |- translate("You have won the battle!") : | | 507|+ translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| |- assignedState.state == "defeated" ? | | 508|+ assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | 511| 511| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| |- translate("You have been defeated…") : | | 509|+ translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | 511| 511| | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| |- translate("You have abandoned the game."); | | 510|+ translate("You have abandoned the game."); | 511| 511| | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 513| 513| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 513| 513| translate("Game time elapsed: %(time)s"), { | 514| 514| "time": timeToString(g_GameData.sim.timeElapsed) | 515| |- }); | | 515|+ }); | 516| 516| | 517| 517| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 518| 518| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2539/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 190| 190| function constructPlayersWithColor(color, playerListing) | 191| 191| { | 192| 192| return sprintf(translateWithContext("Player listing with color indicator", | 193| |- "%(colorIndicator)s %(playerListing)s"), | | 193|+ "%(colorIndicator)s %(playerListing)s"), | 194| 194| { | 195| 195| "colorIndicator": setStringTags(translateWithContext( | 196| 196| "Charts player color indicator", "■"), { "color": color }), | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 191| 191| { | 192| 192| return sprintf(translateWithContext("Player listing with color indicator", | 193| 193| "%(colorIndicator)s %(playerListing)s"), | 194| |- { | | 194|+ { | 195| 195| "colorIndicator": setStringTags(translateWithContext( | 196| 196| "Charts player color indicator", "■"), { "color": color }), | 197| 197| "playerListing": playerListing | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 192| 192| return sprintf(translateWithContext("Player listing with color indicator", | 193| 193| "%(colorIndicator)s %(playerListing)s"), | 194| 194| { | 195| |- "colorIndicator": setStringTags(translateWithContext( | | 195|+ "colorIndicator": setStringTags(translateWithContext( | 196| 196| "Charts player color indicator", "■"), { "color": color }), | 197| 197| "playerListing": playerListing | 198| 198| }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 193| 193| "%(colorIndicator)s %(playerListing)s"), | 194| 194| { | 195| 195| "colorIndicator": setStringTags(translateWithContext( | 196| |- "Charts player color indicator", "■"), { "color": color }), | | 196|+ "Charts player color indicator", "■"), { "color": color }), | 197| 197| "playerListing": playerListing | 198| 198| }); | 199| 199| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 194| 194| { | 195| 195| "colorIndicator": setStringTags(translateWithContext( | 196| 196| "Charts player color indicator", "■"), { "color": color }), | 197| |- "playerListing": playerListing | | 197|+ "playerListing": playerListing | 198| 198| }); | 199| 199| } | 200| 200| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 195| 195| "colorIndicator": setStringTags(translateWithContext( | 196| 196| "Charts player color indicator", "■"), { "color": color }), | 197| 197| "playerListing": playerListing | 198| |- }); | | 198|+ }); | 199| 199| } | 200| 200| | 201| 201| function updateChartColorAndLegend() | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 6. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 221| 221| chartLegend.caption = (Engine.GetGUIObjectByName("toggleTeamBox").checked ? | 222| 222| g_Teams.filter(el => el !== null).map(players => | 223| 223| constructPlayersWithColor(playerColors[players[0] - 1], players.map(player => | 224| |- g_GameData.sim.playerStates[player].name | | 224|+ g_GameData.sim.playerStates[player].name | 225| 225| ).join(translateWithContext("Player listing", ", "))) | 226| 226| ) : | 227| 227| g_GameData.sim.playerStates.slice(1).map((state, index) => | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 4. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 222| 222| g_Teams.filter(el => el !== null).map(players => | 223| 223| constructPlayersWithColor(playerColors[players[0] - 1], players.map(player => | 224| 224| g_GameData.sim.playerStates[player].name | 225| |- ).join(translateWithContext("Player listing", ", "))) | | 225|+ ).join(translateWithContext("Player listing", ", "))) | 226| 226| ) : | 227| 227| g_GameData.sim.playerStates.slice(1).map((state, index) => | 228| 228| constructPlayersWithColor(playerColors[index], state.name)) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 497| 497| Engine.GetGUIObjectByName("summaryText").caption = | 498| 498| g_GameData.gui.isInGame ? | 499| 499| translate("Current Scores") : | 500| |- g_GameData.gui.isReplay ? | | 500|+ g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 498| 498| g_GameData.gui.isInGame ? | 499| 499| translate("Current Scores") : | 500| 500| g_GameData.gui.isReplay ? | 501| |- translate("Scores at the end of the game.") : | | 501|+ translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 499| 499| translate("Current Scores") : | 500| 500| g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| |- g_GameData.gui.disconnected ? | | 502|+ g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 500| 500| g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| |- translate("You have been disconnected.") : | | 503|+ translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| |- !assignedState ? | | 504|+ !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| |- translate("You have left the game.") : | | 505|+ translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| |- assignedState.state == "won" ? | | 506|+ assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| |- translate("You have won the battle!") : | | 507|+ translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| |- assignedState.state == "defeated" ? | | 508|+ assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | 511| 511| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| |- translate("You have been defeated…") : | | 509|+ translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | 511| 511| | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| |- translate("You have abandoned the game."); | | 510|+ translate("You have abandoned the game."); | 511| 511| | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 513| 513| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 513| 513| translate("Game time elapsed: %(time)s"), { | 514| 514| "time": timeToString(g_GameData.sim.timeElapsed) | 515| |- }); | | 515|+ }); | 516| 516| | 517| 517| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 518| 518| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2540/display/redirect
binaries/data/mods/public/gui/summary/summary.xml | ||
---|---|---|
213 | Separation of concerns? |
binaries/data/mods/public/gui/summary/summary.xml | ||
---|---|---|
213 | So you want to replace this three calls with one call (doesn't seem worth it) or assign the onPress function in js (I don't really see the benefit for such static case). |
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 497| 497| Engine.GetGUIObjectByName("summaryText").caption = | 498| 498| g_GameData.gui.isInGame ? | 499| 499| translate("Current Scores") : | 500| |- g_GameData.gui.isReplay ? | | 500|+ g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 498| 498| g_GameData.gui.isInGame ? | 499| 499| translate("Current Scores") : | 500| 500| g_GameData.gui.isReplay ? | 501| |- translate("Scores at the end of the game.") : | | 501|+ translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 4 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 499| 499| translate("Current Scores") : | 500| 500| g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| |- g_GameData.gui.disconnected ? | | 502|+ g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 500| 500| g_GameData.gui.isReplay ? | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| |- translate("You have been disconnected.") : | | 503|+ translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 5 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 501| 501| translate("Scores at the end of the game.") : | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| |- !assignedState ? | | 504|+ !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 502| 502| g_GameData.gui.disconnected ? | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| |- translate("You have left the game.") : | | 505|+ translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | | [NORMAL] ESLintBear (indent): | | Expected indentation of 6 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 503| 503| translate("You have been disconnected.") : | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| |- assignedState.state == "won" ? | | 506|+ assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 504| 504| !assignedState ? | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| |- translate("You have won the battle!") : | | 507|+ translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 7 tabs but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 505| 505| translate("You have left the game.") : | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| |- assignedState.state == "defeated" ? | | 508|+ assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | 511| 511| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 506| 506| assignedState.state == "won" ? | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| |- translate("You have been defeated…") : | | 509|+ translate("You have been defeated…") : | 510| 510| translate("You have abandoned the game."); | 511| 511| | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 8 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 507| 507| translate("You have won the battle!") : | 508| 508| assignedState.state == "defeated" ? | 509| 509| translate("You have been defeated…") : | 510| |- translate("You have abandoned the game."); | | 510|+ translate("You have abandoned the game."); | 511| 511| | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 513| 513| translate("Game time elapsed: %(time)s"), { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/summary/summary.js | 512| 512| Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | 513| 513| translate("Game time elapsed: %(time)s"), { | 514| 514| "time": timeToString(g_GameData.sim.timeElapsed) | 515| |- }); | | 515|+ }); | 516| 516| | 517| 517| let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | 518| 518| let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2677/display/redirect