When trying to see If I could make cmpTimer faster, I realized that we run a timer for Resource trickle every tick to recompute rates, even when rates are 0.
Details
- Reviewers
bb - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP23394: Optimize resource trickle by not running timers when not necessary.
Test resource trickle still works as expected.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Lint
Lint Skipped - Unit
Unit Tests Skipped - Build Status
Buildable 9929 Build 16739: Vulcan Build Build 16738: Vulcan Build (Windows)
Event Timeline
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
64 | this return isn't necessary as said Freagarach. |
Could be done I guess, not sure if worth it.
I also wonder if it is necessary to cache the template values.
Well caching doesn't hurt since there is a cast.
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
64 | Yes it is else you cancel a timer that shouldn't be there to start a new one :) Here it stops, and only resume on value modification. |
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
64 | you have early returns when you check if a timer exists in your StartTimer and StopTimer functions. |
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
64 | If you cancel it this.timer is undefined, hereby making the starttimer code work :) |
Since the timer ought to be checked as well when an entity changes ownership (out of scope here), it seems beneficial to already have the checking code in a seperate function.
And while at it, the start timer and cancel timer can be merged in that, unless there is a strong reason to keep them seperate?
I think it is good to know what is going on just by reading that line e.g. CancelTimer, StartTimer. One is not forced to guess what would be outcome of given call and is not needed to find body of that function. Next advantage is that one is sure he is not going to start or cancel timer by calling given functions even multiple times or by accident if timer is at state one wants to have it.
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1029/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/514/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1030/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/515/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/516/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (semi): | | Missing semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/ResourceTrickle.js | 82| 82| | 83| 83| let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); | 84| 84| this.timer = cmpTimer.SetInterval(this.entity, IID_ResourceTrickle, "Trickle", interval, interval, undefined); | 85| |-} | | 85|+}; | 86| 86| | 87| 87| Engine.RegisterComponentType(IID_ResourceTrickle, "ResourceTrickle", ResourceTrickle); binaries/data/mods/public/simulation/components/ResourceTrickle.js | 85| } | | [NORMAL] JSHintBear: | | Missing semicolon. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1031/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (semi): | | Missing semicolon. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/ResourceTrickle.js | 80| 80| | 81| 81| let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer); | 82| 82| this.timer = cmpTimer.SetInterval(this.entity, IID_ResourceTrickle, "Trickle", interval, interval, undefined); | 83| |-} | | 83|+}; | 84| 84| | 85| 85| Engine.RegisterComponentType(IID_ResourceTrickle, "ResourceTrickle", ResourceTrickle); binaries/data/mods/public/simulation/components/ResourceTrickle.js | 83| } | | [NORMAL] JSHintBear: | | Missing semicolon. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1033/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/518/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/519/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1034/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/520/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 1| 1| Resources = { | 2| |- "GetCodes": () => ["food", "metal", "stone", "wood"], | | 2|+ "GetCodes": () => ["food", "metal", "stone", "wood"], | 3| 3| "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 1| 1| Resources = { | 2| 2| "GetCodes": () => ["food", "metal", "stone", "wood"], | 3| |- "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | | 3|+ "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 1| 1| Resources = { | 2| 2| "GetCodes": () => ["food", "metal", "stone", "wood"], | 3| 3| "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| |- "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | | 4|+ "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | 7| 7| let schema = ""; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 2| 2| "GetCodes": () => ["food", "metal", "stone", "wood"], | 3| 3| "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| |- "GetResource": () => ({}), | | 5|+ "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | 7| 7| let schema = ""; | 8| 8| for (let res of Resources.GetCodes()) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 3| 3| "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | 6| |- "BuildSchema": (type) => { | | 6|+ "BuildSchema": (type) => { | 7| 7| let schema = ""; | 8| 8| for (let res of Resources.GetCodes()) | 9| 9| schema += | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | 7| |- let schema = ""; | | 7|+ let schema = ""; | 8| 8| for (let res of Resources.GetCodes()) | 9| 9| schema += | 10| 10| "<optional>" + | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 5| 5| "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | 7| 7| let schema = ""; | 8| |- for (let res of Resources.GetCodes()) | | 8|+ for (let res of Resources.GetCodes()) | 9| 9| schema += | 10| 10| "<optional>" + | 11| 11| "<element name='" + res + "'>" + | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 6| 6| "BuildSchema": (type) => { | 7| 7| let schema = ""; | 8| 8| for (let res of Resources.GetCodes()) | 9| |- schema += | | 9|+ schema += | 10| 10| "<optional>" + | 11| 11| "<element name='" + res + "'>" + | 12| 12| "<ref name='" + type + "'/>" + | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 12| 12| "<ref name='" + type + "'/>" + | 13| 13| "</element>" + | 14| 14| "</optional>"; | 15| |- return "<interleave>" + schema + "</interleave>"; | | 15|+ return "<interleave>" + schema + "</interleave>"; | 16| 16| } | 17| 17| }; | 18| 18| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 13| 13| "</element>" + | 14| 14| "</optional>"; | 15| 15| return "<interleave>" + schema + "</interleave>"; | 16| |- } | | 16|+ } | 17| 17| }; | 18| 18| | 19| 19| Engine.LoadComponentScript("interfaces/ResourceTrickle.js"); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 29| 29| let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer", {}); | 30| 30| | 31| 31| let cmpResourceTrickle = ConstructComponent(wonderEnt, "ResourceTrickle", { | 32| |- "Interval": "200", | | 32|+ "Interval": "200", | 33| 33| "Rates": { | 34| 34| "food": "0.0", | 35| 35| "metal": "0.0" | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 30| 30| | 31| 31| let cmpResourceTrickle = ConstructComponent(wonderEnt, "ResourceTrickle", { | 32| 32| "Interval": "200", | 33| |- "Rates": { | | 33|+ "Rates": { | 34| 34| "food": "0.0", | 35| 35| "metal": "0.0" | 36| 36| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 31| 31| let cmpResourceTrickle = ConstructComponent(wonderEnt, "ResourceTrickle", { | 32| 32| "Interval": "200", | 33| 33| "Rates": { | 34| |- "food": "0.0", | | 34|+ "food": "0.0", | 35| 35| "metal": "0.0" | 36| 36| } | 37| 37| }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 32| 32| "Interval": "200", | 33| 33| "Rates": { | 34| 34| "food": "0.0", | 35| |- "metal": "0.0" | | 35|+ "metal": "0.0" | 36| 36| } | 37| 37| }); | 38| 38| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 33| 33| "Rates": { | 34| 34| "food": "0.0", | 35| 35| "metal": "0.0" | 36| |- } | | 36|+ } | 37| 37| }); | 38| 38| | 39| 39| let cmpPlayer = ConstructComponent(10, "Player", { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 37| 37| }); | 38| 38| | 39| 39| let cmpPlayer = ConstructComponent(10, "Player", { | 40| |- "SpyCostMultiplier": 1, | | 40|+ "SpyCostMultiplier": 1, | 41| 41| "BarterMultiplier": { | 42| 42| "Buy": { | 43| 43| "wood": 1.0, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 38| 38| | 39| 39| let cmpPlayer = ConstructComponent(10, "Player", { | 40| 40| "SpyCostMultiplier": 1, | 41| |- "BarterMultiplier": { | | 41|+ "BarterMultiplier": { | 42| 42| "Buy": { | 43| 43| "wood": 1.0, | 44| 44| "stone": 1.0, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 39| 39| let cmpPlayer = ConstructComponent(10, "Player", { | 40| 40| "SpyCostMultiplier": 1, | 41| 41| "BarterMultiplier": { | 42| |- "Buy": { | | 42|+ "Buy": { | 43| 43| "wood": 1.0, | 44| 44| "stone": 1.0, | 45| 45| "metal": 1.0 | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 40| 40| "SpyCostMultiplier": 1, | 41| 41| "BarterMultiplier": { | 42| 42| "Buy": { | 43| |- "wood": 1.0, | | 43|+ "wood": 1.0, | 44| 44| "stone": 1.0, | 45| 45| "metal": 1.0 | 46| 46| }, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 41| 41| "BarterMultiplier": { | 42| 42| "Buy": { | 43| 43| "wood": 1.0, | 44| |- "stone": 1.0, | | 44|+ "stone": 1.0, | 45| 45| "metal": 1.0 | 46| 46| }, | 47| 47| "Sell": { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 42| 42| "Buy": { | 43| 43| "wood": 1.0, | 44| 44| "stone": 1.0, | 45| |- "metal": 1.0 | | 45|+ "metal": 1.0 | 46| 46| }, | 47| 47| "Sell": { | 48| 48| "wood": 1.0, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 43| 43| "wood": 1.0, | 44| 44| "stone": 1.0, | 45| 45| "metal": 1.0 | 46| |- }, | | 46|+ }, | 47| 47| "Sell": { | 48| 48| "wood": 1.0, | 49| 49| "stone": 1.0, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 44| 44| "stone": 1.0, | 45| 45| "metal": 1.0 | 46| 46| }, | 47| |- "Sell": { | | 47|+ "Sell": { | 48| 48| "wood": 1.0, | 49| 49| "stone": 1.0, | 50| 50| "metal": 1.0 | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 45| 45| "metal": 1.0 | 46| 46| }, | 47| 47| "Sell": { | 48| |- "wood": 1.0, | | 48|+ "wood": 1.0, | 49| 49| "stone": 1.0, | 50| 50| "metal": 1.0 | 51| 51| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 46| 46| }, | 47| 47| "Sell": { | 48| 48| "wood": 1.0, | 49| |- "stone": 1.0, | | 49|+ "stone": 1.0, | 50| 50| "metal": 1.0 | 51| 51| } | 52| 52| }, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 47| 47| "Sell": { | 48| 48| "wood": 1.0, | 49| 49| "stone": 1.0, | 50| |- "metal": 1.0 | | 50|+ "metal": 1.0 | 51| 51| } | 52| 52| }, | 53| 53| }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 48| 48| "wood": 1.0, | 49| 49| "stone": 1.0, | 50| 50| "metal": 1.0 | 51| |- } | | 51|+ } | 52| 52| }, | 53| 53| }); | 54| 54| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 49| 49| "stone": 1.0, | 50| 50| "metal": 1.0 | 51| 51| } | 52| |- }, | | 52|+ }, | 53| 53| }); | 54| 54| | 55| 55| let QueryOwnerInterface = () => cmpPlayer; | | [NORMAL] ESLintBear (quote-props): | | Unquoted property 'food' found. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 54| 54| | 55| 55| let QueryOwnerInterface = () => cmpPlayer; | 56| 56| Engine.RegisterGlobal("QueryOwnerInterface", QueryOwnerInterface); | 57| |-TS_ASSERT_UNEVAL_EQUALS(cmpPlayer.GetResourceCounts(), { food: 300, metal: 300, stone: 300, wood: 300 }); | | 57|+TS_ASSERT_UNEVAL_EQUALS(cmpPlayer.GetResourceCounts(), { "food": 300, metal: 300, stone: 300, wood: 300 }); | 58| 58| TS_ASSERT_EQUALS(cmpResourceTrickle.GetTimer(), 200); | 59| 59| TS_ASSERT_UNEVAL_EQUALS(cmpResourceTrickle.GetRates(), {}); | 60| 60| TS_ASSERT_EQUALS(cmpResourceTrickle.ComputeRates(), false); | | [NORMAL] ESLintBear (quote-props): | | Unquoted property 'metal' found. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 54| 54| | 55| 55| let QueryOwnerInterface = () => cmpPlayer; | 56| 56| Engine.RegisterGlobal("QueryOwnerInterface", QueryOwnerInterface); | 57| |-TS_ASSERT_UNEVAL_EQUALS(cmpPlayer.GetResourceCounts(), { food: 300, metal: 300, stone: 300, wood: 300 }); | | 57|+TS_ASSERT_UNEVAL_EQUALS(cmpPlayer.GetResourceCounts(), { food: 300, "metal": 300, stone: 300, wood: 300 }); | 58| 58| TS_ASSERT_EQUALS(cmpResourceTrickle.GetTimer(), 200); | 59| 59| TS_ASSERT_UNEVAL_EQUALS(cmpResourceTrickle.GetRates(), {}); | 60| 60| TS_ASSERT_EQUALS(cmpResourceTrickle.ComputeRates(), false); | | [NORMAL] ESLintBear (quote-props): | | Unquoted property 'stone' found. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 54| 54| | 55| 55| let QueryOwnerInterface = () => cmpPlayer; | 56| 56| Engine.RegisterGlobal("QueryOwnerInterface", QueryOwnerInterface); | 57| |-TS_ASSERT_UNEVAL_EQUALS(cmpPlayer.GetResourceCounts(), { food: 300, metal: 300, stone: 300, wood: 300 }); | | 57|+TS_ASSERT_UNEVAL_EQUALS(cmpPlayer.GetResourceCounts(), { food: 300, metal: 300, "stone": 300, wood: 300 }); | 58| 58| TS_ASSERT_EQUALS(cmpResourceTrickle.GetTimer(), 200); | 59| 59| TS_ASSERT_UNEVAL_EQUALS(cmpResourceTrickle.GetRates(), {}); | 60| 60| TS_ASSERT_EQUALS(cmpResourceTrickle.ComputeRates(), false); | | [NORMAL] ESLintBear (quote-props): | | Unquoted property 'wood' found. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 54| 54| | 55| 55| let QueryOwnerInterface = () => cmpPlayer; | 56| 56| Engine.RegisterGlobal("QueryOwnerInterface", QueryOwnerInterface); | 57| |-TS_ASSERT_UNEVAL_EQUALS(cmpPlayer.GetResourceCounts(), { food: 300, metal: 300, stone: 300, wood: 300 }); | | 57|+TS_ASSERT_UNEVAL_EQUALS(cmpPlayer.GetResourceCounts(), { food: 300, metal: 300, stone: 300, "wood": 300 }); | 58| 58| TS_ASSERT_EQUALS(cmpResourceTrickle.GetTimer(), 200); | 59| 59| TS_ASSERT_UNEVAL_EQUALS(cmpResourceTrickle.GetRates(), {}); | 60| 60| TS_ASSERT_EQUALS(cmpResourceTrickle.ComputeRates(), false); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 60| 60| TS_ASSERT_EQUALS(cmpResourceTrickle.ComputeRates(), false); | 61| 61| cmpTimer.OnUpdate({ "turnLength": turnLength }); | 62| 62| ApplyValueModificationsToEntity = (valueName, currentValue, entity) => { | 63| |- if (valueName == "ResourceTrickle/Rates/food") | | 63|+ if (valueName == "ResourceTrickle/Rates/food") | 64| 64| return currentValue + 1; | 65| 65| | 66| 66| return currentValue; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 61| 61| cmpTimer.OnUpdate({ "turnLength": turnLength }); | 62| 62| ApplyValueModificationsToEntity = (valueName, currentValue, entity) => { | 63| 63| if (valueName == "ResourceTrickle/Rates/food") | 64| |- return currentValue + 1; | | 64|+ return currentValue + 1; | 65| 65| | 66| 66| return currentValue; | 67| 67| }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 63| 63| if (valueName == "ResourceTrickle/Rates/food") | 64| 64| return currentValue + 1; | 65| 65| | 66| |- return currentValue; | | 66|+ return currentValue; | 67| 67| }; | 68| 68| Engine.RegisterGlobal("ApplyValueModificationsToEntity", ApplyValueModificationsToEntity); | 69| 69| cmpResourceTrickle.OnValueModification({ "component": "ResourceTrickle" }); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1035/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/521/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 1| 1| Resources = { | 2| |- "GetCodes": () => ["food", "metal", "stone", "wood"], | | 2|+ "GetCodes": () => ["food", "metal", "stone", "wood"], | 3| 3| "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 1| 1| Resources = { | 2| 2| "GetCodes": () => ["food", "metal", "stone", "wood"], | 3| |- "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | | 3|+ "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 1| 1| Resources = { | 2| 2| "GetCodes": () => ["food", "metal", "stone", "wood"], | 3| 3| "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| |- "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | | 4|+ "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | 7| 7| let schema = ""; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 2| 2| "GetCodes": () => ["food", "metal", "stone", "wood"], | 3| 3| "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| |- "GetResource": () => ({}), | | 5|+ "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | 7| 7| let schema = ""; | 8| 8| for (let res of Resources.GetCodes()) | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 3| 3| "GetTradableCodes": () => ["food", "metal", "stone", "wood"], | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | 6| |- "BuildSchema": (type) => { | | 6|+ "BuildSchema": (type) => { | 7| 7| let schema = ""; | 8| 8| for (let res of Resources.GetCodes()) | 9| 9| schema += | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 4| 4| "GetBarterableCodes": () => ["food", "metal", "stone", "wood"], | 5| 5| "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | 7| |- let schema = ""; | | 7|+ let schema = ""; | 8| 8| for (let res of Resources.GetCodes()) | 9| 9| schema += | 10| 10| "<optional>" + | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 5| 5| "GetResource": () => ({}), | 6| 6| "BuildSchema": (type) => { | 7| 7| let schema = ""; | 8| |- for (let res of Resources.GetCodes()) | | 8|+ for (let res of Resources.GetCodes()) | 9| 9| schema += | 10| 10| "<optional>" + | 11| 11| "<element name='" + res + "'>" + | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 6| 6| "BuildSchema": (type) => { | 7| 7| let schema = ""; | 8| 8| for (let res of Resources.GetCodes()) | 9| |- schema += | | 9|+ schema += | 10| 10| "<optional>" + | 11| 11| "<element name='" + res + "'>" + | 12| 12| "<ref name='" + type + "'/>" + | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 12| 12| "<ref name='" + type + "'/>" + | 13| 13| "</element>" + | 14| 14| "</optional>"; | 15| |- return "<interleave>" + schema + "</interleave>"; | | 15|+ return "<interleave>" + schema + "</interleave>"; | 16| 16| } | 17| 17| }; | 18| 18| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 13| 13| "</element>" + | 14| 14| "</optional>"; | 15| 15| return "<interleave>" + schema + "</interleave>"; | 16| |- } | | 16|+ } | 17| 17| }; | 18| 18| | 19| 19| Engine.LoadComponentScript("interfaces/ResourceTrickle.js"); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 29| 29| let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer", {}); | 30| 30| | 31| 31| let cmpResourceTrickle = ConstructComponent(wonderEnt, "ResourceTrickle", { | 32| |- "Interval": "200", | | 32|+ "Interval": "200", | 33| 33| "Rates": { | 34| 34| "food": "0.0", | 35| 35| "metal": "0.0" | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 30| 30| | 31| 31| let cmpResourceTrickle = ConstructComponent(wonderEnt, "ResourceTrickle", { | 32| 32| "Interval": "200", | 33| |- "Rates": { | | 33|+ "Rates": { | 34| 34| "food": "0.0", | 35| 35| "metal": "0.0" | 36| 36| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 31| 31| let cmpResourceTrickle = ConstructComponent(wonderEnt, "ResourceTrickle", { | 32| 32| "Interval": "200", | 33| 33| "Rates": { | 34| |- "food": "0.0", | | 34|+ "food": "0.0", | 35| 35| "metal": "0.0" | 36| 36| } | 37| 37| }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 32| 32| "Interval": "200", | 33| 33| "Rates": { | 34| 34| "food": "0.0", | 35| |- "metal": "0.0" | | 35|+ "metal": "0.0" | 36| 36| } | 37| 37| }); | 38| 38| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 33| 33| "Rates": { | 34| 34| "food": "0.0", | 35| 35| "metal": "0.0" | 36| |- } | | 36|+ } | 37| 37| }); | 38| 38| | 39| 39| let cmpPlayer = ConstructComponent(10, "Player", { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 37| 37| }); | 38| 38| | 39| 39| let cmpPlayer = ConstructComponent(10, "Player", { | 40| |- "SpyCostMultiplier": 1, | | 40|+ "SpyCostMultiplier": 1, | 41| 41| "BarterMultiplier": { | 42| 42| "Buy": { | 43| 43| "wood": 1.0, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 38| 38| | 39| 39| let cmpPlayer = ConstructComponent(10, "Player", { | 40| 40| "SpyCostMultiplier": 1, | 41| |- "BarterMultiplier": { | | 41|+ "BarterMultiplier": { | 42| 42| "Buy": { | 43| 43| "wood": 1.0, | 44| 44| "stone": 1.0, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 39| 39| let cmpPlayer = ConstructComponent(10, "Player", { | 40| 40| "SpyCostMultiplier": 1, | 41| 41| "BarterMultiplier": { | 42| |- "Buy": { | | 42|+ "Buy": { | 43| 43| "wood": 1.0, | 44| 44| "stone": 1.0, | 45| 45| "metal": 1.0 | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 40| 40| "SpyCostMultiplier": 1, | 41| 41| "BarterMultiplier": { | 42| 42| "Buy": { | 43| |- "wood": 1.0, | | 43|+ "wood": 1.0, | 44| 44| "stone": 1.0, | 45| 45| "metal": 1.0 | 46| 46| }, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 41| 41| "BarterMultiplier": { | 42| 42| "Buy": { | 43| 43| "wood": 1.0, | 44| |- "stone": 1.0, | | 44|+ "stone": 1.0, | 45| 45| "metal": 1.0 | 46| 46| }, | 47| 47| "Sell": { | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 42| 42| "Buy": { | 43| 43| "wood": 1.0, | 44| 44| "stone": 1.0, | 45| |- "metal": 1.0 | | 45|+ "metal": 1.0 | 46| 46| }, | 47| 47| "Sell": { | 48| 48| "wood": 1.0, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 43| 43| "wood": 1.0, | 44| 44| "stone": 1.0, | 45| 45| "metal": 1.0 | 46| |- }, | | 46|+ }, | 47| 47| "Sell": { | 48| 48| "wood": 1.0, | 49| 49| "stone": 1.0, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 44| 44| "stone": 1.0, | 45| 45| "metal": 1.0 | 46| 46| }, | 47| |- "Sell": { | | 47|+ "Sell": { | 48| 48| "wood": 1.0, | 49| 49| "stone": 1.0, | 50| 50| "metal": 1.0 | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 45| 45| "metal": 1.0 | 46| 46| }, | 47| 47| "Sell": { | 48| |- "wood": 1.0, | | 48|+ "wood": 1.0, | 49| 49| "stone": 1.0, | 50| 50| "metal": 1.0 | 51| 51| } | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 46| 46| }, | 47| 47| "Sell": { | 48| 48| "wood": 1.0, | 49| |- "stone": 1.0, | | 49|+ "stone": 1.0, | 50| 50| "metal": 1.0 | 51| 51| } | 52| 52| }, | | [NORMAL] ESLintBear (indent): | | Expected indentation of 3 tabs but found 12 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 47| 47| "Sell": { | 48| 48| "wood": 1.0, | 49| 49| "stone": 1.0, | 50| |- "metal": 1.0 | | 50|+ "metal": 1.0 | 51| 51| } | 52| 52| }, | 53| 53| }); | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 48| 48| "wood": 1.0, | 49| 49| "stone": 1.0, | 50| 50| "metal": 1.0 | 51| |- } | | 51|+ } | 52| 52| }, | 53| 53| }); | 54| 54| | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 49| 49| "stone": 1.0, | 50| 50| "metal": 1.0 | 51| 51| } | 52| |- }, | | 52|+ }, | 53| 53| }); | 54| 54| | 55| 55| let QueryOwnerInterface = () => cmpPlayer; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 60| 60| TS_ASSERT_EQUALS(cmpResourceTrickle.ComputeRates(), false); | 61| 61| cmpTimer.OnUpdate({ "turnLength": turnLength }); | 62| 62| ApplyValueModificationsToEntity = (valueName, currentValue, entity) => { | 63| |- if (valueName == "ResourceTrickle/Rates/food") | | 63|+ if (valueName == "ResourceTrickle/Rates/food") | 64| 64| return currentValue + 1; | 65| 65| | 66| 66| return currentValue; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 2 tabs but found 8 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 61| 61| cmpTimer.OnUpdate({ "turnLength": turnLength }); | 62| 62| ApplyValueModificationsToEntity = (valueName, currentValue, entity) => { | 63| 63| if (valueName == "ResourceTrickle/Rates/food") | 64| |- return currentValue + 1; | | 64|+ return currentValue + 1; | 65| 65| | 66| 66| return currentValue; | 67| 67| }; | | [NORMAL] ESLintBear (indent): | | Expected indentation of 1 tab but found 4 spaces. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | 63| 63| if (valueName == "ResourceTrickle/Rates/food") | 64| 64| return currentValue + 1; | 65| 65| | 66| |- return currentValue; | | 66|+ return currentValue; | 67| 67| }; | 68| 68| Engine.RegisterGlobal("ApplyValueModificationsToEntity", ApplyValueModificationsToEntity); | 69| 69| cmpResourceTrickle.OnValueModification({ "component": "ResourceTrickle" }); Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1036/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/522/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1037/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/523/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1038/display/redirect
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
28 | at least one non-zero trickle rate.? | |
binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | ||
2 ↗ | (On Diff #10258) | You can use two or three resources for testing. |
30 ↗ | (On Diff #10258) | Comment not necessary. |
42 ↗ | (On Diff #10258) | playerID? |
61 ↗ | (On Diff #10258) | \n Since there is no rate > 0, nothing should change. And one can discard L62 and L66. |
67 ↗ | (On Diff #10258) | \n Test that only trickling food works. And one can discard L68 and L80. |
82 ↗ | (On Diff #10258) | +\n |
87 ↗ | (On Diff #10258) | Comment not necessary. |
91 ↗ | (On Diff #10258) | Comment not necessary. |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/524/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1039/display/redirect
binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | ||
---|---|---|
2 ↗ | (On Diff #10258) | Only BuildSchema is |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/526/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1041/display/redirect
only trivialities left
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
28 | has | |
34 | if (rate) { foo() } ? | |
binaries/data/mods/public/simulation/components/tests/test_ResourceTrickle.js | ||
10–14 ↗ | (On Diff #10262) | indent? |
32 ↗ | (On Diff #10262) | the timer tests seem to miss that last argument => note to self: fix it |
37–38 ↗ | (On Diff #10262) | trailing 0 |
46 ↗ | (On Diff #10262) | trailing 0, didn't you like strings? |
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1042/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1560/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/138/display/redirect