We have currently mainly two functions for taking care of modifications: ApplyValueModificationsToEntity and ApplyValueModificationsToTemplate.
The third one ApplyValueModificationsToPlayer was mainly ApplyValueModificationsToTemplate and is imo useless.
We can call directly ApplyValueModificationsToEntity in all the current use case.
Details
Details
- Reviewers
bb - Group Reviewers
Restricted Owners Package (Owns No Changed Paths)
Check completeness.
A quick in game test could consist of checking the wonder aura or the counter espionage tech.
Diff Detail
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 1911 Build 3021: Vulcan Build (Windows) Jenkins Build 3020: Vulcan Build Jenkins Build 3019: arc lint + arc unit
Event Timeline
Comment Actions
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/simulation/components/Player.js | 134| » if·(num·!=·0·&&·num·>·(this.GetPopulationLimit()·-·this.GetPopulationCount())) | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/simulation/components/Player.js | 266| » » if·(this.resourceCount[type]·!=·undefined·&&·amounts[type]·>·this.resourceCount[type]) | | [NORMAL] JSHintBear: | | Use '!==' to compare with 'undefined'. binaries/data/mods/public/simulation/components/Player.js | 269| » if·(Object.keys(amountsNeeded).length·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/simulation/components/Player.js | 323| » for·(var·type·in·amounts) | | [NORMAL] JSHintBear: | | 'type' is already defined. binaries/data/mods/public/simulation/components/Player.js | 692| » return·this.diplomacy[id]·==·0; | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/13/ for more details.
Comment Actions
Executing section Default... Executing section Source... Executing section JS... binaries/data/mods/public/simulation/components/Player.js | 134| » if·(num·!=·0·&&·num·>·(this.GetPopulationLimit()·-·this.GetPopulationCount())) | | [NORMAL] JSHintBear: | | Use '!==' to compare with '0'. binaries/data/mods/public/simulation/components/Player.js | 266| » » if·(this.resourceCount[type]·!=·undefined·&&·amounts[type]·>·this.resourceCount[type]) | | [NORMAL] JSHintBear: | | Use '!==' to compare with 'undefined'. binaries/data/mods/public/simulation/components/Player.js | 269| » if·(Object.keys(amountsNeeded).length·==·0) | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. binaries/data/mods/public/simulation/components/Player.js | 323| » for·(var·type·in·amounts) | | [NORMAL] JSHintBear: | | 'type' is already defined. binaries/data/mods/public/simulation/components/Player.js | 692| » return·this.diplomacy[id]·==·0; | | [NORMAL] JSHintBear: | | Use '===' to compare with '0'. Executing section Python... Executing section Perl...
http://jw:8080/job/phabricator_lint/14/ for more details.
Comment Actions
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/1317/ for more details.
Comment Actions
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/1318/ for more details.
Comment Actions
function indeed deprecated since the other functions can perform the current use cases and new usecases can always be covered by the template function.
All instances of the function are removed and front doesn't fall of when ingame testing.
GetMaxPop() is (indirectly) tested in the unit test.
binaries/data/mods/public/simulation/components/tests/test_Player.js | ||
---|---|---|
31 | seems unused already |