Page MenuHomeWildfire Games

Fix phase notification deleted in ModifiersManager component D274/rP22767
ClosedPublic

Authored by wraitii on Sep 29 2019, 9:05 AM.

Details

Summary

As reported by elexis in rP22767 / D274, refs rP19445 / D354.

Test Plan

Phase up. Get notified.

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

wraitii created this revision.Sep 29 2019, 9:05 AM

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/348/display/redirect

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/864/display/redirect

Freagarach accepted this revision.Sep 29 2019, 9:38 AM
Freagarach added a subscriber: Freagarach.

Does the job, normal phasing works as well as cheated.
(Might want to rectify the summary.)

This revision is now accepted and ready to land.Sep 29 2019, 9:38 AM
elexis retitled this revision from Fix phase notification deleted in rP22767 to Fix phase notification deleted in ModifiersManager component D274/rP22767.Sep 29 2019, 9:49 AM
elexis edited the summary of this revision. (Show Details)
wraitii edited the summary of this revision. (Show Details)Sep 29 2019, 10:52 AM
This revision was automatically updated to reflect the committed changes.