Details
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1608/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1610/display/redirect
standardize { "value": } to {"value":}
Well no, { "key": value } is the convention in js, so also in the json...
Is it? Good to know. But shouldn't it then also for cost, requirements, and affects?
E.g. upgrade_rank_elite_infantry.json:
{ "genericName": "Elite Citizen-Infantry", "specificName": { "mace": "Pentakosiomédimnoi", "spart": "Pentakosiomédimnoi", "athen": "Pentakosiomédimnoi" }, "description": "Upgrade all of your citizen-soldier infantrymen to Elite rank.", "cost": {"food": 500, "wood": 0, "stone": 0, "metal": 500}, "requirements": {"tech": "phase_city"}, "requirementsTooltip": "Unlocked in City Phase.", "icon": "upgrade_elite.png", "researchTime": 40, "supersedes": "upgrade_rank_advanced_infantry", "tooltip": "Upgrade all of your citizen-soldier infantrymen to Elite rank. This increases their military prowess, but decreases their resource gathering rates another -25%.", "modifications": [ {"value": "Promotion/RequiredXp", "replace": 0} ], "affects": ["Infantry Advanced"], "soundComplete": "interface/alarm/alarm_upgradearmory.xml" }
or should it be:
{ "genericName": "Elite Citizen-Infantry", "specificName": { "mace": "Pentakosiomédimnoi", "spart": "Pentakosiomédimnoi", "athen": "Pentakosiomédimnoi" }, "description": "Upgrade all of your citizen-soldier infantrymen to Elite rank.", "cost": { "food": 500, "wood": 0, "stone": 0, "metal": 500 }, "requirements": { "tech": "phase_city" }, "requirementsTooltip": "Unlocked in City Phase.", "icon": "upgrade_elite.png", "researchTime": 40, "supersedes": "upgrade_rank_advanced_infantry", "tooltip": "Upgrade all of your citizen-soldier infantrymen to Elite rank. This increases their military prowess, but decreases their resource gathering rates another -25%.", "modifications": [ { "value": "Promotion/RequiredXp", "replace": 0 } ], "affects": [ "Infantry Advanced" ], "soundComplete": "interface/alarm/alarm_upgradearmory.xml" }
it "should", but noone was ever crazy enough to spend some hours/days/weeks/month/years/centuries adding all the spaces
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1622/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/differential/1752/display/redirect
Completeness check forced me to go through all the tech files, so fixed the array spacings and trailing 0's. Grepped for .0, found a couple more and fixed. Units_demo map and structree don't reveal any issues
binaries/data/mods/public/simulation/data/technologies/advanced_unit_bonus.json | ||
---|---|---|
28 ↗ | (On Diff #8524) | arrays (stuff with [...]) does not have the spaces, only objects (stuff with {...}) |
binaries/data/mods/public/simulation/data/technologies/archery_tradition.json | ||
4 ↗ | (On Diff #8524) | got wondering why we add that "stone": 0 here, instead of having a 0 default |
11 ↗ | (On Diff #8524) | .0 |
binaries/data/mods/public/simulation/data/technologies/melee_inf_sidearms.json | ||
14 ↗ | (On Diff #8524) | this sounds wrong: any civ with the town phase can have this tech, should be { "all": [{ "tech": "phase_town" }, { "any": [{ "civ": "brit" }, { "civ": "gaul" }] }] } doesn't cause any harm now since the tech is unused, anyway out of scope |
20 ↗ | (On Diff #8524) | .0 |
binaries/data/mods/public/simulation/data/technologies/melee_inf_spearheads.json | ||
18 ↗ | (On Diff #8524) | .0 |
binaries/data/mods/public/simulation/data/technologies/trade_commercial_treaty.json | ||
11 ↗ | (On Diff #8524) | -0 |
binaries/data/mods/public/simulation/data/technologies/trade_gain_01.json | ||
11 ↗ | (On Diff #8524) | -0 |
binaries/data/mods/public/simulation/data/technologies/unlock_champion_units.json | ||
11 ↗ | (On Diff #8524) | we might want to add some newlines in this unreadable one-liners too see "upgrade_advanced_rank_mercenary" |
I see where the confusion about the array spacing came from, my bad, should have seen it in your code example, anyway thanks for the patch