Page MenuHomeWildfire Games

Handle modifications of technologies and auras in a system component
Needs ReviewPublic

Authored by wraitii on Mar 29 2017, 5:36 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Owners Package(Owns No Changed Paths)
Summary

Technologies, auras (global ones in particular) and some cheats (e.g. i am too busy) have very similar effects: they modify existing template stats. However, they all use different systems.

This revision centralises these effects in a modifications manager, which handles global (tech/global aura) modifiers, applied for all entities of a player, and per-entity modifiers.

This makes it easy for scripts to add modifiers, enabling more advanced scenarios such as CBAs without having to rely on mods.

Test Plan

Test for odd behaviours, review code.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
D274_techOverhaul
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8897
Build 14602: Vulcan BuildJenkins
Build 14601: arc lint + arc unit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

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

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/components/tests/test_Pack.js
|  45| »   "SetInterval":·(ent,·iid,·funcname,·time,·repeattime,·data)·=>·{·timerActivated·=·true;·return·7;·}
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  21| »   »   let·template·=·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Melee'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  44|  44| 	});
|  45|  45| 
|  46|  46| 	let cmpAttack = ConstructComponent(attacker, "Attack", {
|  47|    |-		"Melee" : {
|    |  47|+		"Melee": {
|  48|  48| 			"Hack": 11,
|  49|  49| 			"Pierce": 5,
|  50|  50| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Ranged'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  64|  64| 				}
|  65|  65| 			}
|  66|  66| 		},
|  67|    |-		"Ranged" : {
|    |  67|+		"Ranged": {
|  68|  68| 			"Hack": 0,
|  69|  69| 			"Pierce": 10,
|  70|  70| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Splash'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  81|  81| 			"RestrictedClasses": {
|  82|  82| 				"_string": "Elephant"
|  83|  83| 			},
|  84|    |-			"Splash" : {
|    |  84|+			"Splash": {
|  85|  85| 				"Shape": "Circular",
|  86|  86| 				"Range": 10,
|  87|  87| 				"FriendlyFire": "false",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Capture'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  96|  96| 				}
|  97|  97| 			}
|  98|  98| 		},
|  99|    |-		"Capture" : {
|    |  99|+		"Capture": {
| 100| 100| 			"Value": 8,
| 101| 101| 			"MaxRange": 10,
| 102| 102| 		},
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 127| 127| }
| 128| 128| 
| 129| 129| // Validate template getter functions
| 130|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 130|+attackComponentTest(undefined, true,(attacker, cmpAttack, defender) => {
| 131| 131| 
| 132| 132| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 133| 133| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 127| 127| }
| 128| 128| 
| 129| 129| // Validate template getter functions
| 130|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 130|+attackComponentTest(undefined, true , (attacker, cmpAttack, defender) => {
| 131| 131| 
| 132| 132| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 133| 133| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 150| 150| 		"Pierce": 10,
| 151| 151| 		"Crush": 0
| 152| 152| 	});
| 153|    |-	
|    | 153|+
| 154| 154| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackStrengths("Ranged.Splash"), {
| 155| 155| 		"Hack": 0.0,
| 156| 156| 		"Pierce": 15.0,
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 168| 168| 		var classes = cmpIdentity.GetClassesList();
| 169| 169| 		// don't use foundations for the class counts but check if techs apply (e.g. health increase)
| 170| 170| 		if (!Engine.QueryInterface(msg.entity, IID_Foundation))
| 171|    |-		{
|    | 171|+		
| 172| 172| 			for (let cls of classes)
| 173| 173| 			{
| 174| 174| 				this.classCounts[cls] = this.classCounts[cls] || 0;
| 178| 178| 				this.typeCountsByClass[cls][template] = this.typeCountsByClass[cls][template] || 0;
| 179| 179| 				this.typeCountsByClass[cls][template] += 1;
| 180| 180| 			}
| 181|    |-		}
|    | 181|+		
| 182| 182| 	}
| 183| 183| 	if (msg.from == playerID)
| 184| 184| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 227| 227| 	}
| 228| 228| 
| 229| 229| 	if (template.replaces && template.replaces.length > 0)
| 230|    |-	{
|    | 230|+	
| 231| 231| 		for (var i of template.replaces)
| 232| 232| 		{
| 233| 233| 			if (!i || this.IsTechnologyResearched(i))
| 245| 245| 					cmpPlayerEntityLimits.UpdateLimitsFromTech(i);
| 246| 246| 			}
| 247| 247| 		}
| 248|    |-	}
|    | 248|+	
| 249| 249| 
| 250| 250| 	this.UpdateAutoResearch();
| 251| 251| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, { "player": playerID, "tech": tech});
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech });
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 334| 334|  */
| 335| 335| TechnologyManager.prototype.GetResearcher = function(tech)
| 336| 336| {
| 337|    |-	return this.researchQueued.get(tech)
|    | 337|+	return this.researchQueued.get(tech);
| 338| 338| };
| 339| 339| 
| 340| 340| /**

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.

binaries/data/mods/public/simulation/components/TechnologyManager.js
| 337| »   return·this.researchQueued.get(tech)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  24|  24| 
|  25|  25| 	let cmpDamage = ConstructComponent(SYSTEM_ENTITY, "Damage");
|  26|  26| 	let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer");
|  27|    |-	cmpTimer.OnUpdate({ turnLength: 1 });
|    |  27|+	cmpTimer.OnUpdate({ "turnLength": 1 });
|  28|  28| 	let attacker = 11;
|  29|  29| 	let atkPlayerEntity = 1;
|  30|  30| 	let attackerOwner = 6;
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  28|  28| 	let attacker = 11;
|  29|  29| 	let atkPlayerEntity = 1;
|  30|  30| 	let attackerOwner = 6;
|  31|    |-	let cmpAttack = ConstructComponent(attacker, "Attack", { "Ranged": { "ProjectileSpeed": 500, "Gravity": 9.81, "Spread": 0.5, "MaxRange": 50, "MinRange": 0, "Delay": 0 } } );
|    |  31|+	let cmpAttack = ConstructComponent(attacker, "Attack", { "Ranged": { "ProjectileSpeed": 500, "Gravity": 9.81, "Spread": 0.5, "MaxRange": 50, "MinRange": 0, "Delay": 0 } });
|  32|  32| 	let damage = 5;
|  33|  33| 	let target = 21;
|  34|  34| 	let targetOwner = 7;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  49|  49| 		"position": targetPos,
|  50|  50| 		"isSplash": false,
|  51|  51| 		"projectileId": 9,
|  52|    |-		"direction": new Vector3D(1,0,0)
|    |  52|+		"direction": new Vector3D(1, 0,0)
|  53|  53| 	};
|  54|  54| 
|  55|  55| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  49|  49| 		"position": targetPos,
|  50|  50| 		"isSplash": false,
|  51|  51| 		"projectileId": 9,
|  52|    |-		"direction": new Vector3D(1,0,0)
|    |  52|+		"direction": new Vector3D(1,0, 0)
|  53|  53| 	};
|  54|  54| 
|  55|  55| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 100| 100| 
| 101| 101| 	function TestDamage()
| 102| 102| 	{
| 103|    |-		cmpTimer.OnUpdate({ turnLength: 1 });
|    | 103|+		cmpTimer.OnUpdate({ "turnLength": 1 });
| 104| 104| 		TS_ASSERT(damageTaken);
| 105| 105| 		damageTaken = false;
| 106| 106| 	}
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 142| 142| 		"origin": origin,
| 143| 143| 		"radius": 10,
| 144| 144| 		"shape": "Linear",
| 145|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 145|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 146| 146| 		"direction": new Vector3D(1, 747, 0),
| 147| 147| 		"playersToDamage": [2],
| 148| 148| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 142| 142| 		"origin": origin,
| 143| 143| 		"radius": 10,
| 144| 144| 		"shape": "Linear",
| 145|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 145|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 146| 146| 		"direction": new Vector3D(1, 747, 0),
| 147| 147| 		"playersToDamage": [2],
| 148| 148| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 149| 149| 		"attackerOwner": attackerOwner
| 150| 150| 	};
| 151| 151| 
| 152|    |-	let fallOff = function(x,y)
|    | 152|+	let fallOff = function(x, y)
| 153| 153| 	{
| 154| 154| 		return (1 - x * x / (data.radius * data.radius)) * (1 - 25 * y * y / (data.radius * data.radius));
| 155| 155| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 301| 301| 		"origin": new Vector2D(3, 4),
| 302| 302| 		"radius": radius,
| 303| 303| 		"shape": "Circular",
| 304|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 304|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 305| 305| 		"playersToDamage": [2],
| 306| 306| 		"type": "Ranged",
| 307| 307| 		"attackerOwner": 1
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 301| 301| 		"origin": new Vector2D(3, 4),
| 302| 302| 		"radius": radius,
| 303| 303| 		"shape": "Circular",
| 304|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 304|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 305| 305| 		"playersToDamage": [2],
| 306| 306| 		"type": "Ranged",
| 307| 307| 		"attackerOwner": 1

binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 111| »   type·=·data.type·=·"Ranged";
|    | [NORMAL] ESLintBear (no-multi-assign):
|    | Unexpected chained assignment.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  38|  38| ModificationsManager.prototype._modifs = function(entity = undefined)
|  39|  39| {
|  40|  40| 	return !entity ? this.globalModifs : this.localModifs;
|  41|    |-}
|    |  41|+};
|  42|  42| 
|  43|  43| ModificationsManager.prototype._getModifs = function(propertyName, entity = undefined)
|  44|  44| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  43|  43| ModificationsManager.prototype._getModifs = function(propertyName, entity = undefined)
|  44|  44| {
|  45|  45| 	return entity ? this.localModifs.get(propertyName).get(entity) : this.globalModifs.get(propertyName);
|  46|    |-}
|    |  46|+};
|  47|  47| 
|  48|  48| ModificationsManager.prototype._exists = function(propertyName, entity = undefined)
|  49|  49| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  52|  52| 			return false;
|  53|  53| 		if (!this.localModifs.get(propertyName).get(entity))
|  54|  54| 			return false;
|  55|    |-	} else {
|    |  55|+	} else 
|  56|  56| 		if (!this.globalModifs.get(propertyName))
|  57|  57| 			return false;
|  58|    |-	}
|    |  58|+	
|  59|  59| 	return true;
|  60|  60| }
|  61|  61| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  57|  57| 			return false;
|  58|  58| 	}
|  59|  59| 	return true;
|  60|    |-}
|    |  60|+};
|  61|  61| 
|  62|  62| ModificationsManager.prototype._initModifsIfNeeded = function(propertyName, entity = undefined)
|  63|  63| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  66|  66| 			this.localModifs.set(propertyName, new Map());
|  67|  67| 		if (!this.localModifs.get(propertyName).get(entity))
|  68|  68| 			this.localModifs.get(propertyName).set(entity, []);
|  69|    |-	} else {
|    |  69|+	} else 
|  70|  70| 		if (!this.globalModifs.get(propertyName))
|  71|  71| 			this.globalModifs.set(propertyName, []);
|  72|    |-	}
|    |  72|+	
|  73|  73| }
|  74|  74| 
|  75|  75| /**
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  70|  70| 		if (!this.globalModifs.get(propertyName))
|  71|  71| 			this.globalModifs.set(propertyName, []);
|  72|  72| 	}
|  73|    |-}
|    |  73|+};
|  74|  74| 
|  75|  75| /**
|  76|  76|  * Add a modification.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  91|  91| 
|  92|  92| ModificationsManager.prototype.AddModifs = function(modifID, modifs, entity = undefined)
|  93|  93| {
|  94|    |-	for (let propertyName in modifs) {
|    |  94|+	for (let propertyName in modifs) 
|  95|  95| 		this.AddModif(propertyName, modifID, modifs[propertyName], entity);
|  96|    |-	}
|    |  96|+	
|  97|  97| };
|  98|  98| 
|  99|  99| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 187| 187| 
| 188| 188| 	// Update the map, deleting entries if necessary
| 189| 189| 	if (!entity)
| 190|    |-	{
|    | 190|+	
| 191| 191| 		if (modificationsList.length)
| 192| 192| 			this.globalModifs.set(propertyName, modificationsList);
| 193| 193| 		else
| 194| 194| 			this.globalModifs.delete(propertyName);
| 195|    |-	}
|    | 195|+	
| 196| 196| 	else
| 197| 197| 	{
| 198| 198| 		if (modificationsList.length)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 194| 194| 			this.globalModifs.delete(propertyName);
| 195| 195| 	}
| 196| 196| 	else
| 197|    |-	{
|    | 197|+	
| 198| 198| 		if (modificationsList.length)
| 199| 199| 			this.localModifs.get(propertyName).set(entity, modificationsList);
| 200| 200| 		else
| 203| 203| 			if (!this.localModifs.get(propertyName).length)
| 204| 204| 				this.localModifs.delete(propertyName);
| 205| 205| 		}
| 206|    |-	}
|    | 206|+	
| 207| 207| 
| 208| 208| 	return true;
| 209| 209| };
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 264| 264| 	let cmpIdentity = Engine.QueryInterface(entity, IID_Identity);
| 265| 265| 	if (!cmpIdentity)
| 266| 266| 		return originalValue;
| 267|    |-	
|    | 267|+
| 268| 268| 	// Sanitize input.
| 269| 269| 	if (Array.isArray(originalValue))
| 270| 270| 		// Some code bits pass an array instead of a single value.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 355| 355| 		let modifications = property[1];
| 356| 356| 		let component = property[0].split("/")[0];
| 357| 357| 		for (let modif of modifications)
| 358|    |-		{
|    | 358|+		
| 359| 359| 			if (DoesModificationApply(modif.effect, classes))
| 360| 360| 			{
| 361| 361| 				if (!modifiedComponents[component])
| 362| 362| 					modifiedComponents[component] = [];
| 363| 363| 				modifiedComponents[component].push(property[0]);
| 364| 364| 			}
| 365|    |-		}
|    | 365|+		
| 366| 366| 	}
| 367| 367| 
| 368| 368| 	// Send message(s) to the entity so it knows about researched techs

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  50| »   if·(entity)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  50| »   if·(entity)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  55| »   }·else·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Closing curly brace appears on the same line as the subsequent block.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  64| »   if·(entity)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  64| »   if·(entity)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  69| »   }·else·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Closing curly brace appears on the same line as the subsequent block.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  94| »   for·(let·propertyName·in·modifs)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  41| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  46| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  60| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  73| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'name'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  16|  16| };
|  17|  17| 
|  18|  18| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  19|    |-	"GetTemplate": (name) =>  name == "special/spy" ?
|    |  19|+	"GetTemplate": (name) => name == "special/spy" ?
|  20|  20| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  21|  21| 		"VisionSharing": { "Duration": 15 } })
|  22|  22| 	: ({})
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| 
|  18|  18| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  19|  19| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  20|    |-	({ "Cost": { "Resources": { "wood": 1000 } },
|    |  20|+		({ "Cost": { "Resources": { "wood": 1000 } },
|  21|  21| 		"VisionSharing": { "Duration": 15 } })
|  22|  22| 	: ({})
|  23|  23| });
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  18|  18| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  19|  19| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  20|  20| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  21|    |-		"VisionSharing": { "Duration": 15 } })
|    |  21|+			"VisionSharing": { "Duration": 15 } })
|  22|  22| 	: ({})
|  23|  23| });
|  24|  24| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  19|  19| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  20|  20| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  21|  21| 		"VisionSharing": { "Duration": 15 } })
|  22|    |-	: ({})
|    |  22|+		: ({})
|  23|  23| });
|  24|  24| 
|  25|  25| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | ':' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  18|  18| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  19|  19| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  20|  20| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  21|    |-		"VisionSharing": { "Duration": 15 } })
|  22|    |-	: ({})
|    |  21|+		"VisionSharing": { "Duration": 15 } }) :
|    |  22|+	({})
|  23|  23| });
|  24|  24| 
|  25|  25| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  63|  63| });
|  64|  64| Engine.PostMessage = function(id, iid, message)
|  65|  65| {
|  66|    |-TS_ASSERT(false); // One doesn't send message
|    |  66|+	TS_ASSERT(false); // One doesn't send message
|  67|  67| };
|  68|  68| cmpVisionSharing.CheckVisionSharings();
|  69|  69| TS_ASSERT_UNEVAL_EQUALS(cmpVisionSharing.shared, new Set([1]));

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 125| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 137| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 158| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·25·*·1000)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 172| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·15·*·1000·*·60·/·48)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_UpgradeModification.js
| 100| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  98|  98| 
|  99|  99| // Tests if the message is sent when capture points change
| 100| 100| testCapturable(testData, cmpCapturable => {
| 101|    |-	cmpCapturable.SetCapturePoints([0, 2000, 0 , 1000]);
|    | 101|+	cmpCapturable.SetCapturePoints([0, 2000, 0, 1000]);
| 102| 102| 	TS_ASSERT_UNEVAL_EQUALS(cmpCapturable.GetCapturePoints(), [0, 2000, 0, 1000]);
| 103| 103| 	Engine.PostMessage = function(ent, iid, message)
| 104| 104| 	{

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  25| function·testCapturable(testData,·test_function)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 132| function·testRegen(testData,·cpIn,·cpOut,·regenerating)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 157| function·testDecay(testData,·cpIn,·cpOut)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 176| function·testReduce(testData,·amount,·player,·taken)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/897/

Stan added a comment.Jan 3 2019, 10:43 PM

Does it have any performance gain or loss ? What if we use it for auras ?

@Itms @bb can you allocate some time to review this ?

binaries/data/mods/public/simulation/components/ModificationsManager.js
97

Braces

141

But keys do right ? since it's an array.

binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
90

Can't this be added ?

I'm not sure how efficient the aura modifications caching is compared to mine here.

The point of making auras use this would be separation of concern and having a single place to handle modifications in the js code. Looking at the auras code it seems doable, but it'll take some work.

wraitii updated this revision to Diff 7270.Jan 5 2019, 4:09 PM

Migrate auras to the ModificationsManager, which allows me to delete AuraManager entirely (which is entirely redundant).

In practice this merges the technologyManager's modifications caching and the aura managers', but my caching is different from both, so performance should be reviewed.

One major difference is that the Aura Manager handled global auras by individually adding the aura to every unit, whereas my code handles this globally (like the tech code did). So in practice global auras that have a custom icon don't work anymore, which will need to be corrected if it's a feature we use. However this system should be more efficient for that particular case.

wraitii marked 4 inline comments as done.Jan 5 2019, 4:13 PM
wraitii added inline comments.
binaries/data/mods/public/simulation/components/Auras.js
319–320

This is no longer needed because global auras are applied at the player level, not individually.

binaries/data/mods/public/simulation/components/ModificationsManager.js
218

This is the majorly wonky bit in this code, but it avoids duplications.

329

I need to check if this is still needed, I'm not sure.

binaries/data/mods/public/simulation/components/TechnologyManager.js
210

I'm not sure this is correct in svn but regardless I believe converted units change their technologies with the new code, which may or may not be fixed.

Stan added a comment.Jan 5 2019, 4:13 PM

I don't think any global aura had an icon. Only local ones.

Quick question for a mod. Can this modification manager handle the x nearest units for an aura ? Think of it as a formation bonus without formation. So I can make little bands of units for a mod.

I don't think any global aura had an icon. Only local ones.

We actually have two that do, mace_hero_pyrrhus and maur_hero_ashoka.
I intend to move the icon stuff in the modification manager anyways so I guess I'll just have to do it.

Quick question for a mod. Can this modification manager handle the x nearest units for an aura ? Think of it as a formation bonus without formation. So I can make little bands of units for a mod.

Nope, this doesn't change any in-game behaviour, it's just a central place to conveniently deal with modifications.
What you can do is add a modifier to a unit in the JS easily, but doing what you describe would require a custom component.

Vulcan added a comment.Jan 5 2019, 5:03 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'name'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  15|  15| };
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|    |-	"GetTemplate": (name) =>  name == "special/spy" ?
|    |  18|+	"GetTemplate": (name) => name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|    |-	({ "Cost": { "Resources": { "wood": 1000 } },
|    |  19|+		({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|    |  20|+			"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|  23|  23| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  21|+		: ({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | ':' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  20|+		"VisionSharing": { "Duration": 15 } }) :
|    |  21|+	({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  62|  62| });
|  63|  63| Engine.PostMessage = function(id, iid, message)
|  64|  64| {
|  65|    |-TS_ASSERT(false); // One doesn't send message
|    |  65|+	TS_ASSERT(false); // One doesn't send message
|  66|  66| };
|  67|  67| cmpVisionSharing.CheckVisionSharings();
|  68|  68| TS_ASSERT_UNEVAL_EQUALS(cmpVisionSharing.shared, new Set([1]));

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 124| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 136| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 157| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·25·*·1000)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 171| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·15·*·1000·*·60·/·48)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 168| 168| 		var classes = cmpIdentity.GetClassesList();
| 169| 169| 		// don't use foundations for the class counts but check if techs apply (e.g. health increase)
| 170| 170| 		if (!Engine.QueryInterface(msg.entity, IID_Foundation))
| 171|    |-		{
|    | 171|+		
| 172| 172| 			for (let cls of classes)
| 173| 173| 			{
| 174| 174| 				this.classCounts[cls] = this.classCounts[cls] || 0;
| 178| 178| 				this.typeCountsByClass[cls][template] = this.typeCountsByClass[cls][template] || 0;
| 179| 179| 				this.typeCountsByClass[cls][template] += 1;
| 180| 180| 			}
| 181|    |-		}
|    | 181|+		
| 182| 182| 	}
| 183| 183| 	if (msg.from == playerID)
| 184| 184| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 227| 227| 	}
| 228| 228| 
| 229| 229| 	if (template.replaces && template.replaces.length > 0)
| 230|    |-	{
|    | 230|+	
| 231| 231| 		for (var i of template.replaces)
| 232| 232| 		{
| 233| 233| 			if (!i || this.IsTechnologyResearched(i))
| 245| 245| 					cmpPlayerEntityLimits.UpdateLimitsFromTech(i);
| 246| 246| 			}
| 247| 247| 		}
| 248|    |-	}
|    | 248|+	
| 249| 249| 
| 250| 250| 	this.UpdateAutoResearch();
| 251| 251| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, { "player": playerID, "tech": tech});
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech });
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 334| 334|  */
| 335| 335| TechnologyManager.prototype.GetResearcher = function(tech)
| 336| 336| {
| 337|    |-	return this.researchQueued.get(tech)
|    | 337|+	return this.researchQueued.get(tech);
| 338| 338| };
| 339| 339| 
| 340| 340| /**

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.

binaries/data/mods/public/simulation/components/TechnologyManager.js
| 337| »   return·this.researchQueued.get(tech)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  20| »   »   let·template·=·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Pack.js
|  44| »   "SetInterval":·(ent,·iid,·funcname,·time,·repeattime,·data)·=>·{·timerActivated·=·true;·return·7;·}
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|   8|   8| 	this.modifs = new Map(); // Keyed by property name and entity/player ID
|   9|   9| 
|  10|  10| 	this.cachedValues = cache;
|  11|    |-};
|    |  11|+}
|  12|  12| 
|  13|  13| ModificationsManagerCommon.prototype._getModifs = function(propertyName, target)
|  14|  14| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  13|  13| ModificationsManagerCommon.prototype._getModifs = function(propertyName, target)
|  14|  14| {
|  15|  15| 	return this.modifs.get(propertyName).get(target);
|  16|    |-}
|    |  16|+};
|  17|  17| 
|  18|  18| ModificationsManagerCommon.prototype._exists = function(propertyName, target)
|  19|  19| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  22|  22| 	if (!this.modifs.get(propertyName).get(target))
|  23|  23| 		return false;
|  24|  24| 	return true;
|  25|    |-}
|    |  25|+};
|  26|  26| 
|  27|  27| ModificationsManagerCommon.prototype._initModifsIfNeeded = function(propertyName, target)
|  28|  28| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  30|  30| 		this.modifs.set(propertyName, new Map());
|  31|  31| 	if (!this.modifs.get(propertyName).get(target))
|  32|  32| 		this.modifs.get(propertyName).set(target, []);
|  33|    |-}
|    |  33|+};
|  34|  34| 
|  35|  35| /**
|  36|  36|  * Add a modification.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  51|  51| 
|  52|  52| ModificationsManagerCommon.prototype.AddModifs = function(modifID, modifs, target)
|  53|  53| {
|  54|    |-	for (let propertyName in modifs) {
|    |  54|+	for (let propertyName in modifs) 
|  55|  55| 		this.AddModif(propertyName, modifID, modifs[propertyName], target);
|  56|    |-	}
|    |  56|+	
|  57|  57| };
|  58|  58| 
|  59|  59| /**
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 212| 212| 	{
| 213| 213| 		if (typeof this.playerModifs[propName] !== "function" || propName[0] === '_')
| 214| 214| 			continue;
| 215|    |-		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
|    | 215|+		this[propName.replace('Modif', 'PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216| 216| 		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218| 218| }
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 212| 212| 	{
| 213| 213| 		if (typeof this.playerModifs[propName] !== "function" || propName[0] === '_')
| 214| 214| 			continue;
| 215|    |-		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
|    | 215|+		this[propName.replace('Modif','PlayerModif')] = ((a, b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216| 216| 		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218| 218| }
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 213| 213| 		if (typeof this.playerModifs[propName] !== "function" || propName[0] === '_')
| 214| 214| 			continue;
| 215| 215| 		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216|    |-		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
|    | 216|+		this[propName.replace('Modif', 'EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218| 218| }
| 219| 219| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 213| 213| 		if (typeof this.playerModifs[propName] !== "function" || propName[0] === '_')
| 214| 214| 			continue;
| 215| 215| 		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216|    |-		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
|    | 216|+		this[propName.replace('Modif','EntityModif')] = ((a, b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218| 218| }
| 219| 219| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 215| 215| 		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216| 216| 		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218|    |-}
|    | 218|+};
| 219| 219| 
| 220| 220| ModificationsManager.prototype.Serialize = function()
| 221| 221| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 227| 227| 	ret.entityModifs = this.entityModifs.modifs;
| 228| 228| 
| 229| 229| 	return ret;
| 230|    |-}
|    | 230|+};
| 231| 231| 
| 232| 232| ModificationsManager.prototype.Deserialize = function(data)
| 233| 233| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 235| 235| 
| 236| 236| 	this.playerModifs.modifs = data.playerModifs;
| 237| 237| 	this.entityModifs.modifs = data.entityModifs;
| 238|    |-}
|    | 238|+};
| 239| 239| 
| 240| 240| ModificationsManager.prototype.SendEntityModificationMessages = function(propertyName, entity)
| 241| 241| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 241| 241| {
| 242| 242| 	// TODO: if this is slow, it might be more efficient to keep track of who wants our info and post them directly
| 243| 243| 	Engine.BroadcastMessage(MT_ValueModification, { "entities": [entity], "component": propertyName.split("/")[0], "valueNames": [propertyName] });
| 244|    |-}
|    | 244|+};
| 245| 245| 
| 246| 246| ModificationsManager.prototype.SendPlayerModificationMessages = function(propertyName, player)
| 247| 247| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 347| 347| 		let modifications = this.playerModifs._getModifs(propertyName, msg.to);
| 348| 348| 		let component = propertyName.split("/")[0];
| 349| 349| 		for (let modif of modifications)
| 350|    |-		{
|    | 350|+		
| 351| 351| 			if (DoesModificationApply(modif.effect, classes))
| 352| 352| 			{
| 353| 353| 				if (!modifiedComponents[component])
| 354| 354| 					modifiedComponents[component] = [];
| 355| 355| 				modifiedComponents[component].push(propertyName);
| 356| 356| 			}
| 357|    |-		}
|    | 357|+		
| 358| 358| 	}
| 359| 359| 
| 360| 360| 	// Send message(s) to the entity so it knows about researched techs

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  54| »   for·(let·propertyName·in·modifs)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  11| };
|    | [NORMAL] JSHintBear:
|    | Unnecessary semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  16| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  25| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  33| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 218| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 230| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 238| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 244| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 336| 336| 	var classes = this.GetClasses(name);
| 337| 337| 
| 338| 338| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 339|    |-	let fakeTech = { modifications: modifications, affects: classes };
|    | 339|+	let fakeTech = { "modifications": modifications, affects: classes };
| 340| 340| 	let derivedModifiers = DeriveModificationsFromTech(fakeTech);
| 341| 341| 	for (let player of players)
| 342| 342| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 336| 336| 	var classes = this.GetClasses(name);
| 337| 337| 
| 338| 338| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 339|    |-	let fakeTech = { modifications: modifications, affects: classes };
|    | 339|+	let fakeTech = { modifications: modifications, "affects": classes };
| 340| 340| 	let derivedModifiers = DeriveModificationsFromTech(fakeTech);
| 341| 341| 	for (let player of players)
| 342| 342| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 368| 368| 	var players = this.GetAffectedPlayers(name);
| 369| 369| 
| 370| 370| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 371|    |-	let fakeTech = { modifications: modifications, affects: classes };
|    | 371|+	let fakeTech = { "modifications": modifications, affects: classes };
| 372| 372| 	let derivedModifiers = DeriveModificationsFromTech(fakeTech);
| 373| 373| 	for (let player of players)
| 374| 374| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 368| 368| 	var players = this.GetAffectedPlayers(name);
| 369| 369| 
| 370| 370| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 371|    |-	let fakeTech = { modifications: modifications, affects: classes };
|    | 371|+	let fakeTech = { modifications: modifications, "affects": classes };
| 372| 372| 	let derivedModifiers = DeriveModificationsFromTech(fakeTech);
| 373| 373| 	for (let player of players)
| 374| 374| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 390| 390| 	var modifications = this.GetModifications(name);
| 391| 391| 
| 392| 392| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 393|    |-	let fakeTech = { modifications: modifications, affects: this.GetClasses(name) };
|    | 393|+	let fakeTech = { "modifications": modifications, affects: this.GetClasses(name) };
| 394| 394| 	let derivedModifiers = DeriveModificationsFromTech(fakeTech);
| 395| 395| 	for (let ent of validEnts)
| 396| 396| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 390| 390| 	var modifications = this.GetModifications(name);
| 391| 391| 
| 392| 392| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 393|    |-	let fakeTech = { modifications: modifications, affects: this.GetClasses(name) };
|    | 393|+	let fakeTech = { modifications: modifications, "affects": this.GetClasses(name) };
| 394| 394| 	let derivedModifiers = DeriveModificationsFromTech(fakeTech);
| 395| 395| 	for (let ent of validEnts)
| 396| 396| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 421| 421| 		return;
| 422| 422| 
| 423| 423| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 424|    |-	let fakeTech = { modifications: this.GetModifications(name), affects: this.GetClasses(name) };
|    | 424|+	let fakeTech = { "modifications": this.GetModifications(name), affects: this.GetClasses(name) };
| 425| 425| 	let derivedModifiers = DeriveModificationsFromTech(fakeTech);
| 426| 426| 	for (let ent of ents)
| 427| 427| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 421| 421| 		return;
| 422| 422| 
| 423| 423| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 424|    |-	let fakeTech = { modifications: this.GetModifications(name), affects: this.GetClasses(name) };
|    | 424|+	let fakeTech = { modifications: this.GetModifications(name), "affects": this.GetClasses(name) };
| 425| 425| 	let derivedModifiers = DeriveModificationsFromTech(fakeTech);
| 426| 426| 	for (let ent of ents)
| 427| 427| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  23|  23| 
|  24|  24| 	let cmpDamage = ConstructComponent(SYSTEM_ENTITY, "Damage");
|  25|  25| 	let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer");
|  26|    |-	cmpTimer.OnUpdate({ turnLength: 1 });
|    |  26|+	cmpTimer.OnUpdate({ "turnLength": 1 });
|  27|  27| 	let attacker = 11;
|  28|  28| 	let atkPlayerEntity = 1;
|  29|  29| 	let attackerOwner = 6;
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  27|  27| 	let attacker = 11;
|  28|  28| 	let atkPlayerEntity = 1;
|  29|  29| 	let attackerOwner = 6;
|  30|    |-	let cmpAttack = ConstructComponent(attacker, "Attack", { "Ranged": { "ProjectileSpeed": 500, "Gravity": 9.81, "Spread": 0.5, "MaxRange": 50, "MinRange": 0, "Delay": 0 } } );
|    |  30|+	let cmpAttack = ConstructComponent(attacker, "Attack", { "Ranged": { "ProjectileSpeed": 500, "Gravity": 9.81, "Spread": 0.5, "MaxRange": 50, "MinRange": 0, "Delay": 0 } });
|  31|  31| 	let damage = 5;
|  32|  32| 	let target = 21;
|  33|  33| 	let targetOwner = 7;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  48|  48| 		"position": targetPos,
|  49|  49| 		"isSplash": false,
|  50|  50| 		"projectileId": 9,
|  51|    |-		"direction": new Vector3D(1,0,0)
|    |  51|+		"direction": new Vector3D(1, 0,0)
|  52|  52| 	};
|  53|  53| 
|  54|  54| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  48|  48| 		"position": targetPos,
|  49|  49| 		"isSplash": false,
|  50|  50| 		"projectileId": 9,
|  51|    |-		"direction": new Vector3D(1,0,0)
|    |  51|+		"direction": new Vector3D(1,0, 0)
|  52|  52| 	};
|  53|  53| 
|  54|  54| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  99|  99| 
| 100| 100| 	function TestDamage()
| 101| 101| 	{
| 102|    |-		cmpTimer.OnUpdate({ turnLength: 1 });
|    | 102|+		cmpTimer.OnUpdate({ "turnLength": 1 });
| 103| 103| 		TS_ASSERT(damageTaken);
| 104| 104| 		damageTaken = false;
| 105| 105| 	}
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 141| 141| 		"origin": origin,
| 142| 142| 		"radius": 10,
| 143| 143| 		"shape": "Linear",
| 144|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 144|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 145| 145| 		"direction": new Vector3D(1, 747, 0),
| 146| 146| 		"playersToDamage": [2],
| 147| 147| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 141| 141| 		"origin": origin,
| 142| 142| 		"radius": 10,
| 143| 143| 		"shape": "Linear",
| 144|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 144|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 145| 145| 		"direction": new Vector3D(1, 747, 0),
| 146| 146| 		"playersToDamage": [2],
| 147| 147| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 148| 148| 		"attackerOwner": attackerOwner
| 149| 149| 	};
| 150| 150| 
| 151|    |-	let fallOff = function(x,y)
|    | 151|+	let fallOff = function(x, y)
| 152| 152| 	{
| 153| 153| 		return (1 - x * x / (data.radius * data.radius)) * (1 - 25 * y * y / (data.radius * data.radius));
| 154| 154| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 300| 300| 		"origin": new Vector2D(3, 4),
| 301| 301| 		"radius": radius,
| 302| 302| 		"shape": "Circular",
| 303|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 303|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 304| 304| 		"playersToDamage": [2],
| 305| 305| 		"type": "Ranged",
| 306| 306| 		"attackerOwner": 1
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 300| 300| 		"origin": new Vector2D(3, 4),
| 301| 301| 		"radius": radius,
| 302| 302| 		"shape": "Circular",
| 303|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 303|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 304| 304| 		"playersToDamage": [2],
| 305| 305| 		"type": "Ranged",
| 306| 306| 		"attackerOwner": 1

binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 110| »   type·=·data.type·=·"Ranged";
|    | [NORMAL] ESLintBear (no-multi-assign):
|    | Unexpected chained assignment.

binaries/data/mods/public/simulation/components/tests/test_UpgradeModification.js
|  92| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template,·player)·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  97|  97| 
|  98|  98| // Tests if the message is sent when capture points change
|  99|  99| testCapturable(testData, cmpCapturable => {
| 100|    |-	cmpCapturable.SetCapturePoints([0, 2000, 0 , 1000]);
|    | 100|+	cmpCapturable.SetCapturePoints([0, 2000, 0, 1000]);
| 101| 101| 	TS_ASSERT_UNEVAL_EQUALS(cmpCapturable.GetCapturePoints(), [0, 2000, 0, 1000]);
| 102| 102| 	Engine.PostMessage = function(ent, iid, message)
| 103| 103| 	{

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  24| function·testCapturable(testData,·test_function)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 131| function·testRegen(testData,·cpIn,·cpOut,·regenerating)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 156| function·testDecay(testData,·cpIn,·cpOut)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 175| function·testReduce(testData,·amount,·player,·taken)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Melee'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  43|  43| 	});
|  44|  44| 
|  45|  45| 	let cmpAttack = ConstructComponent(attacker, "Attack", {
|  46|    |-		"Melee" : {
|    |  46|+		"Melee": {
|  47|  47| 			"Hack": 11,
|  48|  48| 			"Pierce": 5,
|  49|  49| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Ranged'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  63|  63| 				}
|  64|  64| 			}
|  65|  65| 		},
|  66|    |-		"Ranged" : {
|    |  66|+		"Ranged": {
|  67|  67| 			"Hack": 0,
|  68|  68| 			"Pierce": 10,
|  69|  69| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Splash'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  80|  80| 			"RestrictedClasses": {
|  81|  81| 				"_string": "Elephant"
|  82|  82| 			},
|  83|    |-			"Splash" : {
|    |  83|+			"Splash": {
|  84|  84| 				"Shape": "Circular",
|  85|  85| 				"Range": 10,
|  86|  86| 				"FriendlyFire": "false",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Capture'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  95|  95| 				}
|  96|  96| 			}
|  97|  97| 		},
|  98|    |-		"Capture" : {
|    |  98|+		"Capture": {
|  99|  99| 			"Value": 8,
| 100| 100| 			"MaxRange": 10,
| 101| 101| 		},
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 126| 126| }
| 127| 127| 
| 128| 128| // Validate template getter functions
| 129|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 129|+attackComponentTest(undefined, true,(attacker, cmpAttack, defender) => {
| 130| 130| 
| 131| 131| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 132| 132| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 126| 126| }
| 127| 127| 
| 128| 128| // Validate template getter functions
| 129|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 129|+attackComponentTest(undefined, true , (attacker, cmpAttack, defender) => {
| 130| 130| 
| 131| 131| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 132| 132| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 149| 149| 		"Pierce": 10,
| 150| 150| 		"Crush": 0
| 151| 151| 	});
| 152|    |-	
|    | 152|+
| 153| 153| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackStrengths("Ranged.Splash"), {
| 154| 154| 		"Hack": 0.0,
| 155| 155| 		"Pierce": 15.0,
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/922/

wraitii updated this revision to Diff 7272.Jan 5 2019, 5:30 PM
wraitii retitled this revision from Add a separate manager to handle modifications. to Handle modifications of technologies and auras in a centralized system component..
wraitii edited the summary of this revision. (Show Details)

So actually aura icons can't be merged with the modifications manager because they're only shown when the source is selected, which I forgot.

So instead, this fixes global auras having an icon. It optimises player and global auras by not running the range query since it's now useless - unless the global aura has an overlay icon, because that's the best way I found to efficiently show the icon.

So really global auras probably shouldn't have an icon.

Otherwise this appears to be working correctly in every other respect.

Vulcan added a comment.Jan 5 2019, 5:33 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  20| »   »   let·template·=·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (no-extra-semi):
|    | Unnecessary semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|   8|   8| 	this.modifs = new Map(); // Keyed by property name and entity/player ID
|   9|   9| 
|  10|  10| 	this.cachedValues = cache;
|  11|    |-};
|    |  11|+}
|  12|  12| 
|  13|  13| ModificationsManagerCommon.prototype._getModifs = function(propertyName, target)
|  14|  14| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  13|  13| ModificationsManagerCommon.prototype._getModifs = function(propertyName, target)
|  14|  14| {
|  15|  15| 	return this.modifs.get(propertyName).get(target);
|  16|    |-}
|    |  16|+};
|  17|  17| 
|  18|  18| ModificationsManagerCommon.prototype._exists = function(propertyName, target)
|  19|  19| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  22|  22| 	if (!this.modifs.get(propertyName).get(target))
|  23|  23| 		return false;
|  24|  24| 	return true;
|  25|    |-}
|    |  25|+};
|  26|  26| 
|  27|  27| ModificationsManagerCommon.prototype._initModifsIfNeeded = function(propertyName, target)
|  28|  28| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  30|  30| 		this.modifs.set(propertyName, new Map());
|  31|  31| 	if (!this.modifs.get(propertyName).get(target))
|  32|  32| 		this.modifs.get(propertyName).set(target, []);
|  33|    |-}
|    |  33|+};
|  34|  34| 
|  35|  35| /**
|  36|  36|  * Add a modification.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  51|  51| 
|  52|  52| ModificationsManagerCommon.prototype.AddModifs = function(modifID, modifs, target)
|  53|  53| {
|  54|    |-	for (let propertyName in modifs) {
|    |  54|+	for (let propertyName in modifs) 
|  55|  55| 		this.AddModif(propertyName, modifID, modifs[propertyName], target);
|  56|    |-	}
|    |  56|+	
|  57|  57| };
|  58|  58| 
|  59|  59| /**
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 212| 212| 	{
| 213| 213| 		if (typeof this.playerModifs[propName] !== "function" || propName[0] === '_')
| 214| 214| 			continue;
| 215|    |-		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
|    | 215|+		this[propName.replace('Modif', 'PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216| 216| 		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218| 218| }
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 212| 212| 	{
| 213| 213| 		if (typeof this.playerModifs[propName] !== "function" || propName[0] === '_')
| 214| 214| 			continue;
| 215|    |-		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
|    | 215|+		this[propName.replace('Modif','PlayerModif')] = ((a, b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216| 216| 		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218| 218| }
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 213| 213| 		if (typeof this.playerModifs[propName] !== "function" || propName[0] === '_')
| 214| 214| 			continue;
| 215| 215| 		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216|    |-		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
|    | 216|+		this[propName.replace('Modif', 'EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218| 218| }
| 219| 219| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 213| 213| 		if (typeof this.playerModifs[propName] !== "function" || propName[0] === '_')
| 214| 214| 			continue;
| 215| 215| 		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216|    |-		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
|    | 216|+		this[propName.replace('Modif','EntityModif')] = ((a, b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218| 218| }
| 219| 219| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 215| 215| 		this[propName.replace('Modif','PlayerModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.playerModifs, propName);
| 216| 216| 		this[propName.replace('Modif','EntityModif')] = ((a,b) => () => a[b].apply(a, arguments))(this.entityModifs, propName);
| 217| 217| 	}
| 218|    |-}
|    | 218|+};
| 219| 219| 
| 220| 220| ModificationsManager.prototype.Serialize = function()
| 221| 221| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 227| 227| 	ret.entityModifs = this.entityModifs.modifs;
| 228| 228| 
| 229| 229| 	return ret;
| 230|    |-}
|    | 230|+};
| 231| 231| 
| 232| 232| ModificationsManager.prototype.Deserialize = function(data)
| 233| 233| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 235| 235| 
| 236| 236| 	this.playerModifs.modifs = data.playerModifs;
| 237| 237| 	this.entityModifs.modifs = data.entityModifs;
| 238|    |-}
|    | 238|+};
| 239| 239| 
| 240| 240| ModificationsManager.prototype.SendEntityModificationMessages = function(propertyName, entity)
| 241| 241| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 241| 241| {
| 242| 242| 	// TODO: if this is slow, it might be more efficient to keep track of who wants our info and post them directly
| 243| 243| 	Engine.BroadcastMessage(MT_ValueModification, { "entities": [entity], "component": propertyName.split("/")[0], "valueNames": [propertyName] });
| 244|    |-}
|    | 244|+};
| 245| 245| 
| 246| 246| ModificationsManager.prototype.SendPlayerModificationMessages = function(propertyName, player)
| 247| 247| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 347| 347| 		let modifications = this.playerModifs._getModifs(propertyName, msg.to);
| 348| 348| 		let component = propertyName.split("/")[0];
| 349| 349| 		for (let modif of modifications)
| 350|    |-		{
|    | 350|+		
| 351| 351| 			if (DoesModificationApply(modif.effect, classes))
| 352| 352| 			{
| 353| 353| 				if (!modifiedComponents[component])
| 354| 354| 					modifiedComponents[component] = [];
| 355| 355| 				modifiedComponents[component].push(propertyName);
| 356| 356| 			}
| 357|    |-		}
|    | 357|+		
| 358| 358| 	}
| 359| 359| 
| 360| 360| 	// Send message(s) to the entity so it knows about researched techs

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  54| »   for·(let·propertyName·in·modifs)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  11| };
|    | [NORMAL] JSHintBear:
|    | Unnecessary semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  16| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  25| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  33| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 218| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 230| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 238| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 244| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  23|  23| 
|  24|  24| 	let cmpDamage = ConstructComponent(SYSTEM_ENTITY, "Damage");
|  25|  25| 	let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer");
|  26|    |-	cmpTimer.OnUpdate({ turnLength: 1 });
|    |  26|+	cmpTimer.OnUpdate({ "turnLength": 1 });
|  27|  27| 	let attacker = 11;
|  28|  28| 	let atkPlayerEntity = 1;
|  29|  29| 	let attackerOwner = 6;
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  27|  27| 	let attacker = 11;
|  28|  28| 	let atkPlayerEntity = 1;
|  29|  29| 	let attackerOwner = 6;
|  30|    |-	let cmpAttack = ConstructComponent(attacker, "Attack", { "Ranged": { "ProjectileSpeed": 500, "Gravity": 9.81, "Spread": 0.5, "MaxRange": 50, "MinRange": 0, "Delay": 0 } } );
|    |  30|+	let cmpAttack = ConstructComponent(attacker, "Attack", { "Ranged": { "ProjectileSpeed": 500, "Gravity": 9.81, "Spread": 0.5, "MaxRange": 50, "MinRange": 0, "Delay": 0 } });
|  31|  31| 	let damage = 5;
|  32|  32| 	let target = 21;
|  33|  33| 	let targetOwner = 7;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  48|  48| 		"position": targetPos,
|  49|  49| 		"isSplash": false,
|  50|  50| 		"projectileId": 9,
|  51|    |-		"direction": new Vector3D(1,0,0)
|    |  51|+		"direction": new Vector3D(1, 0,0)
|  52|  52| 	};
|  53|  53| 
|  54|  54| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  48|  48| 		"position": targetPos,
|  49|  49| 		"isSplash": false,
|  50|  50| 		"projectileId": 9,
|  51|    |-		"direction": new Vector3D(1,0,0)
|    |  51|+		"direction": new Vector3D(1,0, 0)
|  52|  52| 	};
|  53|  53| 
|  54|  54| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  99|  99| 
| 100| 100| 	function TestDamage()
| 101| 101| 	{
| 102|    |-		cmpTimer.OnUpdate({ turnLength: 1 });
|    | 102|+		cmpTimer.OnUpdate({ "turnLength": 1 });
| 103| 103| 		TS_ASSERT(damageTaken);
| 104| 104| 		damageTaken = false;
| 105| 105| 	}
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 141| 141| 		"origin": origin,
| 142| 142| 		"radius": 10,
| 143| 143| 		"shape": "Linear",
| 144|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 144|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 145| 145| 		"direction": new Vector3D(1, 747, 0),
| 146| 146| 		"playersToDamage": [2],
| 147| 147| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 141| 141| 		"origin": origin,
| 142| 142| 		"radius": 10,
| 143| 143| 		"shape": "Linear",
| 144|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 144|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 145| 145| 		"direction": new Vector3D(1, 747, 0),
| 146| 146| 		"playersToDamage": [2],
| 147| 147| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 148| 148| 		"attackerOwner": attackerOwner
| 149| 149| 	};
| 150| 150| 
| 151|    |-	let fallOff = function(x,y)
|    | 151|+	let fallOff = function(x, y)
| 152| 152| 	{
| 153| 153| 		return (1 - x * x / (data.radius * data.radius)) * (1 - 25 * y * y / (data.radius * data.radius));
| 154| 154| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 300| 300| 		"origin": new Vector2D(3, 4),
| 301| 301| 		"radius": radius,
| 302| 302| 		"shape": "Circular",
| 303|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 303|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 304| 304| 		"playersToDamage": [2],
| 305| 305| 		"type": "Ranged",
| 306| 306| 		"attackerOwner": 1
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 300| 300| 		"origin": new Vector2D(3, 4),
| 301| 301| 		"radius": radius,
| 302| 302| 		"shape": "Circular",
| 303|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 303|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 304| 304| 		"playersToDamage": [2],
| 305| 305| 		"type": "Ranged",
| 306| 306| 		"attackerOwner": 1

binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 110| »   type·=·data.type·=·"Ranged";
|    | [NORMAL] ESLintBear (no-multi-assign):
|    | Unexpected chained assignment.

binaries/data/mods/public/simulation/components/tests/test_UpgradeModification.js
|  92| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template,·player)·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 340| 340| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 341| 341| 
| 342| 342| 	let derivedModifiers = DeriveModificationsFromTech({
| 343|    |-		modifications: this.GetModifications(name),
|    | 343|+		"modifications": this.GetModifications(name),
| 344| 344| 		affects: this.GetClasses(name)
| 345| 345| 	});
| 346| 346| 	for (let player of players)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 341| 341| 
| 342| 342| 	let derivedModifiers = DeriveModificationsFromTech({
| 343| 343| 		modifications: this.GetModifications(name),
| 344|    |-		affects: this.GetClasses(name)
|    | 344|+		"affects": this.GetClasses(name)
| 345| 345| 	});
| 346| 346| 	for (let player of players)
| 347| 347| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 371| 371| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 372| 372| 
| 373| 373| 	let derivedModifiers = DeriveModificationsFromTech({
| 374|    |-		modifications: this.GetModifications(name),
|    | 374|+		"modifications": this.GetModifications(name),
| 375| 375| 		affects: this.GetClasses(name)
| 376| 376| 	});
| 377| 377| 	for (let player of this.GetAffectedPlayers(name))
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 372| 372| 
| 373| 373| 	let derivedModifiers = DeriveModificationsFromTech({
| 374| 374| 		modifications: this.GetModifications(name),
| 375|    |-		affects: this.GetClasses(name)
|    | 375|+		"affects": this.GetClasses(name)
| 376| 376| 	});
| 377| 377| 	for (let player of this.GetAffectedPlayers(name))
| 378| 378| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 392| 392| 		return;
| 393| 393| 
| 394| 394| 	// update status bars if this has an icon
| 395|    |-	if (this.GetOverlayIcon(name)) {
|    | 395|+	if (this.GetOverlayIcon(name)) 
| 396| 396| 		for (let ent of validEnts)
| 397| 397| 		{
| 398| 398| 			let cmpStatusBars = Engine.QueryInterface(ent, IID_StatusBars);
| 399| 399| 			if (cmpStatusBars)
| 400| 400| 				cmpStatusBars.AddAuraSource(this.entity, name);
| 401| 401| 		}
| 402|    |-	}
|    | 402|+	
| 403| 403| 
| 404| 404| 	// Global aura modifications are handled at the player level by the modification manager.
| 405| 405| 	if (this.IsGlobalAura(name))
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 408| 408| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 409| 409| 
| 410| 410| 	let derivedModifiers = DeriveModificationsFromTech({
| 411|    |-		modifications: this.GetModifications(name),
|    | 411|+		"modifications": this.GetModifications(name),
| 412| 412| 		affects: this.GetClasses(name)
| 413| 413| 	});
| 414| 414| 	for (let ent of validEnts)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 409| 409| 
| 410| 410| 	let derivedModifiers = DeriveModificationsFromTech({
| 411| 411| 		modifications: this.GetModifications(name),
| 412|    |-		affects: this.GetClasses(name)
|    | 412|+		"affects": this.GetClasses(name)
| 413| 413| 	});
| 414| 414| 	for (let ent of validEnts)
| 415| 415| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 430| 430| 		return;
| 431| 431| 
| 432| 432| 	// update status bars if this has an icon
| 433|    |-	if (this.GetOverlayIcon(name)) {
|    | 433|+	if (this.GetOverlayIcon(name)) 
| 434| 434| 		for (let ent of validEnts)
| 435| 435| 		{
| 436| 436| 			let cmpStatusBars = Engine.QueryInterface(ent, IID_StatusBars);
| 437| 437| 			if (cmpStatusBars)
| 438| 438| 				cmpStatusBars.RemoveAuraSource(this.entity, name);
| 439| 439| 		}
| 440|    |-	}
|    | 440|+	
| 441| 441| 
| 442| 442| 	// Global aura modifications are handled at the player level by the modification manager.
| 443| 443| 	if (this.IsGlobalAura(name))
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 446| 446| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 447| 447| 
| 448| 448| 	let derivedModifiers = DeriveModificationsFromTech({
| 449|    |-		modifications: this.GetModifications(name),
|    | 449|+		"modifications": this.GetModifications(name),
| 450| 450| 		affects: this.GetClasses(name)
| 451| 451| 	});
| 452| 452| 	for (let ent of ents)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 447| 447| 
| 448| 448| 	let derivedModifiers = DeriveModificationsFromTech({
| 449| 449| 		modifications: this.GetModifications(name),
| 450|    |-		affects: this.GetClasses(name)
|    | 450|+		"affects": this.GetClasses(name)
| 451| 451| 	});
| 452| 452| 	for (let ent of ents)
| 453| 453| 		for (let modifierPath in derivedModifiers)

binaries/data/mods/public/simulation/components/Auras.js
| 395| »   if·(this.GetOverlayIcon(name))·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Auras.js
| 433| »   if·(this.GetOverlayIcon(name))·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'name'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  15|  15| };
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|    |-	"GetTemplate": (name) =>  name == "special/spy" ?
|    |  18|+	"GetTemplate": (name) => name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|    |-	({ "Cost": { "Resources": { "wood": 1000 } },
|    |  19|+		({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|    |  20|+			"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|  23|  23| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  21|+		: ({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | ':' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  20|+		"VisionSharing": { "Duration": 15 } }) :
|    |  21|+	({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  62|  62| });
|  63|  63| Engine.PostMessage = function(id, iid, message)
|  64|  64| {
|  65|    |-TS_ASSERT(false); // One doesn't send message
|    |  65|+	TS_ASSERT(false); // One doesn't send message
|  66|  66| };
|  67|  67| cmpVisionSharing.CheckVisionSharings();
|  68|  68| TS_ASSERT_UNEVAL_EQUALS(cmpVisionSharing.shared, new Set([1]));

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 124| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 136| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 157| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·25·*·1000)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 171| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·15·*·1000·*·60·/·48)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 168| 168| 		var classes = cmpIdentity.GetClassesList();
| 169| 169| 		// don't use foundations for the class counts but check if techs apply (e.g. health increase)
| 170| 170| 		if (!Engine.QueryInterface(msg.entity, IID_Foundation))
| 171|    |-		{
|    | 171|+		
| 172| 172| 			for (let cls of classes)
| 173| 173| 			{
| 174| 174| 				this.classCounts[cls] = this.classCounts[cls] || 0;
| 178| 178| 				this.typeCountsByClass[cls][template] = this.typeCountsByClass[cls][template] || 0;
| 179| 179| 				this.typeCountsByClass[cls][template] += 1;
| 180| 180| 			}
| 181|    |-		}
|    | 181|+		
| 182| 182| 	}
| 183| 183| 	if (msg.from == playerID)
| 184| 184| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 227| 227| 	}
| 228| 228| 
| 229| 229| 	if (template.replaces && template.replaces.length > 0)
| 230|    |-	{
|    | 230|+	
| 231| 231| 		for (var i of template.replaces)
| 232| 232| 		{
| 233| 233| 			if (!i || this.IsTechnologyResearched(i))
| 245| 245| 					cmpPlayerEntityLimits.UpdateLimitsFromTech(i);
| 246| 246| 			}
| 247| 247| 		}
| 248|    |-	}
|    | 248|+	
| 249| 249| 
| 250| 250| 	this.UpdateAutoResearch();
| 251| 251| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, { "player": playerID, "tech": tech});
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech });
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 334| 334|  */
| 335| 335| TechnologyManager.prototype.GetResearcher = function(tech)
| 336| 336| {
| 337|    |-	return this.researchQueued.get(tech)
|    | 337|+	return this.researchQueued.get(tech);
| 338| 338| };
| 339| 339| 
| 340| 340| /**

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.

binaries/data/mods/public/simulation/components/TechnologyManager.js
| 337| »   return·this.researchQueued.get(tech)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  97|  97| 
|  98|  98| // Tests if the message is sent when capture points change
|  99|  99| testCapturable(testData, cmpCapturable => {
| 100|    |-	cmpCapturable.SetCapturePoints([0, 2000, 0 , 1000]);
|    | 100|+	cmpCapturable.SetCapturePoints([0, 2000, 0, 1000]);
| 101| 101| 	TS_ASSERT_UNEVAL_EQUALS(cmpCapturable.GetCapturePoints(), [0, 2000, 0, 1000]);
| 102| 102| 	Engine.PostMessage = function(ent, iid, message)
| 103| 103| 	{

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  24| function·testCapturable(testData,·test_function)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 131| function·testRegen(testData,·cpIn,·cpOut,·regenerating)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 156| function·testDecay(testData,·cpIn,·cpOut)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 175| function·testReduce(testData,·amount,·player,·taken)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Pack.js
|  44| »   "SetInterval":·(ent,·iid,·funcname,·time,·repeattime,·data)·=>·{·timerActivated·=·true;·return·7;·}
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Melee'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  43|  43| 	});
|  44|  44| 
|  45|  45| 	let cmpAttack = ConstructComponent(attacker, "Attack", {
|  46|    |-		"Melee" : {
|    |  46|+		"Melee": {
|  47|  47| 			"Hack": 11,
|  48|  48| 			"Pierce": 5,
|  49|  49| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Ranged'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  63|  63| 				}
|  64|  64| 			}
|  65|  65| 		},
|  66|    |-		"Ranged" : {
|    |  66|+		"Ranged": {
|  67|  67| 			"Hack": 0,
|  68|  68| 			"Pierce": 10,
|  69|  69| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Splash'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  80|  80| 			"RestrictedClasses": {
|  81|  81| 				"_string": "Elephant"
|  82|  82| 			},
|  83|    |-			"Splash" : {
|    |  83|+			"Splash": {
|  84|  84| 				"Shape": "Circular",
|  85|  85| 				"Range": 10,
|  86|  86| 				"FriendlyFire": "false",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Capture'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  95|  95| 				}
|  96|  96| 			}
|  97|  97| 		},
|  98|    |-		"Capture" : {
|    |  98|+		"Capture": {
|  99|  99| 			"Value": 8,
| 100| 100| 			"MaxRange": 10,
| 101| 101| 		},
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 126| 126| }
| 127| 127| 
| 128| 128| // Validate template getter functions
| 129|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 129|+attackComponentTest(undefined, true,(attacker, cmpAttack, defender) => {
| 130| 130| 
| 131| 131| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 132| 132| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 126| 126| }
| 127| 127| 
| 128| 128| // Validate template getter functions
| 129|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 129|+attackComponentTest(undefined, true , (attacker, cmpAttack, defender) => {
| 130| 130| 
| 131| 131| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 132| 132| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 149| 149| 		"Pierce": 10,
| 150| 150| 		"Crush": 0
| 151| 151| 	});
| 152|    |-	
|    | 152|+
| 153| 153| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackStrengths("Ranged.Splash"), {
| 154| 154| 		"Hack": 0.0,
| 155| 155| 		"Pierce": 15.0,
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/923/

elexis retitled this revision from Handle modifications of technologies and auras in a centralized system component. to Handle modifications of technologies and auras in a system component.Jan 6 2019, 4:14 PM
wraitii updated this revision to Diff 7911.May 5 2019, 6:07 PM

Rebased, cleaned up, fixed (I had a possible conflict between player IDs and entities). More tests added.

Needs to be checked for performance (empirically) - haven't tested whether this iteration changes hashes though it doesn't handle technologies in exactly the same way so I think it could.

Requires D1858 and D1859 first.

Also I need to check if SVN is actually keeping technologies of the original owner when entities change owner, because I don't think so.

Vulcan added a comment.May 5 2019, 6:13 PM

Build failure - The Moirai have given mortals hearts that can endure.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  32|  32| 			continue;
|  33|  33| 		if (propName in this)
|  34|  34| 			continue;
|  35|    |-		this[propName.replace('Item','Modif')] = ((propName) => () => this.modifsStorage[propName].apply(this.modifsStorage, arguments))(propName);
|    |  35|+		this[propName.replace('Item', 'Modif')] = ((propName) => () => this.modifsStorage[propName].apply(this.modifsStorage, arguments))(propName);
|  36|  36| 	}
|  37|  37| }
|  38|  38| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  34|  34| 			continue;
|  35|  35| 		this[propName.replace('Item','Modif')] = ((propName) => () => this.modifsStorage[propName].apply(this.modifsStorage, arguments))(propName);
|  36|  36| 	}
|  37|    |-}
|    |  37|+};
|  38|  38| 
|  39|  39| ModificationsManager.prototype.Serialize = function()
|  40|  40| {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifsStorage' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  44|  44| 	let players = [];
|  45|  45| 	this.playerEntitiesCached.forEach((_, player) => players.push(player));
|  46|  46| 	return {
|  47|    |-		modifsStorage: this.modifsStorage.Serialize(),
|    |  47|+		"modifsStorage": this.modifsStorage.Serialize(),
|  48|  48| 		players: players
|  49|  49| 	};
|  50|  50| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'players' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  45|  45| 	this.playerEntitiesCached.forEach((_, player) => players.push(player));
|  46|  46| 	return {
|  47|  47| 		modifsStorage: this.modifsStorage.Serialize(),
|  48|    |-		players: players
|    |  48|+		"players": players
|  49|  49| 	};
|  50|  50| }
|  51|  51| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  47|  47| 		modifsStorage: this.modifsStorage.Serialize(),
|  48|  48| 		players: players
|  49|  49| 	};
|  50|    |-}
|    |  50|+};
|  51|  51| 
|  52|  52| ModificationsManager.prototype.Deserialize = function(data)
|  53|  53| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  54|  54| 	this.Init();
|  55|  55| 	this.modifsStorage.Deserialize(data.modifsStorage);
|  56|  56| 	data.players.forEach(player => this.playerEntitiesCached.set(player, new Map()));
|  57|    |-}
|    |  57|+};
|  58|  58| 
|  59|  59| /**
|  60|  60|  * Inform entities that we have changed possibly all values affected by that property.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  70|  70| 		this.SendPlayerModificationMessages(propertyName, cmpPlayer.GetPlayerID());
|  71|  71| 	else
|  72|  72| 		this.SendEntityModificationMessages(propertyName, entity);
|  73|    |-}
|    |  73|+};
|  74|  74| 
|  75|  75| ModificationsManager.prototype.SendEntityModificationMessages = function(propertyName, entity)
|  76|  76| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  76|  76| {
|  77|  77| 	// TODO: if this is slow, it might be more efficient to keep track of who wants our info and post them directly
|  78|  78| 	Engine.BroadcastMessage(MT_ValueModification, { "entities": [entity], "component": propertyName.split("/")[0], "valueNames": [propertyName] });
|  79|    |-}
|    |  79|+};
|  80|  80| 
|  81|  81| ModificationsManager.prototype.SendPlayerModificationMessages = function(propertyName, player)
|  82|  82| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 104| 104| 	let entsMap = this.playerEntitiesCached.get(entity).get(propertyName);
| 105| 105| 	entsMap.forEach(ent => this.cachedValues.get(propertyName).delete(ent));
| 106| 106| 	entsMap.clear();
| 107|    |-}
|    | 107|+};
| 108| 108| 
| 109| 109| ModificationsManager.prototype.InvalidateCache = function(propertyName, entity)
| 110| 110| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 188| 188| 		return undefined;
| 189| 189| 	}
| 190| 190| 
| 191|    |-	let newValue = this.GetCached(propertyName, originalValue, entity)
|    | 191|+	let newValue = this.GetCached(propertyName, originalValue, entity);
| 192| 192| 	if (newValue !== null)
| 193| 193| 		return newValue;
| 194| 194| 

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  35| »   »   this[propName.replace('Item','Modif')]·=·((propName)·=>·()·=>·this.modifsStorage[propName].apply(this.modifsStorage,·arguments))(propName);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'propName' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  37| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  50| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  57| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  73| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  79| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 107| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 191| »   let·newValue·=·this.GetCached(propertyName,·originalValue,·entity)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
|  97|  97| 
|  98|  98| 		// Note: this is not yet implemented but I leave it commented to highlight it's easy
|  99|  99| 		// If anyone ever adds handicap.
| 100|    |-		//if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined)
|    | 100|+		// if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined)
| 101| 101| 		//	cmpPlayer.SetGatherRateMultiplier(getSetting(playerData, playerDefaults, i, "GatherRateMultiplier"));
| 102| 102| 
| 103| 103| 		if (getSetting(playerData, playerDefaults, i, "PopulationLimit") !== undefined)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
| 136| 136| 
| 137| 137| 			// Set all but self as enemies as SetTeam takes care of allies
| 138| 138| 			for (var j = 0; j < numPlayers; ++j)
| 139|    |-			{
|    | 139|+			
| 140| 140| 				if (i == j)
| 141| 141| 					cmpPlayer.SetAlly(j);
| 142| 142| 				else
| 143| 143| 					cmpPlayer.SetEnemy(j);
| 144|    |-			}
|    | 144|+			
| 145| 145| 			cmpPlayer.SetTeam(myTeam === undefined ? -1 : myTeam);
| 146| 146| 		}
| 147| 147| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
| 328| 328| 	return IsOwnedByHelper(player, target, "IsMutualAlly");
| 329| 329| }
| 330| 330| 
| 331|    |-function IsOwnedByNeutralOfPlayer(player,target)
|    | 331|+function IsOwnedByNeutralOfPlayer(player, target)
| 332| 332| {
| 333| 333| 	return IsOwnedByHelper(player, target, "IsNeutral");
| 334| 334| }

binaries/data/mods/public/simulation/helpers/Player.js
|  78| »   »   let·cmpPlayer·=·QueryPlayerIDInterface(i);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'cmpPlayer' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Player.js
| 160| »   »   for·(let·i·=·0;·i·<·numPlayers;·++i)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'i' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Player.js
|  67| »   »   var·entID·=·cmpPlayerManager.GetPlayerByID(i);
|    | [NORMAL] JSHintBear:
|    | 'entID' is already defined.

binaries/data/mods/public/simulation/helpers/Player.js
|  76| »   for·(var·i·=·0;·i·<·numPlayers;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/helpers/Player.js
| 138| »   »   »   for·(var·j·=·0;·j·<·numPlayers;·++j)
|    | [NORMAL] JSHintBear:
|    | 'j' is already defined.
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'name'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  15|  15| };
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|    |-	"GetTemplate": (name) =>  name == "special/spy" ?
|    |  18|+	"GetTemplate": (name) => name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|    |-	({ "Cost": { "Resources": { "wood": 1000 } },
|    |  19|+		({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|    |  20|+			"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|  23|  23| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  21|+		: ({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | ':' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  20|+		"VisionSharing": { "Duration": 15 } }) :
|    |  21|+	({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  62|  62| });
|  63|  63| Engine.PostMessage = function(id, iid, message)
|  64|  64| {
|  65|    |-TS_ASSERT(false); // One doesn't send message
|    |  65|+	TS_ASSERT(false); // One doesn't send message
|  66|  66| };
|  67|  67| cmpVisionSharing.CheckVisionSharings();
|  68|  68| TS_ASSERT_UNEVAL_EQUALS(cmpVisionSharing.shared, new Set([1]));

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 124| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 136| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 157| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·25·*·1000)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 171| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·15·*·1000·*·60·/·48)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerChanged({ "player": PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, "from": -1, to: PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, "to": PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 112| 112| TS_ASSERT(cmpModificationsManager.HasModif("Test_C", "Test_C_3", PLAYER_ENTITY_ID));
| 113| 113| TS_ASSERT(!cmpModificationsManager.HasModif("Test_C", "Test_C_2", 5));
| 114| 114| 
| 115|    |-//////////////////////////////////////////
|    | 115|+// ////////////////////////////////////////
| 116| 116| // Test that entities keep local modifications but not global ones when changing owner.
| 117| 117| AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 118| 118| 	"GetPlayerByID": (a) => a == PLAYER_ID_FOR_TEST ? PLAYER_ENTITY_ID : PLAYER_ENTITY_ID + 1
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 129| 129| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 131| 131| 
| 132|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 132|+cmpModificationsManager.OnGlobalPlayerChanged({ "player": PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 129| 129| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 131| 131| 
| 132|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 132|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, "from": -1, to: PLAYER_ENTITY_ID });
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 129| 129| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 131| 131| 
| 132|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 132|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, "to": PLAYER_ENTITY_ID });
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 131| 131| 
| 132| 132| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 133|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 133|+cmpModificationsManager.OnGlobalPlayerChanged({ "player": PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
| 136| 136| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 131| 131| 
| 132| 132| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 133|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 133|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, "from": -1, to: PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
| 136| 136| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 131| 131| 
| 132| 132| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 133|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 133|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, "to": PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
| 136| 136| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'entity' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
| 136|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 136|+cmpModificationsManager.OnGlobalOwnershipChanged({ "entity": 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
| 137| 137| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 16);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
| 136|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 136|+cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, "from": PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
| 137| 137| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 16);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 134| 134| 
| 135| 135| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 25);
| 136|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 136|+cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, "to": PLAYER_ID_FOR_TEST + 1 });
| 137| 137| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 5, 10), 16);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  23|  23| 
|  24|  24| 	let cmpDamage = ConstructComponent(SYSTEM_ENTITY, "Damage");
|  25|  25| 	let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer");
|  26|    |-	cmpTimer.OnUpdate({ turnLength: 1 });
|    |  26|+	cmpTimer.OnUpdate({ "turnLength": 1 });
|  27|  27| 	let attacker = 11;
|  28|  28| 	let atkPlayerEntity = 1;
|  29|  29| 	let attackerOwner = 6;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  61|  61| 		"position": targetPos,
|  62|  62| 		"isSplash": false,
|  63|  63| 		"projectileId": 9,
|  64|    |-		"direction": new Vector3D(1,0,0)
|    |  64|+		"direction": new Vector3D(1, 0,0)
|  65|  65| 	};
|  66|  66| 
|  67|  67| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  61|  61| 		"position": targetPos,
|  62|  62| 		"isSplash": false,
|  63|  63| 		"projectileId": 9,
|  64|    |-		"direction": new Vector3D(1,0,0)
|    |  64|+		"direction": new Vector3D(1,0, 0)
|  65|  65| 	};
|  66|  66| 
|  67|  67| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 112| 112| 
| 113| 113| 	function TestDamage()
| 114| 114| 	{
| 115|    |-		cmpTimer.OnUpdate({ turnLength: 1 });
|    | 115|+		cmpTimer.OnUpdate({ "turnLength": 1 });
| 116| 116| 		TS_ASSERT(damageTaken);
| 117| 117| 		damageTaken = false;
| 118| 118| 	}
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 154| 154| 		"origin": origin,
| 155| 155| 		"radius": 10,
| 156| 156| 		"shape": "Linear",
| 157|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 157|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 158| 158| 		"direction": new Vector3D(1, 747, 0),
| 159| 159| 		"playersToDamage": [2],
| 160| 160| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 154| 154| 		"origin": origin,
| 155| 155| 		"radius": 10,
| 156| 156| 		"shape": "Linear",
| 157|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 157|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 158| 158| 		"direction": new Vector3D(1, 747, 0),
| 159| 159| 		"playersToDamage": [2],
| 160| 160| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 161| 161| 		"attackerOwner": attackerOwner
| 162| 162| 	};
| 163| 163| 
| 164|    |-	let fallOff = function(x,y)
|    | 164|+	let fallOff = function(x, y)
| 165| 165| 	{
| 166| 166| 		return (1 - x * x / (data.radius * data.radius)) * (1 - 25 * y * y / (data.radius * data.radius));
| 167| 167| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 313| 313| 		"origin": new Vector2D(3, 4),
| 314| 314| 		"radius": radius,
| 315| 315| 		"shape": "Circular",
| 316|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 316|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 317| 317| 		"playersToDamage": [2],
| 318| 318| 		"type": "Ranged",
| 319| 319| 		"attackerOwner": 1
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 313| 313| 		"origin": new Vector2D(3, 4),
| 314| 314| 		"radius": radius,
| 315| 315| 		"shape": "Circular",
| 316|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 316|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 317| 317| 		"playersToDamage": [2],
| 318| 318| 		"type": "Ranged",
| 319| 319| 		"attackerOwner": 1

binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 123| »   type·=·data.type·=·"Ranged";
|    | [NORMAL] ESLintBear (no-multi-assign):
|    | Unexpected chained assignment.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 168| 168| 		var classes = cmpIdentity.GetClassesList();
| 169| 169| 		// don't use foundations for the class counts but check if techs apply (e.g. health increase)
| 170| 170| 		if (!Engine.QueryInterface(msg.entity, IID_Foundation))
| 171|    |-		{
|    | 171|+		
| 172| 172| 			for (let cls of classes)
| 173| 173| 			{
| 174| 174| 				this.classCounts[cls] = this.classCounts[cls] || 0;
| 178| 178| 				this.typeCountsByClass[cls][template] = this.typeCountsByClass[cls][template] || 0;
| 179| 179| 				this.typeCountsByClass[cls][template] += 1;
| 180| 180| 			}
| 181|    |-		}
|    | 181|+		
| 182| 182| 	}
| 183| 183| 	if (msg.from == playerID)
| 184| 184| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 227| 227| 	}
| 228| 228| 
| 229| 229| 	if (template.replaces && template.replaces.length > 0)
| 230|    |-	{
|    | 230|+	
| 231| 231| 		for (var i of template.replaces)
| 232| 232| 		{
| 233| 233| 			if (!i || this.IsTechnologyResearched(i))
| 245| 245| 					cmpPlayerEntityLimits.UpdateLimitsFromTech(i);
| 246| 246| 			}
| 247| 247| 		}
| 248|    |-	}
|    | 248|+	
| 249| 249| 
| 250| 250| 	this.UpdateAutoResearch();
| 251| 251| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, { "player": playerID, "tech": tech});
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech });
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 334| 334|  */
| 335| 335| TechnologyManager.prototype.GetResearcher = function(tech)
| 336| 336| {
| 337|    |-	return this.researchQueued.get(tech)
|    | 337|+	return this.researchQueued.get(tech);
| 338| 338| };
| 339| 339| 
| 340| 340| /**

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.

binaries/data/mods/public/simulation/components/TechnologyManager.js
| 337| »   return·this.researchQueued.get(tech)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  97|  97| 
|  98|  98| // Tests if the message is sent when capture points change
|  99|  99| testCapturable(testData, cmpCapturable => {
| 100|    |-	cmpCapturable.SetCapturePoints([0, 2000, 0 , 1000]);
|    | 100|+	cmpCapturable.SetCapturePoints([0, 2000, 0, 1000]);
| 101| 101| 	TS_ASSERT_UNEVAL_EQUALS(cmpCapturable.GetCapturePoints(), [0, 2000, 0, 1000]);
| 102| 102| 	Engine.PostMessage = function(ent, iid, message)
| 103| 103| 	{

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  24| function·testCapturable(testData,·test_function)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 131| function·testRegen(testData,·cpIn,·cpOut,·regenerating)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 156| function·testDecay(testData,·cpIn,·cpOut)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 175| function·testReduce(testData,·amount,·player,·taken)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_UpgradeModification.js
|  92| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template,·player)·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Pack.js
|  44| »   "SetInterval":·(ent,·iid,·funcname,·time,·repeattime,·data)·=>·{·timerActivated·=·true;·return·7;·}
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerChanged({ "player": playerID[1], from: -1, to: playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], "from": -1, to: playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, "to": playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerChanged({ "player": playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], "from": -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, "to": playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }

binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  21| »   »   let·template·=·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Melee'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  43|  43| 	});
|  44|  44| 
|  45|  45| 	let cmpAttack = ConstructComponent(attacker, "Attack", {
|  46|    |-		"Melee" : {
|    |  46|+		"Melee": {
|  47|  47| 			"Hack": 11,
|  48|  48| 			"Pierce": 5,
|  49|  49| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Ranged'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  63|  63| 				}
|  64|  64| 			}
|  65|  65| 		},
|  66|    |-		"Ranged" : {
|    |  66|+		"Ranged": {
|  67|  67| 			"Hack": 0,
|  68|  68| 			"Pierce": 10,
|  69|  69| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Splash'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  82|  82| 			"RestrictedClasses": {
|  83|  83| 				"_string": "Elephant"
|  84|  84| 			},
|  85|    |-			"Splash" : {
|    |  85|+			"Splash": {
|  86|  86| 				"Shape": "Circular",
|  87|  87| 				"Range": 10,
|  88|  88| 				"FriendlyFire": "false",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Capture'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  97|  97| 				}
|  98|  98| 			}
|  99|  99| 		},
| 100|    |-		"Capture" : {
|    | 100|+		"Capture": {
| 101| 101| 			"Value": 8,
| 102| 102| 			"MaxRange": 10,
| 103| 103| 		},
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 128| 128| }
| 129| 129| 
| 130| 130| // Validate template getter functions
| 131|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 131|+attackComponentTest(undefined, true,(attacker, cmpAttack, defender) => {
| 132| 132| 
| 133| 133| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 134| 134| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 128| 128| }
| 129| 129| 
| 130| 130| // Validate template getter functions
| 131|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 131|+attackComponentTest(undefined, true , (attacker, cmpAttack, defender) => {
| 132| 132| 
| 133| 133| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 134| 134| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 151| 151| 		"Pierce": 10,
| 152| 152| 		"Crush": 0
| 153| 153| 	});
| 154|    |-	
|    | 154|+
| 155| 155| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackStrengths("Ranged.Splash"), {
| 156| 156| 		"Hack": 0.0,
| 157| 157| 		"Pierce": 15.0,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 338| 338| 		return;
| 339| 339| 
| 340| 340| 	let derivedModifiers = DeriveModificationsFromTech({
| 341|    |-		modifications: this.GetModifications(name),
|    | 341|+		"modifications": this.GetModifications(name),
| 342| 342| 		affects: this.GetClasses(name)
| 343| 343| 	});
| 344| 344| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 339| 339| 
| 340| 340| 	let derivedModifiers = DeriveModificationsFromTech({
| 341| 341| 		modifications: this.GetModifications(name),
| 342|    |-		affects: this.GetClasses(name)
|    | 342|+		"affects": this.GetClasses(name)
| 343| 343| 	});
| 344| 344| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 345| 345| 	let cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 369| 369| 		return;
| 370| 370| 
| 371| 371| 	let derivedModifiers = DeriveModificationsFromTech({
| 372|    |-		modifications: this.GetModifications(name),
|    | 372|+		"modifications": this.GetModifications(name),
| 373| 373| 		affects: this.GetClasses(name)
| 374| 374| 	});
| 375| 375| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 370| 370| 
| 371| 371| 	let derivedModifiers = DeriveModificationsFromTech({
| 372| 372| 		modifications: this.GetModifications(name),
| 373|    |-		affects: this.GetClasses(name)
|    | 373|+		"affects": this.GetClasses(name)
| 374| 374| 	});
| 375| 375| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 376| 376| 	let cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 392| 392| 		return;
| 393| 393| 
| 394| 394| 	// update status bars if this has an icon
| 395|    |-	if (this.GetOverlayIcon(name)) {
|    | 395|+	if (this.GetOverlayIcon(name)) 
| 396| 396| 		for (let ent of validEnts)
| 397| 397| 		{
| 398| 398| 			let cmpStatusBars = Engine.QueryInterface(ent, IID_StatusBars);
| 399| 399| 			if (cmpStatusBars)
| 400| 400| 				cmpStatusBars.AddAuraSource(this.entity, name);
| 401| 401| 		}
| 402|    |-	}
|    | 402|+	
| 403| 403| 
| 404| 404| 	// Global aura modifications are handled at the player level by the modification manager.
| 405| 405| 	if (this.IsGlobalAura(name))
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 408| 408| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 409| 409| 
| 410| 410| 	let derivedModifiers = DeriveModificationsFromTech({
| 411|    |-		modifications: this.GetModifications(name),
|    | 411|+		"modifications": this.GetModifications(name),
| 412| 412| 		affects: this.GetClasses(name)
| 413| 413| 	});
| 414| 414| 	for (let ent of validEnts)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 409| 409| 
| 410| 410| 	let derivedModifiers = DeriveModificationsFromTech({
| 411| 411| 		modifications: this.GetModifications(name),
| 412|    |-		affects: this.GetClasses(name)
|    | 412|+		"affects": this.GetClasses(name)
| 413| 413| 	});
| 414| 414| 	for (let ent of validEnts)
| 415| 415| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 430| 430| 		return;
| 431| 431| 
| 432| 432| 	// update status bars if this has an icon
| 433|    |-	if (this.GetOverlayIcon(name)) {
|    | 433|+	if (this.GetOverlayIcon(name)) 
| 434| 434| 		for (let ent of validEnts)
| 435| 435| 		{
| 436| 436| 			let cmpStatusBars = Engine.QueryInterface(ent, IID_StatusBars);
| 437| 437| 			if (cmpStatusBars)
| 438| 438| 				cmpStatusBars.RemoveAuraSource(this.entity, name);
| 439| 439| 		}
| 440|    |-	}
|    | 440|+	
| 441| 441| 
| 442| 442| 	// Global aura modifications are handled at the player level by the modification manager.
| 443| 443| 	if (this.IsGlobalAura(name))
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 446| 446| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 447| 447| 
| 448| 448| 	let derivedModifiers = DeriveModificationsFromTech({
| 449|    |-		modifications: this.GetModifications(name),
|    | 449|+		"modifications": this.GetModifications(name),
| 450| 450| 		affects: this.GetClasses(name)
| 451| 451| 	});
| 452| 452| 	for (let ent of ents)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 447| 447| 
| 448| 448| 	let derivedModifiers = DeriveModificationsFromTech({
| 449| 449| 		modifications: this.GetModifications(name),
| 450|    |-		affects: this.GetClasses(name)
|    | 450|+		"affects": this.GetClasses(name)
| 451| 451| 	});
| 452| 452| 	for (let ent of ents)
| 453| 453| 		for (let modifierPath in derivedModifiers)

binaries/data/mods/public/simulation/components/Auras.js
| 395| »   if·(this.GetOverlayIcon(name))·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Auras.js
| 433| »   if·(this.GetOverlayIcon(name))·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1329/display/redirect

wraitii updated this revision to Diff 7914.May 5 2019, 7:26 PM

Fix tests as I didn't realise I had broken components test earlier.
I can confirm that this does change hashes, I might be able to fix that with a better simulation of tech's messaging.

Vulcan added a comment.May 5 2019, 7:28 PM

Build failure - The Moirai have given mortals hearts that can endure.

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerChanged({ "player": PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, "from": -1, to: PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, "to": PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 113| 113| TS_ASSERT(cmpModificationsManager.HasModif("Test_C", "Test_C_3", PLAYER_ENTITY_ID));
| 114| 114| TS_ASSERT(!cmpModificationsManager.HasModif("Test_C", "Test_C_2", 5));
| 115| 115| 
| 116|    |-//////////////////////////////////////////
|    | 116|+// ////////////////////////////////////////
| 117| 117| // Test that entities keep local modifications but not global ones when changing owner.
| 118| 118| AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 119| 119| 	"GetPlayerByID": (a) => a == PLAYER_ID_FOR_TEST ? PLAYER_ENTITY_ID : PLAYER_ENTITY_ID + 1
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerChanged({ "player": PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, "from": -1, to: PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, "to": PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerChanged({ "player": PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, "from": -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, "to": PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'entity' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ "entity": 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, "from": PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, "to": PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'name'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  15|  15| };
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|    |-	"GetTemplate": (name) =>  name == "special/spy" ?
|    |  18|+	"GetTemplate": (name) => name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|    |-	({ "Cost": { "Resources": { "wood": 1000 } },
|    |  19|+		({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|    |  20|+			"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|  23|  23| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  21|+		: ({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | ':' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  20|+		"VisionSharing": { "Duration": 15 } }) :
|    |  21|+	({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  62|  62| });
|  63|  63| Engine.PostMessage = function(id, iid, message)
|  64|  64| {
|  65|    |-TS_ASSERT(false); // One doesn't send message
|    |  65|+	TS_ASSERT(false); // One doesn't send message
|  66|  66| };
|  67|  67| cmpVisionSharing.CheckVisionSharings();
|  68|  68| TS_ASSERT_UNEVAL_EQUALS(cmpVisionSharing.shared, new Set([1]));

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 124| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 136| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 157| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·25·*·1000)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 171| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·15·*·1000·*·60·/·48)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Melee'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  43|  43| 	});
|  44|  44| 
|  45|  45| 	let cmpAttack = ConstructComponent(attacker, "Attack", {
|  46|    |-		"Melee" : {
|    |  46|+		"Melee": {
|  47|  47| 			"Hack": 11,
|  48|  48| 			"Pierce": 5,
|  49|  49| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Ranged'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  63|  63| 				}
|  64|  64| 			}
|  65|  65| 		},
|  66|    |-		"Ranged" : {
|    |  66|+		"Ranged": {
|  67|  67| 			"Hack": 0,
|  68|  68| 			"Pierce": 10,
|  69|  69| 			"Crush": 0,
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Splash'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  82|  82| 			"RestrictedClasses": {
|  83|  83| 				"_string": "Elephant"
|  84|  84| 			},
|  85|    |-			"Splash" : {
|    |  85|+			"Splash": {
|  86|  86| 				"Shape": "Circular",
|  87|  87| 				"Range": 10,
|  88|  88| 				"FriendlyFire": "false",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'Capture'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|  97|  97| 				}
|  98|  98| 			}
|  99|  99| 		},
| 100|    |-		"Capture" : {
|    | 100|+		"Capture": {
| 101| 101| 			"Value": 8,
| 102| 102| 			"MaxRange": 10,
| 103| 103| 		},
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 128| 128| }
| 129| 129| 
| 130| 130| // Validate template getter functions
| 131|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 131|+attackComponentTest(undefined, true,(attacker, cmpAttack, defender) => {
| 132| 132| 
| 133| 133| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 134| 134| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 128| 128| }
| 129| 129| 
| 130| 130| // Validate template getter functions
| 131|    |-attackComponentTest(undefined, true ,(attacker, cmpAttack, defender) => {
|    | 131|+attackComponentTest(undefined, true , (attacker, cmpAttack, defender) => {
| 132| 132| 
| 133| 133| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes(), ["Melee", "Ranged", "Capture"]);
| 134| 134| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackTypes([]), ["Melee", "Ranged", "Capture"]);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Attack.js
| 151| 151| 		"Pierce": 10,
| 152| 152| 		"Crush": 0
| 153| 153| 	});
| 154|    |-	
|    | 154|+
| 155| 155| 	TS_ASSERT_UNEVAL_EQUALS(cmpAttack.GetAttackStrengths("Ranged.Splash"), {
| 156| 156| 		"Hack": 0.0,
| 157| 157| 		"Pierce": 15.0,
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerChanged({ "player": playerID[1], from: -1, to: playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], "from": -1, to: playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, "to": playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerChanged({ "player": playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], "from": -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerChanged({ player: playerID[2], from: -1, "to": playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }

binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  21| »   »   let·template·=·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 338| 338| 		return;
| 339| 339| 
| 340| 340| 	let derivedModifiers = DeriveModificationsFromTech({
| 341|    |-		modifications: this.GetModifications(name),
|    | 341|+		"modifications": this.GetModifications(name),
| 342| 342| 		affects: this.GetClasses(name)
| 343| 343| 	});
| 344| 344| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 339| 339| 
| 340| 340| 	let derivedModifiers = DeriveModificationsFromTech({
| 341| 341| 		modifications: this.GetModifications(name),
| 342|    |-		affects: this.GetClasses(name)
|    | 342|+		"affects": this.GetClasses(name)
| 343| 343| 	});
| 344| 344| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 345| 345| 	let cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 369| 369| 		return;
| 370| 370| 
| 371| 371| 	let derivedModifiers = DeriveModificationsFromTech({
| 372|    |-		modifications: this.GetModifications(name),
|    | 372|+		"modifications": this.GetModifications(name),
| 373| 373| 		affects: this.GetClasses(name)
| 374| 374| 	});
| 375| 375| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 370| 370| 
| 371| 371| 	let derivedModifiers = DeriveModificationsFromTech({
| 372| 372| 		modifications: this.GetModifications(name),
| 373|    |-		affects: this.GetClasses(name)
|    | 373|+		"affects": this.GetClasses(name)
| 374| 374| 	});
| 375| 375| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 376| 376| 	let cmpPlayerManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_PlayerManager);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 392| 392| 		return;
| 393| 393| 
| 394| 394| 	// update status bars if this has an icon
| 395|    |-	if (this.GetOverlayIcon(name)) {
|    | 395|+	if (this.GetOverlayIcon(name)) 
| 396| 396| 		for (let ent of validEnts)
| 397| 397| 		{
| 398| 398| 			let cmpStatusBars = Engine.QueryInterface(ent, IID_StatusBars);
| 399| 399| 			if (cmpStatusBars)
| 400| 400| 				cmpStatusBars.AddAuraSource(this.entity, name);
| 401| 401| 		}
| 402|    |-	}
|    | 402|+	
| 403| 403| 
| 404| 404| 	// Global aura modifications are handled at the player level by the modification manager.
| 405| 405| 	if (this.IsGlobalAura(name))
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 408| 408| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 409| 409| 
| 410| 410| 	let derivedModifiers = DeriveModificationsFromTech({
| 411|    |-		modifications: this.GetModifications(name),
|    | 411|+		"modifications": this.GetModifications(name),
| 412| 412| 		affects: this.GetClasses(name)
| 413| 413| 	});
| 414| 414| 	for (let ent of validEnts)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 409| 409| 
| 410| 410| 	let derivedModifiers = DeriveModificationsFromTech({
| 411| 411| 		modifications: this.GetModifications(name),
| 412|    |-		affects: this.GetClasses(name)
|    | 412|+		"affects": this.GetClasses(name)
| 413| 413| 	});
| 414| 414| 	for (let ent of validEnts)
| 415| 415| 		for (let modifierPath in derivedModifiers)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 430| 430| 		return;
| 431| 431| 
| 432| 432| 	// update status bars if this has an icon
| 433|    |-	if (this.GetOverlayIcon(name)) {
|    | 433|+	if (this.GetOverlayIcon(name)) 
| 434| 434| 		for (let ent of validEnts)
| 435| 435| 		{
| 436| 436| 			let cmpStatusBars = Engine.QueryInterface(ent, IID_StatusBars);
| 437| 437| 			if (cmpStatusBars)
| 438| 438| 				cmpStatusBars.RemoveAuraSource(this.entity, name);
| 439| 439| 		}
| 440|    |-	}
|    | 440|+	
| 441| 441| 
| 442| 442| 	// Global aura modifications are handled at the player level by the modification manager.
| 443| 443| 	if (this.IsGlobalAura(name))
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifications' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 446| 446| 	let cmpModificationsManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ModificationsManager);
| 447| 447| 
| 448| 448| 	let derivedModifiers = DeriveModificationsFromTech({
| 449|    |-		modifications: this.GetModifications(name),
|    | 449|+		"modifications": this.GetModifications(name),
| 450| 450| 		affects: this.GetClasses(name)
| 451| 451| 	});
| 452| 452| 	for (let ent of ents)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'affects' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Auras.js
| 447| 447| 
| 448| 448| 	let derivedModifiers = DeriveModificationsFromTech({
| 449| 449| 		modifications: this.GetModifications(name),
| 450|    |-		affects: this.GetClasses(name)
|    | 450|+		"affects": this.GetClasses(name)
| 451| 451| 	});
| 452| 452| 	for (let ent of ents)
| 453| 453| 		for (let modifierPath in derivedModifiers)

binaries/data/mods/public/simulation/components/Auras.js
| 395| »   if·(this.GetOverlayIcon(name))·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/Auras.js
| 433| »   if·(this.GetOverlayIcon(name))·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
|  97|  97| 
|  98|  98| 		// Note: this is not yet implemented but I leave it commented to highlight it's easy
|  99|  99| 		// If anyone ever adds handicap.
| 100|    |-		//if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined)
|    | 100|+		// if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined)
| 101| 101| 		//	cmpPlayer.SetGatherRateMultiplier(getSetting(playerData, playerDefaults, i, "GatherRateMultiplier"));
| 102| 102| 
| 103| 103| 		if (getSetting(playerData, playerDefaults, i, "PopulationLimit") !== undefined)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
| 136| 136| 
| 137| 137| 			// Set all but self as enemies as SetTeam takes care of allies
| 138| 138| 			for (var j = 0; j < numPlayers; ++j)
| 139|    |-			{
|    | 139|+			
| 140| 140| 				if (i == j)
| 141| 141| 					cmpPlayer.SetAlly(j);
| 142| 142| 				else
| 143| 143| 					cmpPlayer.SetEnemy(j);
| 144|    |-			}
|    | 144|+			
| 145| 145| 			cmpPlayer.SetTeam(myTeam === undefined ? -1 : myTeam);
| 146| 146| 		}
| 147| 147| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Player.js
| 328| 328| 	return IsOwnedByHelper(player, target, "IsMutualAlly");
| 329| 329| }
| 330| 330| 
| 331|    |-function IsOwnedByNeutralOfPlayer(player,target)
|    | 331|+function IsOwnedByNeutralOfPlayer(player, target)
| 332| 332| {
| 333| 333| 	return IsOwnedByHelper(player, target, "IsNeutral");
| 334| 334| }

binaries/data/mods/public/simulation/helpers/Player.js
|  78| »   »   let·cmpPlayer·=·QueryPlayerIDInterface(i);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'cmpPlayer' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Player.js
| 160| »   »   for·(let·i·=·0;·i·<·numPlayers;·++i)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'i' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Player.js
|  67| »   »   var·entID·=·cmpPlayerManager.GetPlayerByID(i);
|    | [NORMAL] JSHintBear:
|    | 'entID' is already defined.

binaries/data/mods/public/simulation/helpers/Player.js
|  76| »   for·(var·i·=·0;·i·<·numPlayers;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/helpers/Player.js
| 138| »   »   »   for·(var·j·=·0;·j·<·numPlayers;·++j)
|    | [NORMAL] JSHintBear:
|    | 'j' is already defined.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  23|  23| 
|  24|  24| 	let cmpDamage = ConstructComponent(SYSTEM_ENTITY, "Damage");
|  25|  25| 	let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer");
|  26|    |-	cmpTimer.OnUpdate({ turnLength: 1 });
|    |  26|+	cmpTimer.OnUpdate({ "turnLength": 1 });
|  27|  27| 	let attacker = 11;
|  28|  28| 	let atkPlayerEntity = 1;
|  29|  29| 	let attackerOwner = 6;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  61|  61| 		"position": targetPos,
|  62|  62| 		"isSplash": false,
|  63|  63| 		"projectileId": 9,
|  64|    |-		"direction": new Vector3D(1,0,0)
|    |  64|+		"direction": new Vector3D(1, 0,0)
|  65|  65| 	};
|  66|  66| 
|  67|  67| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  61|  61| 		"position": targetPos,
|  62|  62| 		"isSplash": false,
|  63|  63| 		"projectileId": 9,
|  64|    |-		"direction": new Vector3D(1,0,0)
|    |  64|+		"direction": new Vector3D(1,0, 0)
|  65|  65| 	};
|  66|  66| 
|  67|  67| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 112| 112| 
| 113| 113| 	function TestDamage()
| 114| 114| 	{
| 115|    |-		cmpTimer.OnUpdate({ turnLength: 1 });
|    | 115|+		cmpTimer.OnUpdate({ "turnLength": 1 });
| 116| 116| 		TS_ASSERT(damageTaken);
| 117| 117| 		damageTaken = false;
| 118| 118| 	}
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 154| 154| 		"origin": origin,
| 155| 155| 		"radius": 10,
| 156| 156| 		"shape": "Linear",
| 157|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 157|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 158| 158| 		"direction": new Vector3D(1, 747, 0),
| 159| 159| 		"playersToDamage": [2],
| 160| 160| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 154| 154| 		"origin": origin,
| 155| 155| 		"radius": 10,
| 156| 156| 		"shape": "Linear",
| 157|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 157|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 158| 158| 		"direction": new Vector3D(1, 747, 0),
| 159| 159| 		"playersToDamage": [2],
| 160| 160| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 161| 161| 		"attackerOwner": attackerOwner
| 162| 162| 	};
| 163| 163| 
| 164|    |-	let fallOff = function(x,y)
|    | 164|+	let fallOff = function(x, y)
| 165| 165| 	{
| 166| 166| 		return (1 - x * x / (data.radius * data.radius)) * (1 - 25 * y * y / (data.radius * data.radius));
| 167| 167| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 313| 313| 		"origin": new Vector2D(3, 4),
| 314| 314| 		"radius": radius,
| 315| 315| 		"shape": "Circular",
| 316|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 316|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 317| 317| 		"playersToDamage": [2],
| 318| 318| 		"type": "Ranged",
| 319| 319| 		"attackerOwner": 1
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 313| 313| 		"origin": new Vector2D(3, 4),
| 314| 314| 		"radius": radius,
| 315| 315| 		"shape": "Circular",
| 316|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 316|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 317| 317| 		"playersToDamage": [2],
| 318| 318| 		"type": "Ranged",
| 319| 319| 		"attackerOwner": 1

binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 123| »   type·=·data.type·=·"Ranged";
|    | [NORMAL] ESLintBear (no-multi-assign):
|    | Unexpected chained assignment.
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  97|  97| 
|  98|  98| // Tests if the message is sent when capture points change
|  99|  99| testCapturable(testData, cmpCapturable => {
| 100|    |-	cmpCapturable.SetCapturePoints([0, 2000, 0 , 1000]);
|    | 100|+	cmpCapturable.SetCapturePoints([0, 2000, 0, 1000]);
| 101| 101| 	TS_ASSERT_UNEVAL_EQUALS(cmpCapturable.GetCapturePoints(), [0, 2000, 0, 1000]);
| 102| 102| 	Engine.PostMessage = function(ent, iid, message)
| 103| 103| 	{

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  24| function·testCapturable(testData,·test_function)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 131| function·testRegen(testData,·cpIn,·cpOut,·regenerating)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 156| function·testDecay(testData,·cpIn,·cpOut)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 175| function·testReduce(testData,·amount,·player,·taken)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_UpgradeModification.js
|  92| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template,·player)·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Pack.js
|  44| »   "SetInterval":·(ent,·iid,·funcname,·time,·repeattime,·data)·=>·{·timerActivated·=·true;·return·7;·}
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  32|  32| 			continue;
|  33|  33| 		if (propName in this)
|  34|  34| 			continue;
|  35|    |-		this[propName.replace('Item','Modif')] = ((propName) => () => this.modifsStorage[propName].apply(this.modifsStorage, arguments))(propName);
|    |  35|+		this[propName.replace('Item', 'Modif')] = ((propName) => () => this.modifsStorage[propName].apply(this.modifsStorage, arguments))(propName);
|  36|  36| 	}
|  37|  37| }
|  38|  38| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  34|  34| 			continue;
|  35|  35| 		this[propName.replace('Item','Modif')] = ((propName) => () => this.modifsStorage[propName].apply(this.modifsStorage, arguments))(propName);
|  36|  36| 	}
|  37|    |-}
|    |  37|+};
|  38|  38| 
|  39|  39| ModificationsManager.prototype.Serialize = function()
|  40|  40| {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'modifsStorage' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  44|  44| 	let players = [];
|  45|  45| 	this.playerEntitiesCached.forEach((_, player) => players.push(player));
|  46|  46| 	return {
|  47|    |-		modifsStorage: this.modifsStorage.Serialize(),
|    |  47|+		"modifsStorage": this.modifsStorage.Serialize(),
|  48|  48| 		players: players
|  49|  49| 	};
|  50|  50| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'players' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  45|  45| 	this.playerEntitiesCached.forEach((_, player) => players.push(player));
|  46|  46| 	return {
|  47|  47| 		modifsStorage: this.modifsStorage.Serialize(),
|  48|    |-		players: players
|    |  48|+		"players": players
|  49|  49| 	};
|  50|  50| }
|  51|  51| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  47|  47| 		modifsStorage: this.modifsStorage.Serialize(),
|  48|  48| 		players: players
|  49|  49| 	};
|  50|    |-}
|    |  50|+};
|  51|  51| 
|  52|  52| ModificationsManager.prototype.Deserialize = function(data)
|  53|  53| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  54|  54| 	this.Init();
|  55|  55| 	this.modifsStorage.Deserialize(data.modifsStorage);
|  56|  56| 	data.players.forEach(player => this.playerEntitiesCached.set(player, new Map()));
|  57|    |-}
|    |  57|+};
|  58|  58| 
|  59|  59| /**
|  60|  60|  * Inform entities that we have changed possibly all values affected by that property.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  70|  70| 		this.SendPlayerModificationMessages(propertyName, cmpPlayer.GetPlayerID());
|  71|  71| 	else
|  72|  72| 		this.SendEntityModificationMessages(propertyName, entity);
|  73|    |-}
|    |  73|+};
|  74|  74| 
|  75|  75| ModificationsManager.prototype.SendEntityModificationMessages = function(propertyName, entity)
|  76|  76| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|  76|  76| {
|  77|  77| 	// TODO: if this is slow, it might be more efficient to keep track of who wants our info and post them directly
|  78|  78| 	Engine.BroadcastMessage(MT_ValueModification, { "entities": [entity], "component": propertyName.split("/")[0], "valueNames": [propertyName] });
|  79|    |-}
|    |  79|+};
|  80|  80| 
|  81|  81| ModificationsManager.prototype.SendPlayerModificationMessages = function(propertyName, player)
|  82|  82| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 104| 104| 	let entsMap = this.playerEntitiesCached.get(entity).get(propertyName);
| 105| 105| 	entsMap.forEach(ent => this.cachedValues.get(propertyName).delete(ent));
| 106| 106| 	entsMap.clear();
| 107|    |-}
|    | 107|+};
| 108| 108| 
| 109| 109| ModificationsManager.prototype.InvalidateCache = function(propertyName, entity)
| 110| 110| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/ModificationsManager.js
| 188| 188| 		return undefined;
| 189| 189| 	}
| 190| 190| 
| 191|    |-	let newValue = this.GetCached(propertyName, originalValue, entity)
|    | 191|+	let newValue = this.GetCached(propertyName, originalValue, entity);
| 192| 192| 	if (newValue !== null)
| 193| 193| 		return newValue;
| 194| 194| 

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  35| »   »   this[propName.replace('Item','Modif')]·=·((propName)·=>·()·=>·this.modifsStorage[propName].apply(this.modifsStorage,·arguments))(propName);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'propName' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  37| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  50| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  57| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  73| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
|  79| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 107| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/ModificationsManager.js
| 191| »   let·newValue·=·this.GetCached(propertyName,·originalValue,·entity)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 168| 168| 		var classes = cmpIdentity.GetClassesList();
| 169| 169| 		// don't use foundations for the class counts but check if techs apply (e.g. health increase)
| 170| 170| 		if (!Engine.QueryInterface(msg.entity, IID_Foundation))
| 171|    |-		{
|    | 171|+		
| 172| 172| 			for (let cls of classes)
| 173| 173| 			{
| 174| 174| 				this.classCounts[cls] = this.classCounts[cls] || 0;
| 178| 178| 				this.typeCountsByClass[cls][template] = this.typeCountsByClass[cls][template] || 0;
| 179| 179| 				this.typeCountsByClass[cls][template] += 1;
| 180| 180| 			}
| 181|    |-		}
|    | 181|+		
| 182| 182| 	}
| 183| 183| 	if (msg.from == playerID)
| 184| 184| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 227| 227| 	}
| 228| 228| 
| 229| 229| 	if (template.replaces && template.replaces.length > 0)
| 230|    |-	{
|    | 230|+	
| 231| 231| 		for (var i of template.replaces)
| 232| 232| 		{
| 233| 233| 			if (!i || this.IsTechnologyResearched(i))
| 245| 245| 					cmpPlayerEntityLimits.UpdateLimitsFromTech(i);
| 246| 246| 			}
| 247| 247| 		}
| 248|    |-	}
|    | 248|+	
| 249| 249| 
| 250| 250| 	this.UpdateAutoResearch();
| 251| 251| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, { "player": playerID, "tech": tech});
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech });
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 334| 334|  */
| 335| 335| TechnologyManager.prototype.GetResearcher = function(tech)
| 336| 336| {
| 337|    |-	return this.researchQueued.get(tech)
|    | 337|+	return this.researchQueued.get(tech);
| 338| 338| };
| 339| 339| 
| 340| 340| /**

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.

binaries/data/mods/public/simulation/components/TechnologyManager.js
| 337| »   return·this.researchQueued.get(tech)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/differential/1332/display/redirect

Ran some perf tests. It seems the cache itself is fairly efficient, but adding/removing is kinda slow because we need to create objects/maps. Might get better with SM45, might need some C++ boost, overall I think it's fast enough for gameplay.

Stan added inline comments.May 26 2019, 5:47 PM
binaries/data/mods/public/simulation/components/Auras.js
245–249

I guess given the name of the function the comment isn't really useful else it should start with a capital

356

Could maybe save some cycles by calling player manager in the player loop.

385

Missing quotes around object properties.

393

Same as above.

binaries/data/mods/public/simulation/components/ModificationsManager.js
34

Maybe !this[propName] merged with the other if.

Stan added a comment.May 26 2019, 10:25 PM

Some more comments.

binaries/data/mods/public/simulation/components/ModificationsManager.js
78

Might want to be efficient in the first place, auras have always been a bottleneck.

116

merge all three, and invert the first ?

235

INVALID_PLAYER

238

INVALID_PLAYER

251

INVALID_PLAYER

Stan added a comment.May 28 2019, 5:36 PM

Some more comments.

binaries/data/mods/public/simulation/components/Auras.js
393

Could maybe save some cycles by calling player manager in the player loop.

429

Could maybe save some cycles by calling this.GetModifierIdentifier(name) out of the loop.

472

Could maybe save some cycles by calling this.GetModifierIdentifier(name) out of the loop.

508

INVALID_PLAYER

binaries/data/mods/public/simulation/components/ModificationsManager.js
46

let players = this.playerentities.slice() ?

https://www.samanthaming.com/tidbits/35-es6-way-to-clone-an-array

48

Quotes around object properties.

Stan added a comment.Jun 15 2019, 11:37 AM

Some more comments, maybe it would be nice to add one test or two in attack.js to show how to use it for test purposes.

binaries/data/mods/public/simulation/components/Auras.js
421

Missing quotes here as well :)

456–457

add a \n

461

Shouldn't that be at the top of the function then and the icons removed in the player level function handler ?

binaries/data/mods/public/simulation/components/ModificationsManager.js
70

Early return; to nuke else.

89

Can't we guess who is gonna really need to be affected to reduce the amount of entities ? Some kind of filter if you will.

101

I guess you can merge all three.

106

Profiling for array.foreach, and standard for, also isn't it bad practice to delete in a foreach loop ?

141

Should we return null or an empty collection ?

183

Wouldn't it be better to pass [single value] everywhere to remove that need ?

wraitii updated this revision to Diff 9309.Mon, Aug 12, 2:52 PM

Ran some more profiling, this seems comparable with svn. I think it's a tad slower as there's slightly more indirection, but that ought to be irrelevant in cost. MultiKeyMap could be switched to C++ I guess for best performance.

Fix formatting.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/366/display/redirect

wraitii updated this revision to Diff 9349.Thu, Aug 15, 7:16 PM

Clean up some of the weirdness.

Merge D1858 back into this so it's somewhat standalone.

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

Linter detected issues:
Executing section Source...

source/simulation2/components/tests/test_scripts.h
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"

source/simulation2/components/tests/test_scripts.h
|  22| class·TestComponentScripts·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestComponentScripts:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'name'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  15|  15| };
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|    |-	"GetTemplate": (name) =>  name == "special/spy" ?
|    |  18|+	"GetTemplate": (name) => name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|    |-	({ "Cost": { "Resources": { "wood": 1000 } },
|    |  19|+		({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|    |  20|+			"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|  23|  23| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  21|+		: ({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | ':' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  20|+		"VisionSharing": { "Duration": 15 } }) :
|    |  21|+	({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  62|  62| });
|  63|  63| Engine.PostMessage = function(id, iid, message)
|  64|  64| {
|  65|    |-TS_ASSERT(false); // One doesn't send message
|    |  65|+	TS_ASSERT(false); // One doesn't send message
|  66|  66| };
|  67|  67| cmpVisionSharing.CheckVisionSharings();
|  68|  68| TS_ASSERT_UNEVAL_EQUALS(cmpVisionSharing.shared, new Set([1]));

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 124| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 136| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 157| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·25·*·1000)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 171| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·15·*·1000·*·60·/·48)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, "from": -1, to: PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, "to": PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 113| 113| TS_ASSERT(cmpModificationsManager.HasModif("Test_C", "Test_C_3", PLAYER_ENTITY_ID));
| 114| 114| TS_ASSERT(!cmpModificationsManager.HasModif("Test_C", "Test_C_2", 5));
| 115| 115| 
| 116|    |-//////////////////////////////////////////
|    | 116|+// ////////////////////////////////////////
| 117| 117| // Test that entities keep local modifications but not global ones when changing owner.
| 118| 118| AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 119| 119| 	"GetPlayerByID": (a) => a == PLAYER_ID_FOR_TEST ? PLAYER_ENTITY_ID : PLAYER_ENTITY_ID + 1
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, "from": -1, to: PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, "to": PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, "from": -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, "to": PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'entity' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ "entity": 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, "from": PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, "to": PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });

binaries/data/mods/public/simulation/components/tests/test_UpgradeModification.js
|  92| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template,·player)·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Pack.js
|  44| »   "SetInterval":·(ent,·iid,·funcname,·time,·repeattime,·data)·=>·{·timerActivated·=·true;·return·7;·}
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  24|  24| 
|  25|  25| 	let cmpDamage = ConstructComponent(SYSTEM_ENTITY, "Damage");
|  26|  26| 	let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer");
|  27|    |-	cmpTimer.OnUpdate({ turnLength: 1 });
|    |  27|+	cmpTimer.OnUpdate({ "turnLength": 1 });
|  28|  28| 	let attacker = 11;
|  29|  29| 	let atkPlayerEntity = 1;
|  30|  30| 	let attackerOwner = 6;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  62|  62| 		"position": targetPos,
|  63|  63| 		"isSplash": false,
|  64|  64| 		"projectileId": 9,
|  65|    |-		"direction": new Vector3D(1,0,0)
|    |  65|+		"direction": new Vector3D(1, 0,0)
|  66|  66| 	};
|  67|  67| 
|  68|  68| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  62|  62| 		"position": targetPos,
|  63|  63| 		"isSplash": false,
|  64|  64| 		"projectileId": 9,
|  65|    |-		"direction": new Vector3D(1,0,0)
|    |  65|+		"direction": new Vector3D(1,0, 0)
|  66|  66| 	};
|  67|  67| 
|  68|  68| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 113| 113| 
| 114| 114| 	function TestDamage()
| 115| 115| 	{
| 116|    |-		cmpTimer.OnUpdate({ turnLength: 1 });
|    | 116|+		cmpTimer.OnUpdate({ "turnLength": 1 });
| 117| 117| 		TS_ASSERT(damageTaken);
| 118| 118| 		damageTaken = false;
| 119| 119| 	}
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 155| 155| 		"origin": origin,
| 156| 156| 		"radius": 10,
| 157| 157| 		"shape": "Linear",
| 158|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 158|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 159| 159| 		"direction": new Vector3D(1, 747, 0),
| 160| 160| 		"playersToDamage": [2],
| 161| 161| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 155| 155| 		"origin": origin,
| 156| 156| 		"radius": 10,
| 157| 157| 		"shape": "Linear",
| 158|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 158|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 159| 159| 		"direction": new Vector3D(1, 747, 0),
| 160| 160| 		"playersToDamage": [2],
| 161| 161| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 162| 162| 		"attackerOwner": attackerOwner
| 163| 163| 	};
| 164| 164| 
| 165|    |-	let fallOff = function(x,y)
|    | 165|+	let fallOff = function(x, y)
| 166| 166| 	{
| 167| 167| 		return (1 - x * x / (data.radius * data.radius)) * (1 - 25 * y * y / (data.radius * data.radius));
| 168| 168| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 314| 314| 		"origin": new Vector2D(3, 4),
| 315| 315| 		"radius": radius,
| 316| 316| 		"shape": "Circular",
| 317|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 317|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 318| 318| 		"playersToDamage": [2],
| 319| 319| 		"type": "Ranged",
| 320| 320| 		"attackerOwner": 1
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 314| 314| 		"origin": new Vector2D(3, 4),
| 315| 315| 		"radius": radius,
| 316| 316| 		"shape": "Circular",
| 317|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 317|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 318| 318| 		"playersToDamage": [2],
| 319| 319| 		"type": "Ranged",
| 320| 320| 		"attackerOwner": 1

binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 124| »   type·=·data.type·=·"Ranged";
|    | [NORMAL] ESLintBear (no-multi-assign):
|    | Unexpected chained assignment.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/globalscripts/Technologies.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Technologies.js
|  41|  41| 
|  42|  42| /**
|  43|  43|  * Derives modifications (to be applied to entities) from a given technology.
|  44|    |- * 
|    |  44|+ *
|  45|  45|  * @param {Object} techTemplate - The technology template to derive the modifications from.
|  46|  46|  * @return {Object} containing the relevant modifications.
|  47|  47|  */
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'civPermitted' to undefined.
|----|    | /zpool0/trunk/binaries/data/mods/public/globalscripts/Technologies.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Technologies.js
| 219| 219| 
| 220| 220| 	case "all":
| 221| 221| 	{
| 222|    |-		let civPermitted = undefined; // tri-state (undefined, false, or true)
|    | 222|+		let civPermitted; // tri-state (undefined, false, or true)
| 223| 223| 		for (let subvalue of value)
| 224| 224| 		{
| 225| 225| 			let newOper = Object.keys(subvalue)[0];

binaries/data/mods/public/globalscripts/Technologies.js
| 229| »   »   »   switch·(newOper)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/globalscripts/Technologies.js
| 303| »   »   »   switch·(newOper)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/globalscripts/Technologies.js
|  33| »   »   »   warn("GetTechModifiedProperty:·modification·format·not·recognised :·"·+·uneval(modification));
|    | [NORMAL] JSHintBear:
|    | This line contains non-breaking spaces: http://jshint.com/docs/options/#nonbsp

binaries/data/mods/public/globalscripts/Technologies.js
| 222| »   »   let·civPermitted·=·undefined;·//·tri-state·(undefined,·false,·or·true)
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'civPermitted' to 'undefined'.

binaries/data/mods/public/globalscripts/Technologies.js
| 245| »   »   »   »   »   return·false;
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

binaries/data/mods/public/globalscripts/Technologies.js
| 255| »   »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

binaries/data/mods/public/globalscripts/Technologies.js
| 324| »   »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

binaries/data/mods/public/globalscripts/Technologies.js
| 330| »   »   »   »   civPermitted·=·true;
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js
|  87|  87| 		// If the elements are still strings, split them by space or by '+'
|  88|  88| 		if (typeof sublist == "string")
|  89|  89| 			sublist = sublist.split(/[+\s]+/);
|  90|    |-		if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1)
|  91|    |-		                    || (c[0] != "!" && classes.indexOf(c) != -1)))
|    |  90|+		if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) ||
|    |  91|+		                    (c[0] != "!" && classes.indexOf(c) != -1)))
|  92|  92| 			return true;
|  93|  93| 	}
|  94|  94| 

