Page MenuHomeWildfire Games

aura style corrections
Needs ReviewPublic

Authored by Nescio on Jun 18 2019, 2:34 PM.

Details

Reviewers
bb
Summary

D1953 standardizes the formatting style of the technologies json files. This one does the same for auras. Changes:

  • use tabs for indentation, not (two) spaces
  • alphabetize modifications, except for damage types and resources, which have a fixed order (hack, pierce, crush and food, wood, stone, metal, time, xp, respectively)
  • remove unnecessary trailing zeroes
  • aura descriptions per https://trac.wildfiregames.com/wiki/EnglishStyleGuide :
    • B.C. → BC
    • HP → health
    • the Meroë Empire → Kush
    • proper quotation marks inside wonder_pop_2.json description
    • [EDIT]: proper minus signs
    • [EDIT]: render "ResourceGatherer/BaseSpeed" as "gather speed"
    • [EDIT]: replace unnecessary verbose "25% less" with "−25%" for consistency
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 8332
Build 13604: Vulcan BuildJenkins
Build 13603: arc lint + arc unit

Event Timeline

Nescio created this revision.Jun 18 2019, 2:34 PM
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/1767/display/redirect

Nescio edited the summary of this revision. (Show Details)Jun 18 2019, 2:45 PM
Nescio updated this revision to Diff 8544.Jun 18 2019, 2:56 PM
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/1768/display/redirect

Nescio updated this revision to Diff 8545.Jun 18 2019, 3:05 PM
Nescio edited the summary of this revision. (Show Details)

"gather speed"

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

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

Stan added inline comments.Jun 18 2019, 3:12 PM
binaries/data/mods/public/simulation/data/auras/structures/cart_super_dock_repair.json
8

health is not a unit is it ? Health points maybe ?

Nescio added inline comments.Jun 18 2019, 3:49 PM
binaries/data/mods/public/simulation/data/auras/structures/cart_super_dock_repair.json
8

No, the style guide explicitly states we should use "health", since the first version 18 months ago, not HP or something.

Nescio added inline comments.Jun 18 2019, 4:39 PM
binaries/data/mods/public/simulation/data/auras/structures/cart_super_dock_repair.json
8

Likewise, we say "hack damage" and "food", not "damage points" or "food units".

Nescio added a reviewer: bb.Jun 18 2019, 4:54 PM
elexis added a subscriber: elexis.Jun 18 2019, 11:19 PM

spaces inside brackets, e.g. [ "Ship" ] instead of ["Ship"]

(The JS code has these spaces for obejcts but not arrays, Coding_Conventions#JavaScript recommends it for objects but doesn't speak on arrays. So if you would want to make it more consistent, JS arrays be updated too or those spaces ommitted. I suppose one can add that to the CC so that people don't have to become familiar with the large codebase in order to be able to apply the consistency rule of the CC.)

Sorry, I'm not really familiar with js, nor can I safely say I know exactly the difference between objects and arrays.
What I did is follow D1953#81077.

Stan added a comment.Jun 19 2019, 12:23 AM

Most of the time Anything between {} is part of an object. anything between [] is part of an array

Thanks, I guessed that was possibly the case, but I wasn't sure.
Anyway, to avoid future confusion, I've inserted a tiny section in the CC:
https://trac.wildfiregames.com/wiki/Coding_Conventions?action=diff&version=42
Feel free to correct, or revert if I wasn't allowed to.

Nescio updated this revision to Diff 8867.Sat, Jul 13, 10:14 PM
Nescio retitled this revision from standardize aura format to aura style corrections.
Nescio edited the summary of this revision. (Show Details)

Updated

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/57/display/redirect