Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/summary/summary.js
Show First 20 Lines • Show All 458 Lines • ▼ Show 20 Lines | else if (g_GameData.gui.dialog) | ||||
Engine.PopGuiPage(); | Engine.PopGuiPage(); | ||||
else if (Engine.HasXmppClient()) | else if (Engine.HasXmppClient()) | ||||
Engine.SwitchGuiPage("page_lobby.xml", { "dialog": false }); | Engine.SwitchGuiPage("page_lobby.xml", { "dialog": false }); | ||||
else if (g_GameData.gui.isReplay) | else if (g_GameData.gui.isReplay) | ||||
Engine.SwitchGuiPage("page_replaymenu.xml", { | Engine.SwitchGuiPage("page_replaymenu.xml", { | ||||
"replaySelectionData": g_GameData.gui.replaySelectionData, | "replaySelectionData": g_GameData.gui.replaySelectionData, | ||||
"summarySelection": summarySelection | "summarySelection": summarySelection | ||||
}); | }); | ||||
else if (g_GameData.campaignData) | |||||
Engine.SwitchGuiPage(g_GameData.nextPage, g_GameData.campaignData); | |||||
else | else | ||||
Engine.SwitchGuiPage("page_pregame.xml"); | Engine.SwitchGuiPage("page_pregame.xml"); | ||||
} | } | ||||
function startReplay() | function startReplay() | ||||
{ | { | ||||
if (!Engine.StartVisualReplay(g_GameData.gui.replayDirectory)) | if (!Engine.StartVisualReplay(g_GameData.gui.replayDirectory)) | ||||
{ | { | ||||
Show All 17 Lines | |||||
function initGUILabels() | function initGUILabels() | ||||
{ | { | ||||
let assignedState = g_GameData.sim.playerStates[g_GameData.gui.assignedPlayer || -1]; | let assignedState = g_GameData.sim.playerStates[g_GameData.gui.assignedPlayer || -1]; | ||||
Engine.GetGUIObjectByName("summaryText").caption = | Engine.GetGUIObjectByName("summaryText").caption = | ||||
g_GameData.gui.isInGame ? | g_GameData.gui.isInGame ? | ||||
translate("Current Scores") : | translate("Current Scores") : | ||||
g_GameData.gui.isReplay ? | g_GameData.gui.isReplay ? | ||||
Lint: ESLintBear (indent): `Expected indentation of 3 tabs but found 2.` | |||||
translate("Scores at the end of the game.") : | translate("Scores at the end of the game.") : | ||||
Lint: ESLintBear (indent) Expected indentation of 4 tabs but found 3. Lint: ESLintBear (indent): `Expected indentation of 4 tabs but found 3.` | |||||
g_GameData.gui.disconnected ? | g_GameData.gui.disconnected ? | ||||
Lint: ESLintBear (indent) Expected indentation of 4 tabs but found 2. Lint: ESLintBear (indent): `Expected indentation of 4 tabs but found 2.` | |||||
translate("You have been disconnected.") : | translate("You have been disconnected.") : | ||||
Lint: ESLintBear (indent) Expected indentation of 5 tabs but found 3. Lint: ESLintBear (indent): `Expected indentation of 5 tabs but found 3.` | |||||
!assignedState ? | !assignedState ? | ||||
Lint: ESLintBear (indent) Expected indentation of 5 tabs but found 2. Lint: ESLintBear (indent): `Expected indentation of 5 tabs but found 2.` | |||||
translate("You have left the game.") : | translate("You have left the game.") : | ||||
Lint: ESLintBear (indent) Expected indentation of 6 tabs but found 3. Lint: ESLintBear (indent): `Expected indentation of 6 tabs but found 3.` | |||||
assignedState.state == "won" ? | assignedState.state == "won" ? | ||||
Lint: ESLintBear (indent) Expected indentation of 6 tabs but found 2. Lint: ESLintBear (indent): `Expected indentation of 6 tabs but found 2.` | |||||
translate("You have won the battle!") : | translate("You have won the battle!") : | ||||
Lint: ESLintBear (indent) Expected indentation of 7 tabs but found 3. Lint: ESLintBear (indent): `Expected indentation of 7 tabs but found 3.` | |||||
assignedState.state == "defeated" ? | assignedState.state == "defeated" ? | ||||
Lint: ESLintBear (indent) Expected indentation of 7 tabs but found 2. Lint: ESLintBear (indent): `Expected indentation of 7 tabs but found 2.` | |||||
translate("You have been defeated…") : | translate("You have been defeated…") : | ||||
Lint: ESLintBear (indent) Expected indentation of 8 tabs but found 3. Lint: ESLintBear (indent): `Expected indentation of 8 tabs but found 3.` | |||||
translate("You have abandoned the game."); | translate("You have abandoned the game."); | ||||
Lint: ESLintBear (indent) Expected indentation of 8 tabs but found 3. Lint: ESLintBear (indent): `Expected indentation of 8 tabs but found 3.` | |||||
Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | Engine.GetGUIObjectByName("timeElapsed").caption = sprintf( | ||||
translate("Game time elapsed: %(time)s"), { | translate("Game time elapsed: %(time)s"), { | ||||
"time": timeToString(g_GameData.sim.timeElapsed) | "time": timeToString(g_GameData.sim.timeElapsed) | ||||
}); | }); | ||||
Lint: ESLintBear (indent) Expected indentation of 2 tabs but found 1. Lint: ESLintBear (indent): `Expected indentation of 2 tabs but found 1.` | |||||
let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | let mapType = g_Settings.MapTypes.find(type => type.Name == g_GameData.sim.mapSettings.mapType); | ||||
let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); | let mapSize = g_Settings.MapSizes.find(size => size.Tiles == g_GameData.sim.mapSettings.Size || 0); | ||||
Engine.GetGUIObjectByName("mapName").caption = sprintf( | Engine.GetGUIObjectByName("mapName").caption = sprintf( | ||||
translate("%(mapName)s - %(mapType)s"), { | translate("%(mapName)s - %(mapType)s"), { | ||||
"mapName": translate(g_GameData.sim.mapSettings.Name), | "mapName": translate(g_GameData.sim.mapSettings.Name), | ||||
"mapType": mapSize ? mapSize.Name : (mapType ? mapType.Title : "") | "mapType": mapSize ? mapSize.Name : (mapType ? mapType.Title : "") | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
Expected indentation of 3 tabs but found 2.