binaries/data/mods/public/globalscripts/Templates.js
|  91| »   »   ····················||·(c[0]·!=·"!"·&&·classes.indexOf(c)·!=·-1)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Player.js
|  97|  97| 
|  98|  98| 		// Note: this is not yet implemented but I leave it commented to highlight it's easy
|  99|  99| 		// If anyone ever adds handicap.
| 100|    |-		//if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined)
|    | 100|+		// if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined)
| 101| 101| 		//	cmpPlayer.SetGatherRateMultiplier(getSetting(playerData, playerDefaults, i, "GatherRateMultiplier"));
| 102| 102| 
| 103| 103| 		if (getSetting(playerData, playerDefaults, i, "PopulationLimit") !== undefined)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Player.js
| 328| 328| 	return IsOwnedByHelper(player, target, "IsMutualAlly");
| 329| 329| }
| 330| 330| 
| 331|    |-function IsOwnedByNeutralOfPlayer(player,target)
|    | 331|+function IsOwnedByNeutralOfPlayer(player, target)
| 332| 332| {
| 333| 333| 	return IsOwnedByHelper(player, target, "IsNeutral");
| 334| 334| }

binaries/data/mods/public/simulation/helpers/Player.js
|  78| »   »   let·cmpPlayer·=·QueryPlayerIDInterface(i);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'cmpPlayer' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Player.js
| 160| »   »   for·(let·i·=·0;·i·<·numPlayers;·++i)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'i' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Player.js
|  67| »   »   var·entID·=·cmpPlayerManager.GetPlayerByID(i);
|    | [NORMAL] JSHintBear:
|    | 'entID' is already defined.

