The gamesetup should not hardcode specific gamecontent.
Roman numbers definitely is.
For example it makes no sense for some starcraft like mod, and it doesn't even make sense for most civs.
Details
- Reviewers
- None
Confirm that the strings are located in the wrong place currently, should be moved to civ files.
Confirm the strings are extracted correctly and that duplicate strings dont pose any problems.
If there is someone who wants to do the historic accuracy part, they can do so without any additional cost (time cost for developers or translators) in a separate patch, or here.
Consider updating https://trac.wildfiregames.com/wiki/Mod_Layout#civs
Notice that the game now choses unique names in all cases for the current max playercount and civ files.
Notice that if one removes the names of a civ below the chosen AI playercount of that civ, it will deduplicate.
For example remove all names in rome.json but one to see the deduplication in process.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 9695 Build 16288: Vulcan Build Jenkins Build 16287: Vulcan Build (Windows) Jenkins Build 16286: 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 (operator-linebreak): | | '||' should be placed at the end of the line. |----| | /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js | |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js | 87| 87| // If the elements are still strings, split them by space or by '+' | 88| 88| if (typeof sublist == "string") | 89| 89| sublist = sublist.split(/[+\s]+/); | 90| |- if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) | 91| |- || (c[0] != "!" && classes.indexOf(c) != -1))) | | 90|+ if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) || | | 91|+ (c[0] != "!" && classes.indexOf(c) != -1))) | 92| 92| return true; | 93| 93| } | 94| 94| binaries/data/mods/public/globalscripts/Templates.js | 91| » » ····················||·(c[0]·!=·"!"·&&·classes.indexOf(c)·!=·-1))) | | [NORMAL] JSHintBear: | | Misleading line break before '||'; readers may interpret this as an expression boundary. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 57| 57| var g_NumPlayersList = Array(g_MaxPlayers).fill(0).map((v, i) => i + 1); | 58| 58| | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| |- "label": translateWithContext("team", "None"), | | 60|+ "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 58| 58| | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| 60| "label": translateWithContext("team", "None"), | 61| |- "id": -1 | | 61|+ "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| 60| "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| |- }].concat( | | 62|+}].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 60| 60| "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| 62| }].concat( | 63| |- Array(g_MaxTeams).fill(0).map((v, i) => ({ | | 63|+ Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| 66| })) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 61| 61| "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| |- "label": i + 1, | | 64|+ "label": i + 1, | 65| 65| "id": i | 66| 66| })) | 67| 67| ) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| |- "id": i | | 65|+ "id": i | 66| 66| })) | 67| 67| ) | 68| 68| ); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| |- })) | | 66|+ })) | 67| 67| ) | 68| 68| ); | 69| 69| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| 66| })) | 67| |- ) | | 67|+) | 68| 68| ); | 69| 69| | 70| 70| /** | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 73| 73| var g_RelicCountList = Object.keys(g_CivData).map((civ, i) => i + 1); | 74| 74| | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| |- "name": translateWithContext("civilization", "Random"), | | 76|+ "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 74| 74| | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| |- "tooltip": translate("Picks one civilization at random when the game starts."), | | 77|+ "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| |- "color": g_ColorRandom, | | 78|+ "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| |- "code": "random" | | 79|+ "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| |- }].concat( | | 80|+}].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | 81| |- Object.keys(g_CivData).filter( | | 81|+ Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 79| 79| "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| |- civ => g_CivData[civ].SelectableInGameSetup | | 82|+ civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| |- ).map(civ => ({ | | 83|+ ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| |- "name": g_CivData[civ].Name, | | 84|+ "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| |- "tooltip": g_CivData[civ].History, | | 85|+ "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| |- "color": g_ColorRegular, | | 86|+ "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| 89| ) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| |- "code": civ | | 87|+ "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| 89| ) | 90| 90| ); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| |- })).sort(sortNameIgnoreCase) | | 88|+ })).sort(sortNameIgnoreCase) | 89| 89| ) | 90| 90| ); | 91| 91| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| |- ) | | 89|+) | 90| 90| ); | 91| 91| | 92| 92| /** | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js |1323|1323| offset = -Math.min(slideSpeed * dt, maxOffset); |1324|1324| } |1325|1325| |1326| |- updateSettingsPanelPosition(offset); | |1326|+ updateSettingsPanelPosition(offset); |1327|1327| } |1328|1328| |1329|1329| /** Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/897/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/382/display/redirect
It sounds weird to do that considering some of the names in the civ files already contains numbers ?
Actually call translate (for non-networked games).
Add translation context and comment.
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/383/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (operator-linebreak): | | '||' should be placed at the end of the line. |----| | /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js | |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js | 87| 87| // If the elements are still strings, split them by space or by '+' | 88| 88| if (typeof sublist == "string") | 89| 89| sublist = sublist.split(/[+\s]+/); | 90| |- if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) | 91| |- || (c[0] != "!" && classes.indexOf(c) != -1))) | | 90|+ if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) || | | 91|+ (c[0] != "!" && classes.indexOf(c) != -1))) | 92| 92| return true; | 93| 93| } | 94| 94| binaries/data/mods/public/globalscripts/Templates.js | 91| » » ····················||·(c[0]·!=·"!"·&&·classes.indexOf(c)·!=·-1))) | | [NORMAL] JSHintBear: | | Misleading line break before '||'; readers may interpret this as an expression boundary. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 57| 57| var g_NumPlayersList = Array(g_MaxPlayers).fill(0).map((v, i) => i + 1); | 58| 58| | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| |- "label": translateWithContext("team", "None"), | | 60|+ "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 58| 58| | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| 60| "label": translateWithContext("team", "None"), | 61| |- "id": -1 | | 61|+ "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| 60| "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| |- }].concat( | | 62|+}].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 60| 60| "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| 62| }].concat( | 63| |- Array(g_MaxTeams).fill(0).map((v, i) => ({ | | 63|+ Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| 66| })) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 61| 61| "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| |- "label": i + 1, | | 64|+ "label": i + 1, | 65| 65| "id": i | 66| 66| })) | 67| 67| ) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| |- "id": i | | 65|+ "id": i | 66| 66| })) | 67| 67| ) | 68| 68| ); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| |- })) | | 66|+ })) | 67| 67| ) | 68| 68| ); | 69| 69| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| 66| })) | 67| |- ) | | 67|+) | 68| 68| ); | 69| 69| | 70| 70| /** | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 73| 73| var g_RelicCountList = Object.keys(g_CivData).map((civ, i) => i + 1); | 74| 74| | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| |- "name": translateWithContext("civilization", "Random"), | | 76|+ "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 74| 74| | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| |- "tooltip": translate("Picks one civilization at random when the game starts."), | | 77|+ "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| |- "color": g_ColorRandom, | | 78|+ "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| |- "code": "random" | | 79|+ "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| |- }].concat( | | 80|+}].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | 81| |- Object.keys(g_CivData).filter( | | 81|+ Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 79| 79| "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| |- civ => g_CivData[civ].SelectableInGameSetup | | 82|+ civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| |- ).map(civ => ({ | | 83|+ ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| |- "name": g_CivData[civ].Name, | | 84|+ "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| |- "tooltip": g_CivData[civ].History, | | 85|+ "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| |- "color": g_ColorRegular, | | 86|+ "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| 89| ) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| |- "code": civ | | 87|+ "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| 89| ) | 90| 90| ); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| |- })).sort(sortNameIgnoreCase) | | 88|+ })).sort(sortNameIgnoreCase) | 89| 89| ) | 90| 90| ); | 91| 91| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| |- ) | | 89|+) | 90| 90| ); | 91| 91| | 92| 92| /** | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js |1323|1323| offset = -Math.min(slideSpeed * dt, maxOffset); |1324|1324| } |1325|1325| |1326| |- updateSettingsPanelPosition(offset); | |1326|+ updateSettingsPanelPosition(offset); |1327|1327| } |1328|1328| |1329|1329| /** Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/898/display/redirect
The patch doesn't change that. The roman numbers were added all along if the name was chosen more than once.
So with this patch, it becomes more obvious that this might be a problem.
The alternative is that no name should be chosen more than once.
Then this either needs a format to between the two ways of defining names,
or the {civ} numbers are never applied.
In fact the latter seems to be preferable.
One can add "Name I" and "Name II".
athen 15
brit 11
cart 16
gaul 10
iber 8
kush 14
mace 13
maurya 11
pers 12
spart 12
sele 30
So in fact its well possible to drop those numbers altogether with 8 player limit.
But what if we want to support 32?
I guess thats not an engine limitation, as gamedesigners are free to add that many names to their civs if their game is supposed to support that.
It's an easy way to generate 10 times as many names with the given names.
And it also provides a way to give all of these names the chance of being duplicated.
While the alternative of dropping the numbers is to allow civ editors to only specify the II, III, IV'th instance of a AI name only for actually historically existing / documented / reported names.
Dropping the deduplication algorithm completely sounds lossy, so the alternative would be to use "playername (2)", i.e. Darayavahush II (2).
So if we keep the deduplication algorithm, it'd better be civ-specific translated it seems.
And one can independently improve the algorithm to avoid picking redundant names.
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/384/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (operator-linebreak): | | '||' should be placed at the end of the line. |----| | /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js | |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js | 87| 87| // If the elements are still strings, split them by space or by '+' | 88| 88| if (typeof sublist == "string") | 89| 89| sublist = sublist.split(/[+\s]+/); | 90| |- if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) | 91| |- || (c[0] != "!" && classes.indexOf(c) != -1))) | | 90|+ if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) || | | 91|+ (c[0] != "!" && classes.indexOf(c) != -1))) | 92| 92| return true; | 93| 93| } | 94| 94| binaries/data/mods/public/globalscripts/Templates.js | 91| » » ····················||·(c[0]·!=·"!"·&&·classes.indexOf(c)·!=·-1))) | | [NORMAL] JSHintBear: | | Misleading line break before '||'; readers may interpret this as an expression boundary. | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 57| 57| var g_NumPlayersList = Array(g_MaxPlayers).fill(0).map((v, i) => i + 1); | 58| 58| | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| |- "label": translateWithContext("team", "None"), | | 60|+ "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 58| 58| | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| 60| "label": translateWithContext("team", "None"), | 61| |- "id": -1 | | 61|+ "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 59| 59| var g_PlayerTeamList = prepareForDropdown([{ | 60| 60| "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| |- }].concat( | | 62|+}].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 60| 60| "label": translateWithContext("team", "None"), | 61| 61| "id": -1 | 62| 62| }].concat( | 63| |- Array(g_MaxTeams).fill(0).map((v, i) => ({ | | 63|+ Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| 66| })) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 61| 61| "id": -1 | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| |- "label": i + 1, | | 64|+ "label": i + 1, | 65| 65| "id": i | 66| 66| })) | 67| 67| ) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 62| 62| }].concat( | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| |- "id": i | | 65|+ "id": i | 66| 66| })) | 67| 67| ) | 68| 68| ); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 63| 63| Array(g_MaxTeams).fill(0).map((v, i) => ({ | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| |- })) | | 66|+ })) | 67| 67| ) | 68| 68| ); | 69| 69| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 64| 64| "label": i + 1, | 65| 65| "id": i | 66| 66| })) | 67| |- ) | | 67|+) | 68| 68| ); | 69| 69| | 70| 70| /** | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 73| 73| var g_RelicCountList = Object.keys(g_CivData).map((civ, i) => i + 1); | 74| 74| | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| |- "name": translateWithContext("civilization", "Random"), | | 76|+ "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 74| 74| | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| |- "tooltip": translate("Picks one civilization at random when the game starts."), | | 77|+ "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 75| 75| var g_PlayerCivList = g_CivData && prepareForDropdown([{ | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| |- "color": g_ColorRandom, | | 78|+ "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 76| 76| "name": translateWithContext("civilization", "Random"), | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| |- "code": "random" | | 79|+ "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 77| 77| "tooltip": translate("Picks one civilization at random when the game starts."), | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| |- }].concat( | | 80|+}].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 78| 78| "color": g_ColorRandom, | 79| 79| "code": "random" | 80| 80| }].concat( | 81| |- Object.keys(g_CivData).filter( | | 81|+ Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 79| 79| "code": "random" | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| |- civ => g_CivData[civ].SelectableInGameSetup | | 82|+ civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 80| 80| }].concat( | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| |- ).map(civ => ({ | | 83|+ ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 81| 81| Object.keys(g_CivData).filter( | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| |- "name": g_CivData[civ].Name, | | 84|+ "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 82| 82| civ => g_CivData[civ].SelectableInGameSetup | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| |- "tooltip": g_CivData[civ].History, | | 85|+ "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 83| 83| ).map(civ => ({ | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| |- "color": g_ColorRegular, | | 86|+ "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| 89| ) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 3. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 84| 84| "name": g_CivData[civ].Name, | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| |- "code": civ | | 87|+ "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| 89| ) | 90| 90| ); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 2. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 85| 85| "tooltip": g_CivData[civ].History, | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| |- })).sort(sortNameIgnoreCase) | | 88|+ })).sort(sortNameIgnoreCase) | 89| 89| ) | 90| 90| ); | 91| 91| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 0 tabs but found 1. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | 86| 86| "color": g_ColorRegular, | 87| 87| "code": civ | 88| 88| })).sort(sortNameIgnoreCase) | 89| |- ) | | 89|+) | 90| 90| ); | 91| 91| | 92| 92| /** | | [NORMAL] ESLintBear (no-trailing-spaces): | | Trailing spaces not allowed. |----| | /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js | |++++| /zpool0/trunk/binaries/data/mods/public/gui/gamesetup/gamesetup.js |1323|1323| offset = -Math.min(slideSpeed * dt, maxOffset); |1324|1324| } |1325|1325| |1326| |- updateSettingsPanelPosition(offset); | |1326|+ updateSettingsPanelPosition(offset); |1327|1327| } |1328|1328| |1329|1329| /** binaries/data/mods/public/gui/gamesetup/gamesetup.js |2389| » » » » pData·=>·pData.Name·&&·pData.Name.indexOf(chosenName)·!=·-1).length; | | [NORMAL] ESLintBear (no-shadow): | | 'pData' is already declared in the upper scope. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/899/display/redirect
All civilizations have at least eight different AI names, so why do we need these numerals?
binaries/data/mods/public/simulation/data/civs/athen.json | ||
---|---|---|
171–181 | This appears to be the same for all civilizations; why not specify it somewhere else once, instead of in every {civ}.json file? |
-> https://code.wildfiregames.com/D2348#98197
- For 0ad it doesnt seem so unlikely to support more than 8 players.
- For mods it doesnt seem so unlikely that they specify less than maxplayer names for every civ.
Its just a deduplication mechanism, two players with the same name is something that should never happen, and the algorithm does that.
binaries/data/mods/public/simulation/data/civs/athen.json | ||
---|---|---|
171–181 | Its only the same because I didnt do the history research. |
Also, as @Stan pointed out, e.g Arsinoe II II looks weird.
binaries/data/mods/public/simulation/data/civs/athen.json | ||
---|---|---|
171–181 | Celts didn't, but neither did Romans. Regnal numbers are a later historiographic convention. If AINameNumbers are specified in the {civ}.json files, then all mods will have to be updated.
|