Page MenuHomeWildfire Games

every technology modification on a new line
Needs ReviewPublic

Authored by Nescio on Wed, Jun 5, 11:37 AM.

Details

Reviewers
bb
Summary

This patch puts every modification in every technology .json file on a new line, as requested by @Stan in D1950.
This is already the case for all aura files.

[EDIT] Furthermore:

  • corrects space/tab consistency.
  • standardize spaces between [, {, }, ]
  • remove unnecessary .0 from armour modifications
Test Plan

Check for mistakes.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 7980
Build 12988: Vulcan BuildJenkins
Build 12987: arc lint + arc unit

Event Timeline

Nescio created this revision.Wed, Jun 5, 11:37 AM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1608/display/redirect

Nescio updated this revision to Diff 8317.Wed, Jun 5, 11:55 AM
Nescio edited the summary of this revision. (Show Details)

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1610/display/redirect

bb added a subscriber: bb.Wed, Jun 5, 8:37 PM

standardize { "value": } to {"value":}

Well no, { "key": value } is the convention in js, so also in the json...

Nescio added a comment.Wed, Jun 5, 8:50 PM

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"
}
bb added a comment.Wed, Jun 5, 8:56 PM

it "should", but noone was ever crazy enough to spend some hours/days/weeks/month/years/centuries adding all the spaces

Nescio updated this revision to Diff 8339.Wed, Jun 5, 11:27 PM
Nescio edited the summary of this revision. (Show Details)

Here you go, now with correct spacing.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1622/display/redirect

Nescio updated this revision to Diff 8524.Sun, Jun 16, 8:48 PM

Updated because of rP22379

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/1752/display/redirect

Nescio edited reviewers, added: bb; removed: Stan.Tue, Jun 18, 4:53 PM