binaries/data/mods/public/simulation/helpers/Player.js
|  76| »   for·(var·i·=·0;·i·<·numPlayers;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/helpers/Player.js
| 138| »   »   »   for·(var·j·=·0;·j·<·numPlayers;·++j)
|    | [NORMAL] JSHintBear:
|    | 'j' is already defined.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 119| 119| 	this.formationMembersWithAura = []; // Members with a formation aura
| 120| 120| 	this.width = 0;
| 121| 121| 	this.depth = 0;
| 122|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 122|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 123| 123| 	this.twinFormations = [];
| 124| 124| 	// distance from which two twin formations will merge into one.
| 125| 125| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 119| 119| 	this.formationMembersWithAura = []; // Members with a formation aura
| 120| 120| 	this.width = 0;
| 121| 121| 	this.depth = 0;
| 122|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 122|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 123| 123| 	this.twinFormations = [];
| 124| 124| 	// distance from which two twin formations will merge into one.
| 125| 125| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 137| 137| 
| 138| 138| Formation.prototype.GetSize = function()
| 139| 139| {
| 140|    |-	return {"width": this.width, "depth": this.depth};
|    | 140|+	return { "width": this.width, "depth": this.depth};
| 141| 141| };
| 142| 142| 
| 143| 143| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 137| 137| 
| 138| 138| Formation.prototype.GetSize = function()
| 139| 139| {
| 140|    |-	return {"width": this.width, "depth": this.depth};
|    | 140|+	return {"width": this.width, "depth": this.depth };
| 141| 141| };
| 142| 142| 
| 143| 143| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return { "width":1, "depth": 1};
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return {"width": 1, "depth": 1};
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return {"width":1, "depth": 1 };
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 556| 556| 	if (!footprints.length)
| 557| 557| 		return {"width":1, "depth": 1};
| 558| 558| 
| 559|    |-	var r = {"width": 0, "depth": 0};
|    | 559|+	var r = { "width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
| 561| 561| 	{
| 562| 562| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 556| 556| 	if (!footprints.length)
| 557| 557| 		return {"width":1, "depth": 1};
| 558| 558| 
| 559|    |-	var r = {"width": 0, "depth": 0};
|    | 559|+	var r = {"width": 0, "depth": 0 };
| 560| 560| 	for (var shape of footprints)
| 561| 561| 	{
| 562| 562| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 582| 582| 	separation.depth *= this.separationMultiplier.depth;
| 583| 583| 
| 584| 584| 	if (this.columnar)
| 585|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 585|+		var sortingClasses = ["Cavalry", "Infantry"];
| 586| 586| 	else
| 587| 587| 		var sortingClasses = this.sortingClasses.slice();
| 588| 588| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 602| 602| 		{
| 603| 603| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 604| 604| 			{
| 605|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 605|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 606| 606| 				done = true;
| 607| 607| 				break;
| 608| 608| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 602| 602| 		{
| 603| 603| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 604| 604| 			{
| 605|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 605|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 606| 606| 				done = true;
| 607| 607| 				break;
| 608| 608| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 626| 626| 	if (this.columnar)
| 627| 627| 	{
| 628| 628| 		shape = "square";
| 629|    |-		cols = Math.min(count,3);
|    | 629|+		cols = Math.min(count, 3);
| 630| 630| 		shiftRows = false;
| 631| 631| 		centerGap = 0;
| 632| 632| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 721| 721| 	// calculating offset distances without a zero average makes no sense, as the formation
| 722| 722| 	// will jump to a different position any time
| 723| 723| 	var avgoffset = Vector2D.average(offsets);
| 724|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 724|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 725| 725| 
| 726| 726| 	// sort the available places in certain ways
| 727| 727| 	// the places first in the list will contain the heaviest units as defined by the order
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 790| 790| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 791| 791| {
| 792| 792| 	var offsetPositions = [];
| 793|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 793|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 794| 794| 	// calculate the world positions
| 795| 795| 	for (var o of offsets)
| 796| 796| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 790| 790| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 791| 791| {
| 792| 792| 	var offsetPositions = [];
| 793|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 793|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 794| 794| 	// calculate the world positions
| 795| 795| 	for (var o of offsets)
| 796| 796| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 807| 807| Formation.prototype.GetEstimatedOrientation = function(pos)
| 808| 808| {
| 809| 809| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 810|    |-	var r = {"sin": 0, "cos": 1};
|    | 810|+	var r = { "sin": 0, "cos": 1};
| 811| 811| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 812| 812| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 813| 813| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 807| 807| Formation.prototype.GetEstimatedOrientation = function(pos)
| 808| 808| {
| 809| 809| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 810|    |-	var r = {"sin": 0, "cos": 1};
|    | 810|+	var r = {"sin": 0, "cos": 1 };
| 811| 811| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 812| 812| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 813| 813| 	{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 889| 889| 		cmpOtherFormation.RemoveMembers(otherMembers);
| 890| 890| 		this.AddMembers(otherMembers);
| 891| 891| 		Engine.DestroyEntity(this.twinFormations[i]);
| 892|    |-		this.twinFormations.splice(i,1);
|    | 892|+		this.twinFormations.splice(i, 1);
| 893| 893| 	}
| 894| 894| 	// Switch between column and box if necessary
| 895| 895| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);

binaries/data/mods/public/simulation/components/Formation.js
| 326| »   for·(var·ent·of·this.formationMembersWithAura)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 413| »   for·(var·ent·of·this.formationMembersWithAura)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 459| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 500| »   »   var·cmpUnitAI·=·Engine.QueryInterface(offset.ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 535| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 587| »   »   var·sortingClasses·=·this.sortingClasses.slice();
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 596| »   for·(var·i·in·active)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 611| »   »   »   types["Unknown"].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | ['Unknown'] is better written in dot notation.

binaries/data/mods/public/simulation/components/Formation.js
| 651| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 685| »   »   »   »   »   var·n·=·r·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 687| »   »   »   »   »   var·n·=·r·*·2·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 691| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'c' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 698| »   »   »   »   »   var·x·=·side·*·Math.ceil(c/2)·*·separation.width;
|    | [NORMAL] JSHintBear:
|    | 'x' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 701| »   »   »   »   »   if·(x·==·0)·//·don't·use·the·center·position·with·a·center·gap
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 703| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 709| »   »   »   »   offsets.push(new·Vector2D(x·+·r1,·z·+·r2));
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 689| »   »   »   if·(!shiftRows·&&·n·>·left)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 690| »   »   »   »   n·=·left;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 691| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 695| »   »   »   »   if·(n%2·==·0)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 705| »   »   »   »   var·column·=·Math.ceil(n/2)·+·Math.ceil(c/2)·*·side;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 715| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 744| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 588| »   sortingClasses.push("Unknown");
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 593| »   for·(var·i·=·0;·i·<·sortingClasses.length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 594| »   »   types[sortingClasses[i]]·=·[];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 601| »   »   for·(var·c·=·0;·c·<·sortingClasses.length;·++c)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 603| »   »   »   if·(classes.indexOf(sortingClasses[c])·>·-1)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 605| »   »   »   »   types[sortingClasses[c]].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 744| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 746| »   »   var·t·=·types[sortingClasses[i-1]];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 851| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": playerID[1], from: -1, to: playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], "from": -1, to: playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, "to": playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], "from": -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, "to": playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }

binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  21| »   »   let·template·=·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [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);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, { "player": playerID, "tech": tech});
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech });
| 267| 267| };
| 268| 268| 
| 269| 269| /**

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.
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  97|  97| 
|  98|  98| // Tests if the message is sent when capture points change
|  99|  99| testCapturable(testData, cmpCapturable => {
| 100|    |-	cmpCapturable.SetCapturePoints([0, 2000, 0 , 1000]);
|    | 100|+	cmpCapturable.SetCapturePoints([0, 2000, 0, 1000]);
| 101| 101| 	TS_ASSERT_UNEVAL_EQUALS(cmpCapturable.GetCapturePoints(), [0, 2000, 0, 1000]);
| 102| 102| 	Engine.PostMessage = function(ent, iid, message)
| 103| 103| 	{

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  24| function·testCapturable(testData,·test_function)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 131| function·testRegen(testData,·cpIn,·cpOut,·regenerating)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 156| function·testDecay(testData,·cpIn,·cpOut)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 175| function·testReduce(testData,·amount,·player,·taken)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/392/display/redirect

Stan added inline comments.Thu, Aug 15, 7:47 PM
binaries/data/mods/public/simulation/components/Auras.js
25–26

missing / ?

350

Invalid player check ?

387

Same here

508

Still

wraitii updated this revision to Diff 9371.Sun, Aug 18, 9:41 AM

Optimised after some profiling. I'm now rather confident that this is generally as fast as SVN, and much faster for global auras.

Also merge D1859 back in.

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

Linter detected issues:
Executing section Source...

source/simulation2/components/tests/test_scripts.h
|   1| /*·Copyright·(C)·2017·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2017"

source/simulation2/components/tests/test_scripts.h
|  22| class·TestComponentScripts·:·public·CxxTest::TestSuite
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classTestComponentScripts:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...

binaries/data/mods/public/simulation/components/tests/test_Pack.js
|  44| »   "SetInterval":·(ent,·iid,·funcname,·time,·repeattime,·data)·=>·{·timerActivated·=·true;·return·7;·}
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Templates.js
|  87|  87| 		// If the elements are still strings, split them by space or by '+'
|  88|  88| 		if (typeof sublist == "string")
|  89|  89| 			sublist = sublist.split(/[+\s]+/);
|  90|    |-		if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1)
|  91|    |-		                    || (c[0] != "!" && classes.indexOf(c) != -1)))
|    |  90|+		if (sublist.every(c => (c[0] == "!" && classes.indexOf(c.substr(1)) == -1) ||
|    |  91|+		                    (c[0] != "!" && classes.indexOf(c) != -1)))
|  92|  92| 			return true;
|  93|  93| 	}
|  94|  94| 

binaries/data/mods/public/globalscripts/Templates.js
|  91| »   »   ····················||·(c[0]·!=·"!"·&&·classes.indexOf(c)·!=·-1)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 119| 119| 	this.formationMembersWithAura = []; // Members with a formation aura
| 120| 120| 	this.width = 0;
| 121| 121| 	this.depth = 0;
| 122|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 122|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 123| 123| 	this.twinFormations = [];
| 124| 124| 	// distance from which two twin formations will merge into one.
| 125| 125| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 119| 119| 	this.formationMembersWithAura = []; // Members with a formation aura
| 120| 120| 	this.width = 0;
| 121| 121| 	this.depth = 0;
| 122|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 122|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 123| 123| 	this.twinFormations = [];
| 124| 124| 	// distance from which two twin formations will merge into one.
| 125| 125| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 137| 137| 
| 138| 138| Formation.prototype.GetSize = function()
| 139| 139| {
| 140|    |-	return {"width": this.width, "depth": this.depth};
|    | 140|+	return { "width": this.width, "depth": this.depth};
| 141| 141| };
| 142| 142| 
| 143| 143| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 137| 137| 
| 138| 138| Formation.prototype.GetSize = function()
| 139| 139| {
| 140|    |-	return {"width": this.width, "depth": this.depth};
|    | 140|+	return {"width": this.width, "depth": this.depth };
| 141| 141| };
| 142| 142| 
| 143| 143| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return { "width":1, "depth": 1};
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return {"width": 1, "depth": 1};
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 554| 554| 			footprints.push(cmpFootprint.GetShape());
| 555| 555| 	}
| 556| 556| 	if (!footprints.length)
| 557|    |-		return {"width":1, "depth": 1};
|    | 557|+		return {"width":1, "depth": 1 };
| 558| 558| 
| 559| 559| 	var r = {"width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 556| 556| 	if (!footprints.length)
| 557| 557| 		return {"width":1, "depth": 1};
| 558| 558| 
| 559|    |-	var r = {"width": 0, "depth": 0};
|    | 559|+	var r = { "width": 0, "depth": 0};
| 560| 560| 	for (var shape of footprints)
| 561| 561| 	{
| 562| 562| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 556| 556| 	if (!footprints.length)
| 557| 557| 		return {"width":1, "depth": 1};
| 558| 558| 
| 559|    |-	var r = {"width": 0, "depth": 0};
|    | 559|+	var r = {"width": 0, "depth": 0 };
| 560| 560| 	for (var shape of footprints)
| 561| 561| 	{
| 562| 562| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 582| 582| 	separation.depth *= this.separationMultiplier.depth;
| 583| 583| 
| 584| 584| 	if (this.columnar)
| 585|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 585|+		var sortingClasses = ["Cavalry", "Infantry"];
| 586| 586| 	else
| 587| 587| 		var sortingClasses = this.sortingClasses.slice();
| 588| 588| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 602| 602| 		{
| 603| 603| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 604| 604| 			{
| 605|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 605|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 606| 606| 				done = true;
| 607| 607| 				break;
| 608| 608| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 602| 602| 		{
| 603| 603| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 604| 604| 			{
| 605|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 605|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 606| 606| 				done = true;
| 607| 607| 				break;
| 608| 608| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 			}
| 609| 609| 		}
| 610| 610| 		if (!done)
| 611|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 611|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 612| 612| 	}
| 613| 613| 
| 614| 614| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 626| 626| 	if (this.columnar)
| 627| 627| 	{
| 628| 628| 		shape = "square";
| 629|    |-		cols = Math.min(count,3);
|    | 629|+		cols = Math.min(count, 3);
| 630| 630| 		shiftRows = false;
| 631| 631| 		centerGap = 0;
| 632| 632| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 721| 721| 	// calculating offset distances without a zero average makes no sense, as the formation
| 722| 722| 	// will jump to a different position any time
| 723| 723| 	var avgoffset = Vector2D.average(offsets);
| 724|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 724|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 725| 725| 
| 726| 726| 	// sort the available places in certain ways
| 727| 727| 	// the places first in the list will contain the heaviest units as defined by the order
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 780| 780| 			closestOffsetId = i;
| 781| 781| 		}
| 782| 782| 	}
| 783|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 783|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 784| 784| 	return closestOffsetId;
| 785| 785| };
| 786| 786| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 790| 790| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 791| 791| {
| 792| 792| 	var offsetPositions = [];
| 793|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 793|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 794| 794| 	// calculate the world positions
| 795| 795| 	for (var o of offsets)
| 796| 796| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 790| 790| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 791| 791| {
| 792| 792| 	var offsetPositions = [];
| 793|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 793|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 794| 794| 	// calculate the world positions
| 795| 795| 	for (var o of offsets)
| 796| 796| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 807| 807| Formation.prototype.GetEstimatedOrientation = function(pos)
| 808| 808| {
| 809| 809| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 810|    |-	var r = {"sin": 0, "cos": 1};
|    | 810|+	var r = { "sin": 0, "cos": 1};
| 811| 811| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 812| 812| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 813| 813| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 807| 807| Formation.prototype.GetEstimatedOrientation = function(pos)
| 808| 808| {
| 809| 809| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 810|    |-	var r = {"sin": 0, "cos": 1};
|    | 810|+	var r = {"sin": 0, "cos": 1 };
| 811| 811| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 812| 812| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 813| 813| 	{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 889| 889| 		cmpOtherFormation.RemoveMembers(otherMembers);
| 890| 890| 		this.AddMembers(otherMembers);
| 891| 891| 		Engine.DestroyEntity(this.twinFormations[i]);
| 892|    |-		this.twinFormations.splice(i,1);
|    | 892|+		this.twinFormations.splice(i, 1);
| 893| 893| 	}
| 894| 894| 	// Switch between column and box if necessary
| 895| 895| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);

binaries/data/mods/public/simulation/components/Formation.js
| 326| »   for·(var·ent·of·this.formationMembersWithAura)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 413| »   for·(var·ent·of·this.formationMembersWithAura)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 459| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 500| »   »   var·cmpUnitAI·=·Engine.QueryInterface(offset.ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 535| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 587| »   »   var·sortingClasses·=·this.sortingClasses.slice();
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 596| »   for·(var·i·in·active)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 611| »   »   »   types["Unknown"].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | ['Unknown'] is better written in dot notation.

binaries/data/mods/public/simulation/components/Formation.js
| 651| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 685| »   »   »   »   »   var·n·=·r·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 687| »   »   »   »   »   var·n·=·r·*·2·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 691| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'c' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 698| »   »   »   »   »   var·x·=·side·*·Math.ceil(c/2)·*·separation.width;
|    | [NORMAL] JSHintBear:
|    | 'x' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 701| »   »   »   »   »   if·(x·==·0)·//·don't·use·the·center·position·with·a·center·gap
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 703| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 709| »   »   »   »   offsets.push(new·Vector2D(x·+·r1,·z·+·r2));
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 689| »   »   »   if·(!shiftRows·&&·n·>·left)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 690| »   »   »   »   n·=·left;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 691| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 695| »   »   »   »   if·(n%2·==·0)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 705| »   »   »   »   var·column·=·Math.ceil(n/2)·+·Math.ceil(c/2)·*·side;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 715| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 744| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 588| »   sortingClasses.push("Unknown");
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 593| »   for·(var·i·=·0;·i·<·sortingClasses.length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 594| »   »   types[sortingClasses[i]]·=·[];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 601| »   »   for·(var·c·=·0;·c·<·sortingClasses.length;·++c)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 603| »   »   »   if·(classes.indexOf(sortingClasses[c])·>·-1)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 605| »   »   »   »   types[sortingClasses[c]].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 744| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 746| »   »   var·t·=·types[sortingClasses[i-1]];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 851| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/globalscripts/Technologies.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Technologies.js
|  41|  41| 
|  42|  42| /**
|  43|  43|  * Derives modifications (to be applied to entities) from a given technology.
|  44|    |- * 
|    |  44|+ *
|  45|  45|  * @param {Object} techTemplate - The technology template to derive the modifications from.
|  46|  46|  * @return {Object} containing the relevant modifications.
|  47|  47|  */
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'civPermitted' to undefined.
|----|    | /zpool0/trunk/binaries/data/mods/public/globalscripts/Technologies.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/globalscripts/Technologies.js
| 219| 219| 
| 220| 220| 	case "all":
| 221| 221| 	{
| 222|    |-		let civPermitted = undefined; // tri-state (undefined, false, or true)
|    | 222|+		let civPermitted; // tri-state (undefined, false, or true)
| 223| 223| 		for (let subvalue of value)
| 224| 224| 		{
| 225| 225| 			let newOper = Object.keys(subvalue)[0];

binaries/data/mods/public/globalscripts/Technologies.js
| 229| »   »   »   switch·(newOper)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/globalscripts/Technologies.js
| 303| »   »   »   switch·(newOper)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/globalscripts/Technologies.js
|  33| »   »   »   warn("GetTechModifiedProperty:·modification·format·not·recognised :·"·+·uneval(modification));
|    | [NORMAL] JSHintBear:
|    | This line contains non-breaking spaces: http://jshint.com/docs/options/#nonbsp

binaries/data/mods/public/globalscripts/Technologies.js
| 222| »   »   let·civPermitted·=·undefined;·//·tri-state·(undefined,·false,·or·true)
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'civPermitted' to 'undefined'.

binaries/data/mods/public/globalscripts/Technologies.js
| 245| »   »   »   »   »   return·false;
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

binaries/data/mods/public/globalscripts/Technologies.js
| 255| »   »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

binaries/data/mods/public/globalscripts/Technologies.js
| 324| »   »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

binaries/data/mods/public/globalscripts/Technologies.js
| 330| »   »   »   »   civPermitted·=·true;
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.
|    | [NORMAL] ESLintBear (comma-spacing):
|    | There should be no space before ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  97|  97| 
|  98|  98| // Tests if the message is sent when capture points change
|  99|  99| testCapturable(testData, cmpCapturable => {
| 100|    |-	cmpCapturable.SetCapturePoints([0, 2000, 0 , 1000]);
|    | 100|+	cmpCapturable.SetCapturePoints([0, 2000, 0, 1000]);
| 101| 101| 	TS_ASSERT_UNEVAL_EQUALS(cmpCapturable.GetCapturePoints(), [0, 2000, 0, 1000]);
| 102| 102| 	Engine.PostMessage = function(ent, iid, message)
| 103| 103| 	{

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
|  24| function·testCapturable(testData,·test_function)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 131| function·testRegen(testData,·cpIn,·cpOut,·regenerating)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 156| function·testDecay(testData,·cpIn,·cpOut)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_Capturable.js
| 175| function·testReduce(testData,·amount,·player,·taken)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'testData' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, "from": -1, to: PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|  50|  50| 	cmpModificationsManager.Deserialize(data);
|  51|  51| }
|  52|  52| 
|  53|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    |  53|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, "to": PLAYER_ENTITY_ID });
|  54|  54| 
|  55|  55| cmpModificationsManager.AddModif("Test_A", "Test_A_0", { "affects": ["Structure"], "add": 10 }, 10, "testLol");
|  56|  56| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 113| 113| TS_ASSERT(cmpModificationsManager.HasModif("Test_C", "Test_C_3", PLAYER_ENTITY_ID));
| 114| 114| TS_ASSERT(!cmpModificationsManager.HasModif("Test_C", "Test_C_2", 5));
| 115| 115| 
| 116|    |-//////////////////////////////////////////
|    | 116|+// ////////////////////////////////////////
| 117| 117| // Test that entities keep local modifications but not global ones when changing owner.
| 118| 118| AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 119| 119| 	"GetPlayerByID": (a) => a == PLAYER_ID_FOR_TEST ? PLAYER_ENTITY_ID : PLAYER_ENTITY_ID + 1
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, "from": -1, to: PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 130| 130| cmpModificationsManager.AddModif("Test_D", "Test_D_1", { "affects": ["Structure"], "add": 1 }, PLAYER_ENTITY_ID + 1);
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
|    | 133|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, "to": PLAYER_ENTITY_ID });
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, "from": -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 131| 131| cmpModificationsManager.AddModif("Test_D", "Test_D_2", { "affects": ["Structure"], "add": 5 }, 5);
| 132| 132| 
| 133| 133| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST, from: -1, to: PLAYER_ENTITY_ID });
| 134|    |-cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
|    | 134|+cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, "to": PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137| 137| cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'entity' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ "entity": 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, "from": PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_ModificationsManager.js
| 134| 134| cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: PLAYER_ID_FOR_TEST + 1, from: -1, to: PLAYER_ENTITY_ID + 1 });
| 135| 135| 
| 136| 136| TS_ASSERT_EQUALS(ApplyValueModificationsToEntity("Test_D", 10, 5), 25);
| 137|    |-cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, to: PLAYER_ID_FOR_TEST + 1 });
|    | 137|+cmpModificationsManager.OnGlobalOwnershipChanged({ entity: 5, from: PLAYER_ID_FOR_TEST, "to": PLAYER_ID_FOR_TEST + 1 });
| 138| 138| AddMock(5, IID_Ownership, {
| 139| 139| 	"GetOwner": () => PLAYER_ID_FOR_TEST + 1
| 140| 140| });
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  24|  24| 
|  25|  25| 	let cmpDamage = ConstructComponent(SYSTEM_ENTITY, "Damage");
|  26|  26| 	let cmpTimer = ConstructComponent(SYSTEM_ENTITY, "Timer");
|  27|    |-	cmpTimer.OnUpdate({ turnLength: 1 });
|    |  27|+	cmpTimer.OnUpdate({ "turnLength": 1 });
|  28|  28| 	let attacker = 11;
|  29|  29| 	let atkPlayerEntity = 1;
|  30|  30| 	let attackerOwner = 6;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  62|  62| 		"position": targetPos,
|  63|  63| 		"isSplash": false,
|  64|  64| 		"projectileId": 9,
|  65|    |-		"direction": new Vector3D(1,0,0)
|    |  65|+		"direction": new Vector3D(1, 0,0)
|  66|  66| 	};
|  67|  67| 
|  68|  68| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|  62|  62| 		"position": targetPos,
|  63|  63| 		"isSplash": false,
|  64|  64| 		"projectileId": 9,
|  65|    |-		"direction": new Vector3D(1,0,0)
|    |  65|+		"direction": new Vector3D(1,0, 0)
|  66|  66| 	};
|  67|  67| 
|  68|  68| 	AddMock(atkPlayerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'turnLength' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 113| 113| 
| 114| 114| 	function TestDamage()
| 115| 115| 	{
| 116|    |-		cmpTimer.OnUpdate({ turnLength: 1 });
|    | 116|+		cmpTimer.OnUpdate({ "turnLength": 1 });
| 117| 117| 		TS_ASSERT(damageTaken);
| 118| 118| 		damageTaken = false;
| 119| 119| 	}
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 155| 155| 		"origin": origin,
| 156| 156| 		"radius": 10,
| 157| 157| 		"shape": "Linear",
| 158|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 158|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 159| 159| 		"direction": new Vector3D(1, 747, 0),
| 160| 160| 		"playersToDamage": [2],
| 161| 161| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 155| 155| 		"origin": origin,
| 156| 156| 		"radius": 10,
| 157| 157| 		"shape": "Linear",
| 158|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 158|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 159| 159| 		"direction": new Vector3D(1, 747, 0),
| 160| 160| 		"playersToDamage": [2],
| 161| 161| 		"type": "Ranged",
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 162| 162| 		"attackerOwner": attackerOwner
| 163| 163| 	};
| 164| 164| 
| 165|    |-	let fallOff = function(x,y)
|    | 165|+	let fallOff = function(x, y)
| 166| 166| 	{
| 167| 167| 		return (1 - x * x / (data.radius * data.radius)) * (1 - 25 * y * y / (data.radius * data.radius));
| 168| 168| 	};
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'hack'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 314| 314| 		"origin": new Vector2D(3, 4),
| 315| 315| 		"radius": radius,
| 316| 316| 		"shape": "Circular",
| 317|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 317|+		"strengths": { "hack": 100, "pierce" : 0, "crush": 0 },
| 318| 318| 		"playersToDamage": [2],
| 319| 319| 		"type": "Ranged",
| 320| 320| 		"attackerOwner": 1
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'pierce'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 314| 314| 		"origin": new Vector2D(3, 4),
| 315| 315| 		"radius": radius,
| 316| 316| 		"shape": "Circular",
| 317|    |-		"strengths": { "hack" : 100, "pierce" : 0, "crush": 0 },
|    | 317|+		"strengths": { "hack" : 100, "pierce": 0, "crush": 0 },
| 318| 318| 		"playersToDamage": [2],
| 319| 319| 		"type": "Ranged",
| 320| 320| 		"attackerOwner": 1

binaries/data/mods/public/simulation/components/tests/test_Damage.js
| 124| »   type·=·data.type·=·"Ranged";
|    | [NORMAL] ESLintBear (no-multi-assign):
|    | Unexpected chained assignment.
|    | [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);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, { "player": playerID, "tech": tech});
| 267| 267| };
| 268| 268| 
| 269| 269| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/TechnologyManager.js
| 263| 263| 		cmpPlayerEntityLimits.UpdateLimitsFromTech(tech);
| 264| 264| 
| 265| 265| 	// always send research finished message
| 266|    |-	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech});
|    | 266|+	Engine.PostMessage(this.entity, MT_ResearchFinished, {"player": playerID, "tech": tech });
| 267| 267| };
| 268| 268| 
| 269| 269| /**

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.
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'name'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  15|  15| };
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|    |-	"GetTemplate": (name) =>  name == "special/spy" ?
|    |  18|+	"GetTemplate": (name) => name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  16|  16| 
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|    |-	({ "Cost": { "Resources": { "wood": 1000 } },
|    |  19|+		({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|    |  20|+			"VisionSharing": { "Duration": 15 } })
|  21|  21| 	: ({})
|  22|  22| });
|  23|  23| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 1.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|  20| 		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  21|+		: ({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | ':' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  17|  17| AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  18|  18| 	"GetTemplate": (name) =>  name == "special/spy" ?
|  19|  19| 	({ "Cost": { "Resources": { "wood": 1000 } },
|  20|    |-		"VisionSharing": { "Duration": 15 } })
|  21|    |-	: ({})
|    |  20|+		"VisionSharing": { "Duration": 15 } }) :
|    |  21|+	({})
|  22|  22| });
|  23|  23| 
|  24|  24| AddMock(ent, IID_GarrisonHolder, {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
|  62|  62| });
|  63|  63| Engine.PostMessage = function(id, iid, message)
|  64|  64| {
|  65|    |-TS_ASSERT(false); // One doesn't send message
|    |  65|+	TS_ASSERT(false); // One doesn't send message
|  66|  66| };
|  67|  67| cmpVisionSharing.CheckVisionSharings();
|  68|  68| TS_ASSERT_UNEVAL_EQUALS(cmpVisionSharing.shared, new Set([1]));

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 124| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 136| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template)·=>·curValue
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 157| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·25·*·1000)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_VisionSharing.js
| 171| »   "SetTimeout":·(ent,·iid,·funcname,·time,·data)·=>·TS_ASSERT_EQUALS(time,·15·*·1000·*·60·/·48)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/tests/test_UpgradeModification.js
|  92| »   "ApplyModificationsTemplate":·(valueName,·curValue,·template,·player)·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Player.js
|  97|  97| 
|  98|  98| 		// Note: this is not yet implemented but I leave it commented to highlight it's easy
|  99|  99| 		// If anyone ever adds handicap.
| 100|    |-		//if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined)
|    | 100|+		// if (getSetting(playerData, playerDefaults, i, "GatherRateMultiplier") !== undefined)
| 101| 101| 		//	cmpPlayer.SetGatherRateMultiplier(getSetting(playerData, playerDefaults, i, "GatherRateMultiplier"));
| 102| 102| 
| 103| 103| 		if (getSetting(playerData, playerDefaults, i, "PopulationLimit") !== undefined)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Player.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Player.js
| 328| 328| 	return IsOwnedByHelper(player, target, "IsMutualAlly");
| 329| 329| }
| 330| 330| 
| 331|    |-function IsOwnedByNeutralOfPlayer(player,target)
|    | 331|+function IsOwnedByNeutralOfPlayer(player, target)
| 332| 332| {
| 333| 333| 	return IsOwnedByHelper(player, target, "IsNeutral");
| 334| 334| }

binaries/data/mods/public/simulation/helpers/Player.js
|  78| »   »   let·cmpPlayer·=·QueryPlayerIDInterface(i);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'cmpPlayer' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Player.js
| 160| »   »   for·(let·i·=·0;·i·<·numPlayers;·++i)
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'i' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Player.js
|  67| »   »   var·entID·=·cmpPlayerManager.GetPlayerByID(i);
|    | [NORMAL] JSHintBear:
|    | 'entID' is already defined.

binaries/data/mods/public/simulation/helpers/Player.js
|  76| »   for·(var·i·=·0;·i·<·numPlayers;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/helpers/Player.js
| 138| »   »   »   for·(var·j·=·0;·j·<·numPlayers;·++j)
|    | [NORMAL] JSHintBear:
|    | 'j' is already defined.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": playerID[1], from: -1, to: playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], "from": -1, to: playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  91|  91| 		});
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|    |  94|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, "to": playerEnt[1] });
|  95|  95| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'player' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ "player": playerID[2], from: -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'from' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], "from": -1, to: playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'to' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  92|  92| 
|  93|  93| 	let cmpModificationsManager = ConstructComponent(SYSTEM_ENTITY, "ModificationsManager", {});
|  94|  94| 	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[1], from: -1, to: playerEnt[1] });
|  95|    |-	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, to: playerEnt[2] });
|    |  95|+	cmpModificationsManager.OnGlobalPlayerEntityChanged({ player: playerID[2], from: -1, "to": playerEnt[2] });
|  96|  96| 	let cmpAuras = ConstructComponent(sourceEnt, "Auras", { "_string": name });
|  97|  97| 	test_function(name, cmpAuras);
|  98|  98| }

binaries/data/mods/public/simulation/components/tests/test_Auras.js
|  21| »   »   let·template·=·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'template' is already declared in the upper scope.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/407/display/redirect

Stan added inline comments.Sun, Aug 18, 11:54 AM
binaries/data/mods/public/globalscripts/Technologies.js
33

Something wrong here ?

39

Ternary ?

binaries/data/mods/public/simulation/components/Auras.js
25–26

So it it will be aura/aura_name15 ?

223

Can't that last parameter be checked directly in the function ?

406

Shouldn't there be braces ?

445

braces too.

binaries/data/mods/public/simulation/components/ModificationsManager.js
32

Can't you just do :

let players = this.playerEntitiesCached

Or use https://developer.mozilla.org/fr/docs/Web/JavaScript/Reference/Objets_globaux/Array/from

143

Seems a bit weird at first read isn't it ?

elexis added inline comments.Sun, Aug 18, 6:59 PM
binaries/data/mods/public/simulation/components/ModificationsManager.js
252

(Wondering if one could avoid object construction by somehow creating the message objects to be sent directly instead of using an intermediary object array)

257

Sounds unneeded if it could also call the functions of that variable directly. Might even help with performance.

wraitii added inline comments.Sun, Aug 18, 7:05 PM
binaries/data/mods/public/simulation/components/ModificationsManager.js
257

It becomes cumbersome to write cmpModificationsManager.modifsStorage.AddItem, but I guess not more so than cmpModificationsManager.addModification, which is why I went with cmpModificationsManager.addModif

Perhaps I should just merge this back with MultiKeyMap.

From profiling, having an intermediary function changes nothing measurable.