Page MenuHomeWildfire Games

Sort and update help list of category build and training restrictions.
ClosedPublic

Authored by fatherbushido on Apr 26 2017, 3:18 PM.

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

fatherbushido created this revision.Apr 26 2017, 3:18 PM
elexis accepted this revision.Apr 26 2017, 3:46 PM
elexis added a subscriber: elexis.

First I did grep -R '<Category>' -C5 and found that Hero, WarDog, Juggernaut are the only <Category> entries that are not in BuildRestrictions.

Then I used grep -R '<Category>' | cut -d ">" -f 2 | cut -d "<" -f 1 | sort | uniq to get an alphabetically sorted list of all these entries

By appending a -c to the sort command, we see that Hero occurs twice, grep -R "<Category>Hero" -C5 reveals it's both only in the TrainingRestrictions, so it never occurs in the BuildRestrictions.

So the list I end up with is

Apadana, Barracks, CivilCentre, Colony, Council, DefenseTower, Dock, Embassy, Farmstead, Fence, Field, Fortress, Hall, House, Kennel, Library, Market, Monument, Outpost, Pillar, Resource, Special, Stoa, Storehouse, Temple, Theater, UniqueBuilding, Wall, Wonder

Comparing it to yours reveals a mistake Fence occurs twice. Other than that the list is identical, so it is correct and complete (as in having every entry that is currently listed).

binaries/data/mods/public/simulation/components/BuildRestrictions.js
35 ↗(On Diff #1491)

Having more entries means updating it more often, but might be actually a good effect to have things always complete

binaries/data/mods/public/simulation/components/TrainingRestrictions.js
10 ↗(On Diff #1491)

looks like I messed that up in rP19329

10 ↗(On Diff #1491)

That list is complete, grep for <TrainingRestrictions>

This revision is now accepted and ready to land.Apr 26 2017, 3:46 PM
This revision was automatically updated to reflect the committed changes.
Vulcan added a subscriber: Vulcan.Apr 26 2017, 4:03 PM

Build is green

Updating workspaces.
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (306 tests)..................................................................................................................................................................................................................................................................................................................OK!

http://jw:8080/job/phabricator/893/ for more details.