Details
Details
- Reviewers
Silier - Group Reviewers
Restricted Owners Package (Owns No Changed Paths) - Commits
- rP23587: Cleanup ResearchTechnology function
Verify that
- the variable was indeed unused.
- all techs still apply.
Diff Detail
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
Comment Actions
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (operator-linebreak): | | '||' should be placed at the end of the line. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js | 39| 39| for (let key of this.unresearchedAutoResearchTechs) | 40| 40| { | 41| 41| let tech = TechnologyTemplates.Get(key); | 42| |- if ((tech.autoResearch && this.CanResearch(key)) | 43| |- || (tech.top && (this.IsTechnologyResearched(tech.top) || this.IsTechnologyResearched(tech.bottom)))) | | 42|+ if ((tech.autoResearch && this.CanResearch(key)) || | | 43|+ (tech.top && (this.IsTechnologyResearched(tech.top) || this.IsTechnologyResearched(tech.bottom)))) | 44| 44| { | 45| 45| this.unresearchedAutoResearchTechs.delete(key); | 46| 46| this.ResearchTechnology(key); | | [NORMAL] ESLintBear (space-before-function-paren): | | Unexpected space before function parentheses. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js | 50| 50| }; | 51| 51| | 52| 52| // Checks an entity template to see if its technology requirements have been met | 53| |-TechnologyManager.prototype.CanProduce = function (templateName) | | 53|+TechnologyManager.prototype.CanProduce = function(templateName) | 54| 54| { | 55| 55| var cmpTempManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager); | 56| 56| var template = cmpTempManager.GetTemplate(templateName); binaries/data/mods/public/simulation/components/TechnologyManager.js | 125| » » » switch·(type) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/simulation/components/TechnologyManager.js | 140| » switch·(entity.check) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/simulation/components/TechnologyManager.js | 43| » » » ||·(tech.top·&&·(this.IsTechnologyResearched(tech.top)·||·this.IsTechnologyResearched(tech.bottom)))) | | [NORMAL] JSHintBear: | | Misleading line break before '||'; readers may interpret this as an expression boundary. binaries/data/mods/public/simulation/components/TechnologyManager.js | 185| » » var·cmpTemplateManager·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_TemplateManager); | | [NORMAL] JSHintBear: | | 'cmpTemplateManager' is already defined. binaries/data/mods/public/simulation/components/TechnologyManager.js | 186| » » var·template·=·cmpTemplateManager.GetCurrentTemplateName(msg.entity); | | [NORMAL] JSHintBear: | | 'template' is already defined. binaries/data/mods/public/simulation/components/TechnologyManager.js | 191| » » » var·cmpIdentity·=·Engine.QueryInterface(msg.entity,·IID_Identity); | | [NORMAL] JSHintBear: | | 'cmpIdentity' is already defined. binaries/data/mods/public/simulation/components/TechnologyManager.js | 194| » » » » var·classes·=·cmpIdentity.GetClassesList(); | | [NORMAL] JSHintBear: | | 'classes' is already defined. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1746/display/redirect
Comment Actions
nice catch
binaries/data/mods/public/simulation/components/TechnologyManager.js | ||
---|---|---|
228 ↗ | (On Diff #11324) | when you started with var->let :) |
Comment Actions
Successful build - Chance fights ever on the side of the prudent.
Linter detected issues: Executing section Source... Executing section JS... | | [NORMAL] ESLintBear (operator-linebreak): | | '||' should be placed at the end of the line. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js | 39| 39| for (let key of this.unresearchedAutoResearchTechs) | 40| 40| { | 41| 41| let tech = TechnologyTemplates.Get(key); | 42| |- if ((tech.autoResearch && this.CanResearch(key)) | 43| |- || (tech.top && (this.IsTechnologyResearched(tech.top) || this.IsTechnologyResearched(tech.bottom)))) | | 42|+ if ((tech.autoResearch && this.CanResearch(key)) || | | 43|+ (tech.top && (this.IsTechnologyResearched(tech.top) || this.IsTechnologyResearched(tech.bottom)))) | 44| 44| { | 45| 45| this.unresearchedAutoResearchTechs.delete(key); | 46| 46| this.ResearchTechnology(key); | | [NORMAL] ESLintBear (space-before-function-paren): | | Unexpected space before function parentheses. |----| | /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js | |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js | 50| 50| }; | 51| 51| | 52| 52| // Checks an entity template to see if its technology requirements have been met | 53| |-TechnologyManager.prototype.CanProduce = function (templateName) | | 53|+TechnologyManager.prototype.CanProduce = function(templateName) | 54| 54| { | 55| 55| var cmpTempManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_TemplateManager); | 56| 56| var template = cmpTempManager.GetTemplate(templateName); binaries/data/mods/public/simulation/components/TechnologyManager.js | 125| » » » switch·(type) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/simulation/components/TechnologyManager.js | 140| » switch·(entity.check) | | [NORMAL] ESLintBear (default-case): | | Expected a default case. binaries/data/mods/public/simulation/components/TechnologyManager.js | 43| » » » ||·(tech.top·&&·(this.IsTechnologyResearched(tech.top)·||·this.IsTechnologyResearched(tech.bottom)))) | | [NORMAL] JSHintBear: | | Misleading line break before '||'; readers may interpret this as an expression boundary. binaries/data/mods/public/simulation/components/TechnologyManager.js | 185| » » var·cmpTemplateManager·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_TemplateManager); | | [NORMAL] JSHintBear: | | 'cmpTemplateManager' is already defined. binaries/data/mods/public/simulation/components/TechnologyManager.js | 186| » » var·template·=·cmpTemplateManager.GetCurrentTemplateName(msg.entity); | | [NORMAL] JSHintBear: | | 'template' is already defined. binaries/data/mods/public/simulation/components/TechnologyManager.js | 191| » » » var·cmpIdentity·=·Engine.QueryInterface(msg.entity,·IID_Identity); | | [NORMAL] JSHintBear: | | 'cmpIdentity' is already defined. binaries/data/mods/public/simulation/components/TechnologyManager.js | 194| » » » » var·classes·=·cmpIdentity.GetClassesList(); | | [NORMAL] JSHintBear: | | 'classes' is already defined. Executing section cli...
Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1999/display/redirect