@Polakrity asked on D2400 if the timer interval could be made configurable for Trickle as well, this patch does that
Details
- Reviewers
Freagarach - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP23879: Allow the interval to be changed in the templates for the Resource Trickle…
- Trac Tickets
- #5632
Add a modifier for interval, check everything works correctly and that update is more or less frequent.
Diff Detail
- Repository
- rP 0 A.D. Public Repository
- Branch
- /ps/trunk
- Lint
Lint OK - Unit
No Unit Test Coverage - Build Status
Buildable 12331 Build 23467: Vulcan Build Jenkins Build 23466: Vulcan Build (macOS) Jenkins Build 23465: Vulcan Build (Windows) Jenkins Build 23464: arc lint + arc unit
Time | Test | |
---|---|---|
0 ms | Jenkins > TestComponentScripts::test_scripts Test failed: Stack trace:
@simulation/components/tests/test_ResourceTrickle.js:59:1
Expected equal, got (void 0) !== 200
| |
0 ms | Jenkins > cxxtest-debug-gcc6.xml::[failed-to-read] Failed to read test report file /zpool0/trunk/cxxtest-debug-gcc6.xml
org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog.
at org.dom4j.io.SAXReader.read(SAXReader.java:462)
| |
0 ms | Jenkins > cxxtest-debug.xml::[failed-to-read] Failed to read test report file /Users/wfg/Jenkins/workspace/macos-differential/cxxtest-debug.xml
org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog.
at org.dom4j.io.SAXReader.read(SAXReader.java:462)
| |
0 ms | Jenkins > TestAllocators::test_da | |
0 ms | Jenkins > TestAtlasObjectXML::test_parse_attributes1 | |
View Full Test Results (3 Failed · 342 Passed) |
Event Timeline
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2349/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2350/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1818/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1819/display/redirect
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
14 | This is not needed since it is computed in the check timer. | |
17 | The name of the function is not what it does ^^ | |
79 | One could cache the old value and do this.trickeInterval = Apply,,, directly? | |
80 | Also check whether the interval is positive (and non-zero). | |
88 | Comment not needed? | |
91 | Move to the declaration. |
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
89 | Early return? |
Inlines.
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
91 | No, else we compute it in some cases for nothing :) |
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2067/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2600/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/968/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2068/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2601/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2069/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2602/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/969/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/970/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2070/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2603/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2071/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2604/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/2072/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2605/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/971/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/972/display/redirect
Build failure - The Moirai have given mortals hearts that can endure.
Link to build: https://jenkins.wildfiregames.com/job/macos-differential/973/display/redirect
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2606/display/redirect
Add comment inline cmpTimer, apparently JavaScript allows this, and EsLint does not complain
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2607/display/redirect
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
86–92 | || 0 not needed anymore (since you've set it on init now). | |
88 | What happens when the oldTrickeInterval was 0 and we try here to cancel the invalidated timer? | |
101 | invalidated before (or earlier) to note it did not become invalidated on this turn. |
Fix inlines
binaries/data/mods/public/simulation/components/ResourceTrickle.js | ||
---|---|---|
88 | [11:20:17] Stan: Freagarach, when you cancel a cancelled timer delete returns false instead of true [11:20:48] Freagarach: So we're okay :) |
Successful build - Chance fights ever on the side of the prudent.
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2608/display/redirect
- Tested in game, interval applied appropriately.
- Code looks good.
- Common use cases tested.