Page MenuHomeWildfire Games

Use PlayerID rather than PlayerEnt in Barter
ClosedPublic

Authored by temple on Dec 6 2017, 2:46 AM.

Details

Summary

Use PlayerID rather than PlayerEnt in Barter, like most components.

Test Plan

Check that everything's been updated.

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

temple created this revision.Dec 6 2017, 2:46 AM
Vulcan added a subscriber: Vulcan.Dec 6 2017, 3:34 AM

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
elexis accepted this revision.Dec 6 2017, 2:26 PM
elexis added a subscriber: elexis.

Agree.

Correctness: HasMarket and GetPrices actually need a playerID, so seems nicer to just pass that as the functions calling that have access to it.
Completeness: Searched for all function names, all calls are addressed.

Thanks for the patch and splitting it D1050, made it much easier to review!
(Also you might have noticed that I prefer playerID over playerId).

binaries/data/mods/public/simulation/components/tests/test_Barter.js
21 ↗(On Diff #4590)

lets make this playerEnt

111 ↗(On Diff #4590)

and these playerID

This revision is now accepted and ready to land.Dec 6 2017, 2:26 PM
This revision was automatically updated to reflect the committed changes.