Page MenuHomeWildfire Games

Change Run Speed into a Run multiplier
ClosedPublic

Authored by wraitii on May 7 2017, 9:40 AM.

Details

Reviewers
Itms
bb
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22197: Change Run Speed into a Run multiplier.
Summary

This changes running speed into a running multiplier (of walk speed).

The advantage is that it simplifies code since you can setup a default run multiplier at the template level and it'll work for all subsequent templates, and technologies cannot forget to change it. It makes specialised unit templates easier to maintain, too.

We could alternatively remove all running capabilities, but the code needs to handle speed in the [0;1] * walk speed range for formation/group walk so it's not a huge hassle to have.

Test Plan

Validate that formations, fleeing, regular old walking still work, that technologies update properly, no OOS.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
bb added inline comments.Jan 31 2018, 10:37 PM
binaries/data/mods/public/simulation/components/UnitAI.js
4049 ↗(On Diff #5394)

(have yelled earlier about those things iirc, but theoretically should need a cmpUnitMotion check, not adding missing ones in unrelated code if fine with me, but when we already change the code, it seems clean/easy enough to just add them)

4059–4066 ↗(On Diff #5394)

not required to remove this code in theory, no strong opinion

4291 ↗(On Diff #5394)

why multiply with 1.2?if that looks better, it is an animation problem, not unitai

binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
29–34 ↗(On Diff #5394)

.0's can be removed

83 ↗(On Diff #5394)

same

source/simulation2/components/CCmpUnitMotion.cpp
236 ↗(On Diff #5394)

Cap

238 ↗(On Diff #5394)

same

264–268 ↗(On Diff #5394)

Ok with removing that, since it is unused and needs to be redesigned if wanted

source/simulation2/components/ICmpUnitMotion.cpp
37 ↗(On Diff #5394)

same

source/simulation2/components/ICmpUnitMotion.h
115–119 ↗(On Diff #5394)

move above getSpeedRatio, so we have the same order as in the CCmpUnitMotion.cpp

bb requested changes to this revision.Feb 6 2018, 5:30 PM
This revision now requires changes to proceed.Feb 6 2018, 5:30 PM
wraitii updated this revision to Diff 6508.May 5 2018, 6:02 PM
wraitii marked 4 inline comments as done.
wraitii added a reviewer: Restricted Owners Package.

I believe this fixes the above issues. It seems to run correctly too. this time

Vulcan added a comment.May 5 2018, 6:08 PM

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

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

source/tools/atlas/GameInterface/ActorViewer.cpp
|  33| #include·"graphics/Terrain.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character ({) when these macros are defined: ''.

source/tools/atlas/GameInterface/ActorViewer.cpp
|  33| #include·"graphics/Terrain.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character ({) when these macros are defined: 'MESSAGES_SKIP_STRUCTS'.

source/tools/atlas/GameInterface/ActorViewer.cpp
|  33| #include·"graphics/Terrain.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character ({) when these macros are defined: '_MSC_VER'.
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|  74|  74| 	var newangle = angle;
|  75|  75| 	var canTurn = true;
|  76|  76| 	if (this.landing)
|  77|    |-	{
|    |  77|+	
|  78|  78| 		if (this.speed > 0 && this.onGround)
|  79|  79| 		{
|  80|  80| 			if (pos.y <= cmpWaterManager.GetWaterLevel(pos.x, pos.z) && this.template.DiesInWater == "true")
| 153| 153| 					this.waterDeath = true;
| 154| 154| 			}
| 155| 155| 		}
| 156|    |-	}
|    | 156|+	
| 157| 157| 	else
| 158| 158| 	{
| 159| 159| 		// If we haven't reached max speed yet then we're still on the ground;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|  93|  93| 				pos.y = Math.max(ground, pos.y - turnLength * this.template.ClimbRate);
|  94|  94| 		}
|  95|  95| 		else if (this.speed == 0 && this.onGround)
|  96|    |-		{
|    |  96|+		
|  97|  97| 			if (this.waterDeath && cmpHealth)
|  98|  98| 				cmpHealth.Kill();
|  99|  99| 			else
| 128| 128| 					newangle += Math.PI;
| 129| 129| 				}
| 130| 130| 			}
| 131|    |-		}
|    | 131|+		
| 132| 132| 		else
| 133| 133| 		{
| 134| 134| 			// Final Approach
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 101| 101| 				this.pitch = 0;
| 102| 102| 				// We've stopped.
| 103| 103| 				if (cmpGarrisonHolder)
| 104|    |-					cmpGarrisonHolder.AllowGarrisoning(true,"UnitMotionFlying");
|    | 104|+					cmpGarrisonHolder.AllowGarrisoning(true, "UnitMotionFlying");
| 105| 105| 				canTurn = false;
| 106| 106| 				this.hasTarget = false;
| 107| 107| 				this.landing = false;
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unexpected space after unary operator '-'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 138| 138| 			var targetHeight = ground;
| 139| 139| 			// Steep, then gradual descent.
| 140| 140| 			if ((pos.y - targetHeight) / this.template.FlyingHeight > 1 / SHORT_FINAL)
| 141|    |-				this.pitch = - Math.PI / 18;
|    | 141|+				this.pitch = -Math.PI / 18;
| 142| 142| 			else
| 143| 143| 				this.pitch = Math.PI / 18;
| 144| 144| 			var descentRate = ((pos.y - targetHeight) / this.template.FlyingHeight * this.template.ClimbRate + SHORT_FINAL) * SHORT_FINAL;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 155| 155| 		}
| 156| 156| 	}
| 157| 157| 	else
| 158|    |-	{
|    | 158|+	
| 159| 159| 		// If we haven't reached max speed yet then we're still on the ground;
| 160| 160| 		// otherwise we're taking off or flying
| 161| 161| 		// this.onGround in case of a go-around after landing (but not fully stopped)
| 195| 195| 				this.pitch = -1 * this.pitch;
| 196| 196| 			}
| 197| 197| 		}
| 198|    |-	}
|    | 198|+	
| 199| 199| 
| 200| 200| 	// If we're in range of the target then tell people that we've reached it
| 201| 201| 	// (TODO: quantisation breaks this)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 163| 163| 		if (this.speed < this.template.TakeoffSpeed && this.onGround)
| 164| 164| 		{
| 165| 165| 			if (cmpGarrisonHolder)
| 166|    |-				cmpGarrisonHolder.AllowGarrisoning(false,"UnitMotionFlying");
|    | 166|+				cmpGarrisonHolder.AllowGarrisoning(false, "UnitMotionFlying");
| 167| 167| 			this.pitch = 0;
| 168| 168| 			// Accelerate forwards
| 169| 169| 			this.speed = Math.min(this.template.MaxSpeed, this.speed + turnLength * this.template.AccelRate);
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unexpected space after unary operator '-'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 230| 230| 		if (newangle - angle > Math.PI / 18)
| 231| 231| 			this.roll = Math.PI / 9;
| 232| 232| 		else if (newangle - angle < -Math.PI / 18)
| 233|    |-			this.roll = - Math.PI / 9;
|    | 233|+			this.roll = -Math.PI / 9;
| 234| 234| 		else
| 235| 235| 			this.roll = newangle - angle;
| 236| 236| 	}
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 322| 322| UnitMotionFlying.prototype.GetSpeedRatio = function()
| 323| 323| {
| 324| 324| 	return this.GetCurrentSpeed() / this.GetWalkSpeed();
| 325|    |-}
|    | 325|+};
| 326| 326| 
| 327| 327| UnitMotionFlying.prototype.GetPassabilityClassName = function()
| 328| 328| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 346| 346| 
| 347| 347| UnitMotionFlying.prototype.StopMoving = function()
| 348| 348| {
| 349|    |-	//Invert
|    | 349|+	// Invert
| 350| 350| 	if (!this.waterDeath)
| 351| 351| 		this.landing = !this.landing;
| 352| 352| 

binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 182| »   »   »   var·targetHeight·=·ground·+·(+this.template.FlyingHeight);
|    | [NORMAL] JSHintBear:
|    | 'targetHeight' is already defined.

binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 325| }
|    | [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/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 226| 226| 		{
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229|    |-					"name": aura.auraName,
|    | 229|+				"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230|    |-					"description": aura.auraDescription || null,
|    | 230|+				"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231|    |-					"radius": aura.radius || null
|    | 231|+				"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
| 234| 234| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232|    |-				};
|    | 232|+			};
| 233| 233| 		}
| 234| 234| 	}
| 235| 235| 

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 (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  34|  34| 
|  35|  35| 
|  36|  36| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  37|    |-		SetInterval: function() { },
|    |  37|+		"SetInterval": function() { },
|  38|  38| 		SetTimeout: function() { },
|  39|  39| 	});
|  40|  40| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  35|  35| 
|  36|  36| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  37|  37| 		SetInterval: function() { },
|  38|    |-		SetTimeout: function() { },
|    |  38|+		"SetTimeout": function() { },
|  39|  39| 	});
|  40|  40| 
|  41|  41| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  39|  39| 	});
|  40|  40| 
|  41|  41| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|  42|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    |  42|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  42|  42| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|    |-		EnableActiveQuery: function(id) { },
|    |  45|+		"EnableActiveQuery": function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  46|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  46|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|    |-		DisableActiveQuery: function(id) { },
|    |  47|+		"DisableActiveQuery": function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|  50|  50| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|    |-		GetEntityFlagMask: function(identifier) { },
|    |  48|+		"GetEntityFlagMask": function(identifier) { },
|  49|  49| 	});
|  50|  50| 
|  51|  51| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  49|  49| 	});
|  50|  50| 
|  51|  51| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  52|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    |  52|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
|  53|  53| 	});
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  53|  53| 	});
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  56|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    |  56|+		"GetPlayerByID": function(id) { return playerEntity; },
|  57|  57| 		GetNumPlayers: function() { return 2; },
|  58|  58| 	});
|  59|  59| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  56|  56| 		GetPlayerByID: function(id) { return playerEntity; },
|  57|    |-		GetNumPlayers: function() { return 2; },
|    |  57|+		"GetNumPlayers": function() { return 2; },
|  58|  58| 	});
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  58|  58| 	});
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|    |-		IsAlly: function() { return false; },
|    |  61|+		"IsAlly": function() { return false; },
|  62|  62| 		IsEnemy: function() { return true; },
|  63|  63| 		GetEnemies: function() { return []; },
|  64|  64| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|  61| 		IsAlly: function() { return false; },
|  62|    |-		IsEnemy: function() { return true; },
|    |  62|+		"IsEnemy": function() { return true; },
|  63|  63| 		GetEnemies: function() { return []; },
|  64|  64| 	});
|  65|  65| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|  61| 		IsAlly: function() { return false; },
|  62|  62| 		IsEnemy: function() { return true; },
|  63|    |-		GetEnemies: function() { return []; },
|    |  63|+		"GetEnemies": function() { return []; },
|  64|  64| 	});
|  65|  65| 
|  66|  66| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  67|  67| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
|  68|  68| 
|  69|  69| 	AddMock(unit, IID_Identity, {
|  70|    |-		GetClassesList: function() { return []; },
|    |  70|+		"GetClassesList": function() { return []; },
|  71|  71| 	});
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  71|  71| 	});
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Ownership, {
|  74|    |-		GetOwner: function() { return 1; },
|    |  74|+		"GetOwner": function() { return 1; },
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    |  78|+		"GetTurretParent": function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|    |-		GetPosition: function() { return new Vector3D(); },
|    |  79|+		"GetPosition": function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|    |-		GetPosition2D: function() { return new Vector2D(); },
|    |  80|+		"GetPosition2D": function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|  83|  83| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|    |-		GetRotation: function() { return { "y": 0 }; },
|    |  81|+		"GetRotation": function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|  83|  83| 	});
|  84|  84| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|    |-		IsInWorld: function() { return true; },
|    |  82|+		"IsInWorld": function() { return true; },
|  83|  83| 	});
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  83|  83| 	});
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|    |-		GetWalkSpeed: function() { return 1; },
|    |  86|+		"GetWalkSpeed": function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToFormationOffset' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|    |-		MoveToFormationOffset: function(target, x, z) { },
|    |  87|+		"MoveToFormationOffset": function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|    |-		IsInTargetRange: function(target, min, max) { return true; },
|    |  88|+		"IsInTargetRange": function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|    |-		MoveToTargetRange: function(target, min, max) { },
|    |  89|+		"MoveToTargetRange": function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|  92|  92| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|    |-		StopMoving: function() { },
|    |  90|+		"StopMoving": function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|  92|  92| 	});
|  93|  93| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|    |-		GetPassabilityClassName: function() { return "default"; },
|    |  91|+		"GetPassabilityClassName": function() { return "default"; },
|  92|  92| 	});
|  93|  93| 
|  94|  94| 	AddMock(unit, IID_Vision, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  92|  92| 	});
|  93|  93| 
|  94|  94| 	AddMock(unit, IID_Vision, {
|  95|    |-		GetRange: function() { return 10; },
|    |  95|+		"GetRange": function() { return 10; },
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    |  99|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    |  99|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 100|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 100|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 101|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102|    |-		GetPreference: function(t) { return 0; },
|    | 102|+		"GetPreference": function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 103|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 106| 106| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104|    |-		CanAttack: function(v) { return true; },
|    | 104|+		"CanAttack": function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 106| 106| 	});
| 107| 107| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 105|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 106| 106| 	});
| 107| 107| 
| 108| 108| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 113| 113| 	if (mode == 1)
| 114| 114| 	{
| 115| 115| 		AddMock(enemy, IID_Health, {
| 116|    |-			GetHitpoints: function() { return 10; },
|    | 116|+			"GetHitpoints": function() { return 10; },
| 117| 117| 		});
| 118| 118| 		AddMock(enemy, IID_UnitAI, {
| 119| 119| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 116| 116| 			GetHitpoints: function() { return 10; },
| 117| 117| 		});
| 118| 118| 		AddMock(enemy, IID_UnitAI, {
| 119|    |-			IsAnimal: function() { return false; }
|    | 119|+			"IsAnimal": function() { return false; }
| 120| 120| 		});
| 121| 121| 	}
| 122| 122| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 121| 121| 	}
| 122| 122| 	else if (mode == 2)
| 123| 123| 		AddMock(enemy, IID_Health, {
| 124|    |-			GetHitpoints: function() { return 0; },
|    | 124|+			"GetHitpoints": function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127| 127| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 124| 124| 			GetHitpoints: function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 127|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 124| 124| 			GetHitpoints: function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 127|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
| 131|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 131|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 132|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 130| 130| 	AddMock(controller, IID_Position, {
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 133|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 134|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
| 137| 137| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 135|+		"GetRotation": function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
| 137| 137| 	});
| 138| 138| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136|    |-		IsInWorld: function() { return true; },
|    | 136|+		"IsInWorld": function() { return true; },
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140|    |-		GetWalkSpeed: function() { return 1; },
|    | 140|+		"GetWalkSpeed": function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetSpeedRatio' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141|    |-		SetSpeedRatio: function(speed) { },
|    | 141|+		"SetSpeedRatio": function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
| 144| 144| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToPointRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142|    |-		MoveToPointRange: function(x, z, minRange, maxRange) { },
|    | 142|+		"MoveToPointRange": function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
| 144| 144| 	});
| 145| 145| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143|    |-		GetPassabilityClassName: function() { return "default"; },
|    | 143|+		"GetPassabilityClassName": function() { return "default"; },
| 144| 144| 	});
| 145| 145| 
| 146| 146| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 181| 181| 	var unitAIs = [];
| 182| 182| 
| 183| 183| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 184|    |-		SetInterval: function() { },
|    | 184|+		"SetInterval": function() { },
| 185| 185| 		SetTimeout: function() { },
| 186| 186| 	});
| 187| 187| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 182| 182| 
| 183| 183| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 184| 184| 		SetInterval: function() { },
| 185|    |-		SetTimeout: function() { },
|    | 185|+		"SetTimeout": function() { },
| 186| 186| 	});
| 187| 187| 
| 188| 188| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 187| 187| 
| 188| 188| 
| 189| 189| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 190|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 190|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 191| 191| 			return 1;
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 190| 190| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 191| 191| 			return 1;
| 192| 192| 		},
| 193|    |-		EnableActiveQuery: function(id) { },
|    | 193|+		"EnableActiveQuery": function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 191| 191| 			return 1;
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 194|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
| 197| 197| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195|    |-		DisableActiveQuery: function(id) { },
|    | 195|+		"DisableActiveQuery": function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
| 197| 197| 	});
| 198| 198| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196|    |-		GetEntityFlagMask: function(identifier) { },
|    | 196|+		"GetEntityFlagMask": function(identifier) { },
| 197| 197| 	});
| 198| 198| 
| 199| 199| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 197| 197| 	});
| 198| 198| 
| 199| 199| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 200|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 200|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 204|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 204|+		"GetPlayerByID": function(id) { return playerEntity; },
| 205| 205| 		GetNumPlayers: function() { return 2; },
| 206| 206| 	});
| 207| 207| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 204| 204| 		GetPlayerByID: function(id) { return playerEntity; },
| 205|    |-		GetNumPlayers: function() { return 2; },
|    | 205|+		"GetNumPlayers": function() { return 2; },
| 206| 206| 	});
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 206| 206| 	});
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209|    |-		IsAlly: function() { return false; },
|    | 209|+		"IsAlly": function() { return false; },
| 210| 210| 		IsEnemy: function() { return true; },
| 211| 211| 		GetEnemies: function() { return []; },
| 212| 212| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209| 209| 		IsAlly: function() { return false; },
| 210|    |-		IsEnemy: function() { return true; },
|    | 210|+		"IsEnemy": function() { return true; },
| 211| 211| 		GetEnemies: function() { return []; },
| 212| 212| 	});
| 213| 213| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209| 209| 		IsAlly: function() { return false; },
| 210| 210| 		IsEnemy: function() { return true; },
| 211|    |-		GetEnemies: function() { return []; },
|    | 211|+		"GetEnemies": function() { return []; },
| 212| 212| 	});
| 213| 213| 
| 214| 214| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 219| 219| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 220| 220| 
| 221| 221| 		AddMock(unit + i, IID_Identity, {
| 222|    |-			GetClassesList: function() { return []; },
|    | 222|+			"GetClassesList": function() { return []; },
| 223| 223| 		});
| 224| 224| 
| 225| 225| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 223| 223| 		});
| 224| 224| 
| 225| 225| 		AddMock(unit + i, IID_Ownership, {
| 226|    |-			GetOwner: function() { return 1; },
|    | 226|+			"GetOwner": function() { return 1; },
| 227| 227| 		});
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 227| 227| 		});
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 230|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231|    |-			GetPosition: function() { return new Vector3D(); },
|    | 231|+			"GetPosition": function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 232|+			"GetPosition2D": function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
| 235| 235| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 233|+			"GetRotation": function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
| 235| 235| 		});
| 236| 236| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234|    |-			IsInWorld: function() { return true; },
|    | 234|+			"IsInWorld": function() { return true; },
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238|    |-			GetWalkSpeed: function() { return 1; },
|    | 238|+			"GetWalkSpeed": function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToFormationOffset' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239|    |-			MoveToFormationOffset: function(target, x, z) { },
|    | 239|+			"MoveToFormationOffset": function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240|    |-			IsInTargetRange: function(target, min, max) { return true; },
|    | 240|+			"IsInTargetRange": function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241|    |-			MoveToTargetRange: function(target, min, max) { },
|    | 241|+			"MoveToTargetRange": function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
| 244| 244| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242|    |-			StopMoving: function() { },
|    | 242|+			"StopMoving": function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
| 244| 244| 		});
| 245| 245| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243|    |-			GetPassabilityClassName: function() { return "default"; },
|    | 243|+			"GetPassabilityClassName": function() { return "default"; },
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_Vision, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_Vision, {
| 247|    |-			GetRange: function() { return 10; },
|    | 247|+			"GetRange": function() { return 10; },
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return { "max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 252|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 252|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 253|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 254|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 257| 257| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255|    |-			CanAttack: function(v) { return true; },
|    | 255|+			"CanAttack": function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 257| 257| 		});
| 258| 258| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 256|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 257| 257| 		});
| 258| 258| 
| 259| 259| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 265| 265| 
| 266| 266| 	// create enemy
| 267| 267| 	AddMock(enemy, IID_Health, {
| 268|    |-		GetHitpoints: function() { return 40; },
|    | 268|+		"GetHitpoints": function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271| 271| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 268| 268| 		GetHitpoints: function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 271|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 268| 268| 		GetHitpoints: function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 271|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
| 275|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 275|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 276|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 274| 274| 	AddMock(controller, IID_Position, {
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 277|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 278|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
| 281| 281| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 279|+		"GetRotation": function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
| 281| 281| 	});
| 282| 282| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280|    |-		IsInWorld: function() { return true; },
|    | 280|+		"IsInWorld": function() { return true; },
| 281| 281| 	});
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 281| 281| 	});
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284|    |-		GetWalkSpeed: function() { return 1; },
|    | 284|+		"GetWalkSpeed": function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetSpeedRatio' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285|    |-		SetSpeedRatio: function(speed) { },
|    | 285|+		"SetSpeedRatio": function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToPointRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286|    |-		MoveToPointRange: function(x, z, minRange, maxRange) { },
|    | 286|+		"MoveToPointRange": function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287|    |-		IsInTargetRange: function(target, min, max) { return true; },
|    | 287|+		"IsInTargetRange": function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
| 290| 290| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288|    |-		StopMoving: function() { },
|    | 288|+		"StopMoving": function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
| 290| 290| 	});
| 291| 291| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289|    |-		GetPassabilityClassName: function() { return "default"; },
|    | 289|+		"GetPassabilityClassName": function() { return "default"; },
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return { "max":10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293| 293| 		GetRange: function() { return {"max":10, "min": 0}; },
| 294|    |-		CanAttackAsFormation: function() { return false; },
|    | 294|+		"CanAttackAsFormation": function() { return false; },
| 295| 295| 	});
| 296| 296| 
| 297| 297| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 	for (var ent of unitAIs)
| 304| 304| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 305| 305| 
| 306|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 306|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 307| 307| 
| 308| 308| 	// let all units be in position
| 309| 309| 	for (var ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 	for (var ent of unitAIs)
| 304| 304| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 305| 305| 
| 306|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 306|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 307| 307| 
| 308| 308| 	// let all units be in position
| 309| 309| 	for (var ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  46| »   »   ResetActiveQuery:·function(id)·{·if·(mode·==·0)·return·[];·else·return·[enemy];·},
|    | [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/tests/test_UnitAI.js
| 215| »   for·(var·i·=·0;·i·<·unitCount;·i++)·{
|    | [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/tests/test_UnitAI.js
| 309| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 312| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 304| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 313| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 126| 126| 	this.formationMembersWithAura = []; // Members with a formation aura
| 127| 127| 	this.width = 0;
| 128| 128| 	this.depth = 0;
| 129|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 129|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 130| 130| 	this.twinFormations = [];
| 131| 131| 	// distance from which two twin formations will merge into one.
| 132| 132| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 126| 126| 	this.formationMembersWithAura = []; // Members with a formation aura
| 127| 127| 	this.width = 0;
| 128| 128| 	this.depth = 0;
| 129|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 129|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 130| 130| 	this.twinFormations = [];
| 131| 131| 	// distance from which two twin formations will merge into one.
| 132| 132| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 144| 144| 
| 145| 145| Formation.prototype.GetSize = function()
| 146| 146| {
| 147|    |-	return {"width": this.width, "depth": this.depth};
|    | 147|+	return { "width": this.width, "depth": this.depth};
| 148| 148| };
| 149| 149| 
| 150| 150| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 144| 144| 
| 145| 145| Formation.prototype.GetSize = function()
| 146| 146| {
| 147|    |-	return {"width": this.width, "depth": this.depth};
|    | 147|+	return {"width": this.width, "depth": this.depth };
| 148| 148| };
| 149| 149| 
| 150| 150| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return { "width":1, "depth": 1};
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return {"width": 1, "depth": 1};
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return {"width":1, "depth": 1 };
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 565| 565| 	if (!footprints.length)
| 566| 566| 		return {"width":1, "depth": 1};
| 567| 567| 
| 568|    |-	var r = {"width": 0, "depth": 0};
|    | 568|+	var r = { "width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
| 570| 570| 	{
| 571| 571| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 565| 565| 	if (!footprints.length)
| 566| 566| 		return {"width":1, "depth": 1};
| 567| 567| 
| 568|    |-	var r = {"width": 0, "depth": 0};
|    | 568|+	var r = {"width": 0, "depth": 0 };
| 569| 569| 	for (var shape of footprints)
| 570| 570| 	{
| 571| 571| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
| 570|    |-	{
|    | 570|+	
| 571| 571| 		if (shape.type == "circle")
| 572| 572| 		{
| 573| 573| 			r.width += shape.radius * 2;
| 578| 578| 			r.width += shape.width;
| 579| 579| 			r.depth += shape.depth;
| 580| 580| 		}
| 581|    |-	}
|    | 581|+	
| 582| 582| 	r.width /= footprints.length;
| 583| 583| 	r.depth /= footprints.length;
| 584| 584| 	return r;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 591| 591| 	separation.depth *= this.separationMultiplier.depth;
| 592| 592| 
| 593| 593| 	if (this.columnar)
| 594|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 594|+		var sortingClasses = ["Cavalry", "Infantry"];
| 595| 595| 	else
| 596| 596| 		var sortingClasses = this.sortingClasses.slice();
| 597| 597| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 		var classes = cmpIdentity.GetClassesList();
| 609| 609| 		var done = false;
| 610| 610| 		for (var c = 0; c < sortingClasses.length; ++c)
| 611|    |-		{
|    | 611|+		
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614| 614| 				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
| 618|    |-		}
|    | 618|+		
| 619| 619| 		if (!done)
| 620| 620| 			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
| 621| 621| 	}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 		{
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 614|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 		{
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 614|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 635| 635| 	if (this.columnar)
| 636| 636| 	{
| 637| 637| 		shape = "square";
| 638|    |-		cols = Math.min(count,3);
|    | 638|+		cols = Math.min(count, 3);
| 639| 639| 		shiftRows = false;
| 640| 640| 		centerGap = 0;
| 641| 641| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 689| 689| 					n -= r%2;
| 690| 690| 			}
| 691| 691| 			else if (shape == "triangle")
| 692|    |-			{
|    | 692|+			
| 693| 693| 				if (shiftRows)
| 694| 694| 					var n = r + 1;
| 695| 695| 				else
| 696| 696| 					var n = r * 2 + 1;
| 697|    |-			}
|    | 697|+			
| 698| 698| 			if (!shiftRows && n > left)
| 699| 699| 				n = left;
| 700| 700| 			for (var c = 0; c < n && left > 0; ++c)
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 730| 730| 	// calculating offset distances without a zero average makes no sense, as the formation
| 731| 731| 	// will jump to a different position any time
| 732| 732| 	var avgoffset = Vector2D.average(offsets);
| 733|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 733|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 734| 734| 
| 735| 735| 	// sort the available places in certain ways
| 736| 736| 	// 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 '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 799| 799| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 800| 800| {
| 801| 801| 	var offsetPositions = [];
| 802|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 802|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 803| 803| 	// calculate the world positions
| 804| 804| 	for (var o of offsets)
| 805| 805| 		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 '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 799| 799| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 800| 800| {
| 801| 801| 	var offsetPositions = [];
| 802|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 802|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 803| 803| 	// calculate the world positions
| 804| 804| 	for (var o of offsets)
| 805| 805| 		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 '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 816| 816| Formation.prototype.GetEstimatedOrientation = function(pos)
| 817| 817| {
| 818| 818| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 819|    |-	var r = {"sin": 0, "cos": 1};
|    | 819|+	var r = { "sin": 0, "cos": 1};
| 820| 820| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 821| 821| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 822| 822| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 816| 816| Formation.prototype.GetEstimatedOrientation = function(pos)
| 817| 817| {
| 818| 818| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 819|    |-	var r = {"sin": 0, "cos": 1};
|    | 819|+	var r = {"sin": 0, "cos": 1 };
| 820| 820| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 821| 821| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 822| 822| 	{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 898| 898| 		cmpOtherFormation.RemoveMembers(otherMembers);
| 899| 899| 		this.AddMembers(otherMembers);
| 900| 900| 		Engine.DestroyEntity(this.twinFormations[i]);
| 901|    |-		this.twinFormations.splice(i,1);
|    | 901|+		this.twinFormations.splice(i, 1);
| 902| 902| 	}
| 903| 903| 	// Switch between column and box if necessary
| 904| 904| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 620| »   »   »   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
| 660| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 710| »   »   »   »   »   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
| 712| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 714| »   »   »   »   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
| 724| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 614| »   »   »   »   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
| 753| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

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

binaries/data/mods/public/simulation/components/Formation.js
| 860| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 410| 410| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 411| 411| 
| 412| 412| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 413|    |-			{
|    | 413|+			
| 414| 414| 				// For units, take the range in front of it, no spread. So angle = 0
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416|    |-			}
|    | 416|+			
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418| 418| 			{
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416| 416| 			}
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else
| 423| 423| 			{
| 424| 424| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421| 421| 			}
| 422| 422| 			else
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// not in world, set a default?
| 425| 425| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 426|    |-			}
|    | 426|+			
| 427| 427| 		}
| 428| 428| 	}
| 429| 429| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 791| 791| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 792| 792| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 793| 793| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 794|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 794|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 795| 795| 	}
| 796| 796| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 797| 797| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1310|1310| 		}
|1311|1311| 	}
|1312|1312| 	else
|1313|    |-	{
|    |1313|+	
|1314|1314| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1315|1315| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1316|1316| 		// wall piece.
|1331|1331| 			"pos": start.pos,
|1332|1332| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1333|1333| 		});
|1334|    |-	}
|    |1334|+	
|1335|1335| 
|1336|1336| 	if (end.pos)
|1337|1337| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1334|1334| 	}
|1335|1335| 
|1336|1336| 	if (end.pos)
|1337|    |-	{
|    |1337|+	
|1338|1338| 		// Analogous to the starting side case above
|1339|1339| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1340|1340| 		{
|1372|1372| 				"pos": end.pos,
|1373|1373| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1374|1374| 			});
|1375|    |-	}
|    |1375|+	
|1376|1376| 
|1377|1377| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1378|1378| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1550|1550| 
|1551|1551| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1552|1552| 		if (cmpVisual)
|1553|    |-		{
|    |1553|+		
|1554|1554| 			if (!allPiecesValid || !canAfford)
|1555|1555| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1556|1556| 			else
|1557|1557| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1558|    |-		}
|    |1558|+		
|1559|1559| 
|1560|1560| 		++entPool.numUsed;
|1561|1561| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1624|1624| 			{
|1625|1625| 				minDist2 = dist2;
|1626|1626| 				minDistEntitySnapData = {
|1627|    |-						"x": pos.x,
|    |1627|+					"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1625|1625| 				minDist2 = dist2;
|1626|1626| 				minDistEntitySnapData = {
|1627|1627| 						"x": pos.x,
|1628|    |-						"z": pos.z,
|    |1628|+					"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|1631|1631| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1626|1626| 				minDistEntitySnapData = {
|1627|1627| 						"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|    |-						"angle": cmpPosition.GetRotation().y,
|    |1629|+					"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|1631|1631| 				};
|1632|1632| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1627|1627| 						"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|    |-						"ent": ent
|    |1630|+					"ent": ent
|1631|1631| 				};
|1632|1632| 			}
|1633|1633| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1772|1772| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1773|1773| 	}
|1774|1774| 	else if (data.target === secondMarket)
|1775|    |-	{
|    |1775|+	
|1776|1776| 		result = {
|1777|1777| 			"type": "is second",
|1778|1778| 			"gain": cmpEntityTrader.GetGoods().amount,
|1779|1779| 		};
|1780|    |-	}
|    |1780|+	
|1781|1781| 	else if (!firstMarket)
|1782|1782| 	{
|1783|1783| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 		};
|1780|1780| 	}
|1781|1781| 	else if (!firstMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = { "type": "set first" };
|1784|    |-	}
|    |1784|+	
|1785|1785| 	else if (!secondMarket)
|1786|1786| 	{
|1787|1787| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1783|1783| 		result = { "type": "set first" };
|1784|1784| 	}
|1785|1785| 	else if (!secondMarket)
|1786|    |-	{
|    |1786|+	
|1787|1787| 		result = {
|1788|1788| 			"type": "set second",
|1789|1789| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1790|1790| 		};
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else
|1793|1793| 	{
|1794|1794| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		};
|1791|1791| 	}
|1792|1792| 	else
|1793|    |-	{
|    |1793|+	
|1794|1794| 		// Else both markets are not null and target is different from them
|1795|1795| 		result = { "type": "set first" };
|1796|    |-	}
|    |1796|+	
|1797|1797| 	return result;
|1798|1798| };
|1799|1799| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClass' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|   8|   8| let height = 5;
|   9|   9| 
|  10|  10| AddMock(SYSTEM_ENTITY, IID_Pathfinder, {
|  11|    |-	GetPassabilityClass: (name) => 1 << 8
|    |  11|+	"GetPassabilityClass": (name) => 1 << 8
|  12|  12| });
|  13|  13| 
|  14|  14| let cmpUnitMotionFlying = ConstructComponent(entity, "UnitMotionFlying", {

binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|  45| »   "SetHeightFixed":·(y)·=>·height·=·y,
|    | [NORMAL] ESLintBear (no-return-assign):
|    | Arrow function should not return assignment.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 228| 228| 		// Move a tile outside the building
| 229| 229| 		let range = 4;
| 230| 230| 		if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
| 231|    |-		{
|    | 231|+		
| 232| 232| 			// We've started walking to the given point
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234|    |-		}
|    | 234|+		
| 235| 235| 		else
| 236| 236| 		{
| 237| 237| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234| 234| 		}
| 235| 235| 		else
| 236|    |-		{
|    | 236|+		
| 237| 237| 			// We are already at the target, or can't move at all
| 238| 238| 			this.FinishOrder();
| 239|    |-		}
|    | 239|+		
| 240| 240| 	},
| 241| 241| 
| 242| 242| 	// Individual orders:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 335| 335| 
| 336| 336| 		var ok = this.MoveToTarget(this.order.data.target);
| 337| 337| 		if (ok)
| 338|    |-		{
|    | 338|+		
| 339| 339| 			// We've started walking to the given point
| 340| 340| 			if (this.IsAnimal())
| 341| 341| 				this.SetNextState("ANIMAL.WALKING");
| 342| 342| 			else
| 343| 343| 				this.SetNextState("INDIVIDUAL.WALKING");
| 344|    |-		}
|    | 344|+		
| 345| 345| 		else
| 346| 346| 		{
| 347| 347| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364| 364| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365| 365| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366|    |-		{
|    | 366|+		
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 369| 369| 				needToMove = false;
| 370|    |-		}
|    | 370|+		
| 371| 371| 
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 361| 361| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 362| 362| 		var needToMove = true;
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 364|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 365|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366| 366| 		{
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
| 374| 374| 		if (needToMove && this.MoveToTarget(this.order.data.target))
| 375|    |-		{
|    | 375|+		
| 376| 376| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
| 377|    |-		}
|    | 377|+		
| 378| 378| 		else
| 379| 379| 		{
| 380| 380| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 401| 401| 		var distance = DistanceBetweenEntities(this.entity, this.order.data.target) + (+this.template.FleeDistance);
| 402| 402| 		var cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
| 403| 403| 		if (cmpUnitMotion.MoveToTargetRange(this.order.data.target, distance, -1))
| 404|    |-		{
|    | 404|+		
| 405| 405| 			// We've started fleeing from the given target
| 406| 406| 			if (this.IsAnimal())
| 407| 407| 				this.SetNextState("ANIMAL.FLEEING");
| 408| 408| 			else
| 409| 409| 				this.SetNextState("INDIVIDUAL.FLEEING");
| 410|    |-		}
|    | 410|+		
| 411| 411| 		else
| 412| 412| 		{
| 413| 413| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 448| 448| 			}
| 449| 449| 
| 450| 450| 			if (this.order.data.attackType == this.oldAttackType)
| 451|    |-			{
|    | 451|+			
| 452| 452| 				if (this.IsAnimal())
| 453| 453| 					this.SetNextState("ANIMAL.COMBAT.ATTACKING");
| 454| 454| 				else
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456|    |-			}
|    | 456|+			
| 457| 457| 			else
| 458| 458| 			{
| 459| 459| 				if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456| 456| 			}
| 457| 457| 			else
| 458|    |-			{
|    | 458|+			
| 459| 459| 				if (this.IsAnimal())
| 460| 460| 					this.SetNextStateAlwaysEntering("ANIMAL.COMBAT.ATTACKING");
| 461| 461| 				else
| 462| 462| 					this.SetNextStateAlwaysEntering("INDIVIDUAL.COMBAT.ATTACKING");
| 463|    |-			}
|    | 463|+			
| 464| 464| 			return;
| 465| 465| 		}
| 466| 466| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 580| 580| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 581| 581| 				}
| 582| 582| 				else
| 583|    |-				{
|    | 583|+				
| 584| 584| 					// We couldn't move there, or the target moved away
| 585| 585| 					this.FinishOrder();
| 586|    |-				}
|    | 586|+				
| 587| 587| 				return;
| 588| 588| 			}
| 589| 589| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 593| 593| 
| 594| 594| 		// Try to move within range
| 595| 595| 		if (this.MoveToTargetRange(this.order.data.target, IID_ResourceGatherer))
| 596|    |-		{
|    | 596|+		
| 597| 597| 			// We've started walking to the given point
| 598| 598| 			this.SetNextState("INDIVIDUAL.GATHER.APPROACHING");
| 599|    |-		}
|    | 599|+		
| 600| 600| 		else
| 601| 601| 		{
| 602| 602| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 670| 670| 	"Order.Repair": function(msg) {
| 671| 671| 		// Try to move within range
| 672| 672| 		if (this.MoveToTargetRange(this.order.data.target, IID_Builder))
| 673|    |-		{
|    | 673|+		
| 674| 674| 			// We've started walking to the given point
| 675| 675| 			this.SetNextState("INDIVIDUAL.REPAIR.APPROACHING");
| 676|    |-		}
|    | 676|+		
| 677| 677| 		else
| 678| 678| 		{
| 679| 679| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 706| 706| 		}
| 707| 707| 
| 708| 708| 		if (this.MoveToGarrisonRange(this.order.data.target))
| 709|    |-		{
|    | 709|+		
| 710| 710| 			this.SetNextState("INDIVIDUAL.GARRISON.APPROACHING");
| 711|    |-		}
|    | 711|+		
| 712| 712| 		else
| 713| 713| 		{
| 714| 714| 			// We do a range check before actually garrisoning
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 834| 834| 			if (!this.CheckTargetAttackRange(target, target))
| 835| 835| 			{
| 836| 836| 				if (this.TargetIsAlive(target) && this.CheckTargetVisible(target))
| 837|    |-				{
|    | 837|+				
| 838| 838| 					if (this.MoveToTargetAttackRange(target, target))
| 839| 839| 					{
| 840| 840| 						this.SetNextState("COMBAT.APPROACHING");
| 841| 841| 						return;
| 842| 842| 					}
| 843|    |-				}
|    | 843|+				
| 844| 844| 				this.FinishOrder();
| 845| 845| 				return;
| 846| 846| 			}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 859| 859| 			}
| 860| 860| 			// Check if we are already in range, otherwise walk there
| 861| 861| 			if (!this.CheckGarrisonRange(msg.data.target))
| 862|    |-			{
|    | 862|+			
| 863| 863| 				if (!this.CheckTargetVisible(msg.data.target))
| 864| 864| 				{
| 865| 865| 					this.FinishOrder();
| 874| 874| 						return;
| 875| 875| 					}
| 876| 876| 				}
| 877|    |-			}
|    | 877|+			
| 878| 878| 
| 879| 879| 			this.SetNextState("GARRISON.GARRISONING");
| 880| 880| 		},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 866| 866| 					return;
| 867| 867| 				}
| 868| 868| 				else
| 869|    |-				{
|    | 869|+				
| 870| 870| 					// Out of range; move there in formation
| 871| 871| 					if (this.MoveToGarrisonRange(msg.data.target))
| 872| 872| 					{
| 873| 873| 						this.SetNextState("GARRISON.APPROACHING");
| 874| 874| 						return;
| 875| 875| 					}
| 876|    |-				}
|    | 876|+				
| 877| 877| 			}
| 878| 878| 
| 879| 879| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 865| 865| 					this.FinishOrder();
| 866| 866| 					return;
| 867| 867| 				}
| 868|    |-				else
| 869|    |-				{
|    | 868|+				
| 870| 869| 					// Out of range; move there in formation
| 871| 870| 					if (this.MoveToGarrisonRange(msg.data.target))
| 872| 871| 					{
| 873| 872| 						this.SetNextState("GARRISON.APPROACHING");
| 874| 873| 						return;
| 875| 874| 					}
| 876|    |-				}
|    | 875|+				
| 877| 876| 			}
| 878| 877| 
| 879| 878| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 892| 892| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 893| 893| 					}
| 894| 894| 					else
| 895|    |-					{
|    | 895|+					
| 896| 896| 						// We couldn't move there, or the target moved away
| 897| 897| 						this.FinishOrder();
| 898|    |-					}
|    | 898|+					
| 899| 899| 					return;
| 900| 900| 				}
| 901| 901| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1113|1113| 			},
|1114|1114| 		},
|1115|1115| 
|1116|    |-		"GARRISON":{
|    |1116|+		"GARRISON": {
|1117|1117| 			"enter": function() {
|1118|1118| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1119|1119| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1297|1297| 			// If the controller handled an order but some members rejected it,
|1298|1298| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1299|1299| 			if (this.orderQueue.length)
|1300|    |-			{
|    |1300|+			
|1301|1301| 				// We're leaving the formation, so stop our FormationWalk order
|1302|1302| 				if (this.FinishOrder())
|1303|1303| 					return;
|1304|    |-			}
|    |1304|+			
|1305|1305| 
|1306|1306| 			// No orders left, we're an individual now
|1307|1307| 			if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1325|1325| 			// Move a tile outside the building
|1326|1326| 			let range = 4;
|1327|1327| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|1328|    |-			{
|    |1328|+			
|1329|1329| 				// We've started walking to the given point
|1330|1330| 				this.SetNextState("WALKINGTOPOINT");
|1331|    |-			}
|    |1331|+			
|1332|1332| 			else
|1333|1333| 			{
|1334|1334| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1330|1330| 				this.SetNextState("WALKINGTOPOINT");
|1331|1331| 			}
|1332|1332| 			else
|1333|    |-			{
|    |1333|+			
|1334|1334| 				// We are already at the target, or can't move at all
|1335|1335| 				this.FinishOrder();
|1336|    |-			}
|    |1336|+			
|1337|1337| 		},
|1338|1338| 
|1339|1339| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1531|1531| 
|1532|1532| 			"LosRangeUpdate": function(msg) {
|1533|1533| 				if (this.GetStance().targetVisibleEnemies)
|1534|    |-				{
|    |1534|+				
|1535|1535| 					// Start attacking one of the newly-seen enemy (if any)
|1536|1536| 					this.AttackEntitiesByPreference(msg.data.added);
|1537|    |-				}
|    |1537|+				
|1538|1538| 			},
|1539|1539| 
|1540|1540| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1717|1717| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1718|1718| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1719|1719| 						if (cmpHealth && (cmpHealth.GetHitpoints() < cmpHealth.GetMaxHitpoints()))
|1720|    |-						{
|    |1720|+						
|1721|1721| 							if (this.CanHeal(this.isGuardOf))
|1722|1722| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1723|1723| 							else if (this.CanRepair(this.isGuardOf))
|1724|1724| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1725|    |-						}
|    |1725|+						
|1726|1726| 					}
|1727|1727| 				},
|1728|1728| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1802|1802| 				"MoveCompleted": function() {
|1803|1803| 
|1804|1804| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1805|    |-					{
|    |1805|+					
|1806|1806| 						// If the unit needs to unpack, do so
|1807|1807| 						if (this.CanUnpack())
|1808|1808| 						{
|1811|1811| 						}
|1812|1812| 						else
|1813|1813| 							this.SetNextState("ATTACKING");
|1814|    |-					}
|    |1814|+					
|1815|1815| 					else
|1816|1816| 					{
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1809|1809| 							this.PushOrderFront("Unpack", { "force": true });
|1810|1810| 							return;
|1811|1811| 						}
|1812|    |-						else
|1813|    |-							this.SetNextState("ATTACKING");
|    |1812|+						this.SetNextState("ATTACKING");
|1814|1813| 					}
|1815|1814| 					else
|1816|1815| 					{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1813|1813| 							this.SetNextState("ATTACKING");
|1814|1814| 					}
|1815|1815| 					else
|1816|    |-					{
|    |1816|+					
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1818|1818| 						{
|1819|1819| 							this.SetNextState("APPROACHING");
|1823|1823| 							// Give up
|1824|1824| 							this.FinishOrder();
|1825|1825| 						}
|1826|    |-					}
|    |1826|+					
|1827|1827| 				},
|1828|1828| 			},
|1829|1829| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1815|1815| 					else
|1816|1816| 					{
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1818|    |-						{
|    |1818|+						
|1819|1819| 							this.SetNextState("APPROACHING");
|1820|    |-						}
|    |1820|+						
|1821|1821| 						else
|1822|1822| 						{
|1823|1823| 							// Give up
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1819|1819| 							this.SetNextState("APPROACHING");
|1820|1820| 						}
|1821|1821| 						else
|1822|    |-						{
|    |1822|+						
|1823|1823| 							// Give up
|1824|1824| 							this.FinishOrder();
|1825|    |-						}
|    |1825|+						
|1826|1826| 					}
|1827|1827| 				},
|1828|1828| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1840|1840| 					}
|1841|1841| 					// Check the target is still alive and attackable
|1842|1842| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1843|    |-					{
|    |1843|+					
|1844|1844| 						// Can't reach it - try to chase after it
|1845|1845| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1846|1846| 						{
|1855|1855| 								return;
|1856|1856| 							}
|1857|1857| 						}
|1858|    |-					}
|    |1858|+					
|1859|1859| 
|1860|1860| 					var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|1861|1861| 					this.attackTimers = cmpAttack.GetTimers(this.order.data.attackType);
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1886|1886| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1887|1887| 
|1888|1888| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1889|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1889|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1890|1890| 
|1891|1891| 					this.FaceTowardsTarget(this.order.data.target);
|1892|1892| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2015|2015| 
|2016|2016| 				"Attacked": function(msg) {
|2017|2017| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2018|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2019|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2018|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2019|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2020|2020| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2021|2021| 				},
|2022|2022| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2029|2029| 					this.SelectAnimation("move");
|2030|2030| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2031|2031| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2032|    |-					{
|    |2032|+					
|2033|2033| 						// Run after a fleeing target
|2034|2034| 						this.SetMoveSpeedRatio(this.GetRunMultiplier());
|2035|    |-					}
|    |2035|+					
|2036|2036| 					this.StartTimer(1000, 1000);
|2037|2037| 				},
|2038|2038| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2097|2097| 						// Also don't switch to a different type of huntable animal
|2098|2098| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2099|2099| 							return (
|2100|    |-								ent != oldTarget
|2101|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2100|+								ent != oldTarget &&
|    |2101|+								 ((type.generic == "treasure" && oldType.generic == "treasure")
|2102|2102| 								 || (type.specific == oldType.specific
|2103|2103| 								 && (type.specific != "meat" || oldTemplate == template)))
|2104|2104| 							);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2098|2098| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2099|2099| 							return (
|2100|2100| 								ent != oldTarget
|2101|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2102|    |-								 || (type.specific == oldType.specific
|    |2101|+								 && ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2102|+								 (type.specific == oldType.specific
|2103|2103| 								 && (type.specific != "meat" || oldTemplate == template)))
|2104|2104| 							);
|2105|2105| 						}, oldTarget);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2099|2099| 							return (
|2100|2100| 								ent != oldTarget
|2101|2101| 								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2102|    |-								 || (type.specific == oldType.specific
|2103|    |-								 && (type.specific != "meat" || oldTemplate == template)))
|    |2102|+								 || (type.specific == oldType.specific &&
|    |2103|+								 (type.specific != "meat" || oldTemplate == template)))
|2104|2104| 							);
|2105|2105| 						}, oldTarget);
|2106|2106| 						if (nearby)
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2108|2108| 							this.PerformGather(nearby, false, false);
|2109|2109| 							return true;
|2110|2110| 						}
|2111|    |-						else
|2112|    |-						{
|    |2111|+						
|2113|2112| 							// It's probably better in this case, to avoid units getting stuck around a dropsite
|2114|2113| 							// in a "Target is far away, full, nearby are no good resources, return to dropsite" loop
|2115|2114| 							// to order it to GatherNear the resource position.
|2130|2129| 									return true;
|2131|2130| 								}
|2132|2131| 							}
|2133|    |-						}
|    |2132|+						
|2134|2133| 						return true;
|2135|2134| 					}
|2136|2135| 					return false;
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2120|2120| 								this.GatherNearPosition(pos.x, pos.z, oldType, oldTemplate);
|2121|2121| 								return true;
|2122|2122| 							}
|2123|    |-							else
|2124|    |-							{
|    |2123|+							
|2125|2124| 								// we're kind of stuck here. Return resource.
|2126|2125| 								var nearby = this.FindNearestDropsite(oldType.generic);
|2127|2126| 								if (nearby)
|2129|2128| 									this.PushOrderFront("ReturnResource", { "target": nearby, "force": false });
|2130|2129| 									return true;
|2131|2130| 								}
|2132|    |-							}
|    |2131|+							
|2133|2132| 						}
|2134|2133| 						return true;
|2135|2134| 					}
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2162|2162| 						// Also don't switch to a different type of huntable animal
|2163|2163| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2164|2164| 							return (
|2165|    |-								ent != oldTarget
|2166|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2165|+								ent != oldTarget &&
|    |2166|+								((type.generic == "treasure" && oldType.generic == "treasure")
|2167|2167| 								|| (type.specific == oldType.specific
|2168|2168| 								&& (type.specific != "meat" || oldTemplate == template)))
|2169|2169| 							);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2163|2163| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2164|2164| 							return (
|2165|2165| 								ent != oldTarget
|2166|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2167|    |-								|| (type.specific == oldType.specific
|    |2166|+								&& ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2167|+								(type.specific == oldType.specific
|2168|2168| 								&& (type.specific != "meat" || oldTemplate == template)))
|2169|2169| 							);
|2170|2170| 						});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2164|2164| 							return (
|2165|2165| 								ent != oldTarget
|2166|2166| 								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2167|    |-								|| (type.specific == oldType.specific
|2168|    |-								&& (type.specific != "meat" || oldTemplate == template)))
|    |2167|+								|| (type.specific == oldType.specific &&
|    |2168|+								(type.specific != "meat" || oldTemplate == template)))
|2169|2169| 							);
|2170|2170| 						});
|2171|2171| 						if (nearby)
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2209|2209| 					// Also don't switch to a different type of huntable animal
|2210|2210| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2211|2211| 						return (
|2212|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2213|    |-							|| (type.specific == resourceType.specific
|    |2212|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2213|+							(type.specific == resourceType.specific
|2214|2214| 							&& (type.specific != "meat" || resourceTemplate == template))
|2215|2215| 						);
|2216|2216| 					});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2210|2210| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2211|2211| 						return (
|2212|2212| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2213|    |-							|| (type.specific == resourceType.specific
|2214|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2213|+							|| (type.specific == resourceType.specific &&
|    |2214|+							(type.specific != "meat" || resourceTemplate == template))
|2215|2215| 						);
|2216|2216| 					});
|2217|2217| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2326|2326| 
|2327|2327| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2328|2328| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2329|    |-					{
|    |2329|+					
|2330|2330| 						// Check we can still reach and gather from the target
|2331|2331| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2332|2332| 						{
|2392|2392| 								return;
|2393|2393| 							}
|2394|2394| 						}
|2395|    |-					}
|    |2395|+					
|2396|2396| 
|2397|2397| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2398|2398| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2418|2418| 					// Also don't switch to a different type of huntable animal
|2419|2419| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2420|2420| 						return (
|2421|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2422|    |-							|| (type.specific == resourceType.specific
|    |2421|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2422|+							(type.specific == resourceType.specific
|2423|2423| 							&& (type.specific != "meat" || resourceTemplate == template))
|2424|2424| 						);
|2425|2425| 					});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2419|2419| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2420|2420| 						return (
|2421|2421| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2422|    |-							|| (type.specific == resourceType.specific
|2423|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2422|+							|| (type.specific == resourceType.specific &&
|    |2423|+							(type.specific != "meat" || resourceTemplate == template))
|2424|2424| 						);
|2425|2425| 					});
|2426|2426| 					if (nearby)
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2506|2506| 					this.StartTimer(prepare, this.healTimers.repeat);
|2507|2507| 
|2508|2508| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2509|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2509|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2510|2510| 
|2511|2511| 					this.FaceTowardsTarget(this.order.data.target);
|2512|2512| 				},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2721|2721| 					{
|2722|2722| 						// The building was already finished/fully repaired before we arrived;
|2723|2723| 						// let the ConstructionFinished handler handle this.
|2724|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2724|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2725|2725| 						return true;
|2726|2726| 					}
|2727|2727| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2721|2721| 					{
|2722|2722| 						// The building was already finished/fully repaired before we arrived;
|2723|2723| 						// let the ConstructionFinished handler handle this.
|2724|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2724|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2725|2725| 						return true;
|2726|2726| 					}
|2727|2727| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2761|2761| 					if (this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2762|2762| 						this.SetNextState("APPROACHING");
|2763|2763| 					else if (!this.CheckTargetRange(this.repairTarget, IID_Builder))
|2764|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2764|+						this.FinishOrder(); // can't approach and isn't in reach
|2765|2765| 				},
|2766|2766| 			},
|2767|2767| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2848|2848| 
|2849|2849| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2850|2850| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2851|    |-				{
|    |2851|+				
|2852|2852| 					// We're already walking to the given point, so add this as a order.
|2853|2853| 					this.WalkToTarget(msg.data.newentity, true);
|2854|    |-				}
|    |2854|+				
|2855|2855| 			},
|2856|2856| 		},
|2857|2857| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2901|2901| 
|2902|2902| 					// Check that we can garrison here
|2903|2903| 					if (this.CanGarrison(target))
|2904|    |-					{
|    |2904|+					
|2905|2905| 						// Check that we're in range of the garrison target
|2906|2906| 						if (this.CheckGarrisonRange(target))
|2907|2907| 						{
|2977|2977| 								return false;
|2978|2978| 							}
|2979|2979| 						}
|2980|    |-					}
|    |2980|+					
|2981|2981| 					// Garrisoning failed for some reason, so finish the order
|2982|2982| 					this.FinishOrder();
|2983|2983| 					return true;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3084|3084| 		"Attacked": function(msg) {
|3085|3085| 			if (this.template.NaturalBehaviour == "skittish" ||
|3086|3086| 			    this.template.NaturalBehaviour == "passive")
|3087|    |-			{
|    |3087|+			
|3088|3088| 				this.Flee(msg.data.attacker, false);
|3089|    |-			}
|    |3089|+			
|3090|3090| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3091|3091| 			{
|3092|3092| 				if (this.CanAttack(msg.data.attacker))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3093|3093| 					this.Attack(msg.data.attacker, false);
|3094|3094| 			}
|3095|3095| 			else if (this.template.NaturalBehaviour == "domestic")
|3096|    |-			{
|    |3096|+			
|3097|3097| 				// Never flee, stop what we were doing
|3098|3098| 				this.SetNextState("IDLE");
|3099|    |-			}
|    |3099|+			
|3100|3100| 		},
|3101|3101| 
|3102|3102| 		"Order.LeaveFoundation": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3103|3103| 			// Move a tile outside the building
|3104|3104| 			var range = 4;
|3105|3105| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|3106|    |-			{
|    |3106|+			
|3107|3107| 				// We've started walking to the given point
|3108|3108| 				this.SetNextState("WALKING");
|3109|    |-			}
|    |3109|+			
|3110|3110| 			else
|3111|3111| 			{
|3112|3112| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3108|3108| 				this.SetNextState("WALKING");
|3109|3109| 			}
|3110|3110| 			else
|3111|    |-			{
|    |3111|+			
|3112|3112| 				// We are already at the target, or can't move at all
|3113|3113| 				this.FinishOrder();
|3114|    |-			}
|    |3114|+			
|3115|3115| 		},
|3116|3116| 
|3117|3117| 		"IDLE": {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3150|3150| 				}
|3151|3151| 				// Start attacking one of the newly-seen enemy (if any)
|3152|3152| 				else if (this.IsDangerousAnimal())
|3153|    |-				{
|    |3153|+				
|3154|3154| 					this.AttackVisibleEntity(msg.data.added);
|3155|    |-				}
|    |3155|+				
|3156|3156| 
|3157|3157| 				// TODO: if two units enter our range together, we'll attack the
|3158|3158| 				// first and then the second won't trigger another LosRangeUpdate
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3193|3193| 				}
|3194|3194| 				// Start attacking one of the newly-seen enemy (if any)
|3195|3195| 				else if (this.template.NaturalBehaviour == "violent")
|3196|    |-				{
|    |3196|+				
|3197|3197| 					this.AttackVisibleEntity(msg.data.added);
|3198|    |-				}
|    |3198|+				
|3199|3199| 			},
|3200|3200| 
|3201|3201| 			"MoveCompleted": function() { },
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3210|3210| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3211|3211| 
|3212|3212| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3213|    |-							// only used for domestic animals
|    |3213|+		// only used for domestic animals
|3214|3214| 	},
|3215|3215| };
|3216|3216| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3267|3267| 
|3268|3268| UnitAI.prototype.IsAnimal = function()
|3269|3269| {
|3270|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3270|+	return (!!this.template.NaturalBehaviour);
|3271|3271| };
|3272|3272| 
|3273|3273| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3305|3305| UnitAI.prototype.GetGarrisonHolder = function()
|3306|3306| {
|3307|3307| 	if (this.IsGarrisoned())
|3308|    |-	{
|    |3308|+	
|3309|3309| 		for (let order of this.orderQueue)
|3310|3310| 			if (order.type == "Garrison")
|3311|3311| 				return order.data.target;
|3312|    |-	}
|    |3312|+	
|3313|3313| 	return INVALID_ENTITY;
|3314|3314| };
|3315|3315| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3383|3383| 		{
|3384|3384| 			let index = this.GetCurrentState().indexOf(".");
|3385|3385| 			if (index != -1)
|3386|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3386|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3387|3387| 			this.Stop(false);
|3388|3388| 		}
|3389|3389| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3439|3439| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3440|3440| 			continue;
|3441|3441| 		if (i == 0)
|3442|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3442|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3443|3443| 		else
|3444|3444| 			this.orderQueue.splice(i, 1);
|3445|3445| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3439|3439| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3440|3440| 			continue;
|3441|3441| 		if (i == 0)
|3442|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3442|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3443|3443| 		else
|3444|3444| 			this.orderQueue.splice(i, 1);
|3445|3445| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3523|3523| };
|3524|3524| 
|3525|3525| 
|3526|    |-//// FSM linkage functions ////
|    |3526|+// // FSM linkage functions ////
|3527|3527| 
|3528|3528| UnitAI.prototype.SetNextState = function(state)
|3529|3529| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3697|3697| 				continue;
|3698|3698| 			if (this.orderQueue[i].type == type)
|3699|3699| 				continue;
|3700|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3700|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3701|3701| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3702|3702| 			return;
|3703|3703| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3697|3697| 				continue;
|3698|3698| 			if (this.orderQueue[i].type == type)
|3699|3699| 				continue;
|3700|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3700|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3701|3701| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3702|3702| 			return;
|3703|3703| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3711|3711| {
|3712|3712| 	// Remember the previous work orders to be able to go back to them later if required
|3713|3713| 	if (data && data.force)
|3714|    |-	{
|    |3714|+	
|3715|3715| 		if (this.IsFormationController())
|3716|3716| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3717|3717| 		else
|3718|3718| 			this.UpdateWorkOrders(type);
|3719|    |-	}
|    |3719|+	
|3720|3720| 
|3721|3721| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3722|3722| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3788|3788| 	{
|3789|3789| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3790|3790| 		if (cmpUnitAI)
|3791|    |-		{
|    |3791|+		
|3792|3792| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3793|3793| 			{
|3794|3794| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3797|3797| 					return;
|3798|3798| 				}
|3799|3799| 			}
|3800|    |-		}
|    |3800|+		
|3801|3801| 	}
|3802|3802| 
|3803|3803| 	// If nothing found, take the unit orders
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3790|3790| 		if (cmpUnitAI)
|3791|3791| 		{
|3792|3792| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3793|    |-			{
|    |3793|+			
|3794|3794| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3795|3795| 				{
|3796|3796| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3797|3797| 					return;
|3798|3798| 				}
|3799|    |-			}
|    |3799|+			
|3800|3800| 		}
|3801|3801| 	}
|3802|3802| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3802|3802| 
|3803|3803| 	// If nothing found, take the unit orders
|3804|3804| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3805|    |-	{
|    |3805|+	
|3806|3806| 		if (isWorkType(this.orderQueue[i].type))
|3807|3807| 		{
|3808|3808| 			this.workOrders = this.orderQueue.slice(i);
|3809|3809| 			return;
|3810|3810| 		}
|3811|    |-	}
|    |3811|+	
|3812|3812| };
|3813|3813| 
|3814|3814| UnitAI.prototype.BackToWork = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3868|3868| 	if (data.timerRepeat === undefined)
|3869|3869| 		this.timer = undefined;
|3870|3870| 
|3871|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3871|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3872|3872| };
|3873|3873| 
|3874|3874| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3868|3868| 	if (data.timerRepeat === undefined)
|3869|3869| 		this.timer = undefined;
|3870|3870| 
|3871|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3871|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3872|3872| };
|3873|3873| 
|3874|3874| /**
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3903|3903| 	this.timer = undefined;
|3904|3904| };
|3905|3905| 
|3906|    |-//// Message handlers /////
|    |3906|+// // Message handlers /////
|3907|3907| 
|3908|3908| UnitAI.prototype.OnMotionChanged = function(msg)
|3909|3909| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3908|3908| UnitAI.prototype.OnMotionChanged = function(msg)
|3909|3909| {
|3910|3910| 	if (msg.starting && !msg.error)
|3911|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3911|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveStarted", "data": msg});
|3912|3912| 	else if (!msg.starting || msg.error)
|3913|3913| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3914|3914| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3908|3908| UnitAI.prototype.OnMotionChanged = function(msg)
|3909|3909| {
|3910|3910| 	if (msg.starting && !msg.error)
|3911|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3911|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg });
|3912|3912| 	else if (!msg.starting || msg.error)
|3913|3913| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3914|3914| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3910|3910| 	if (msg.starting && !msg.error)
|3911|3911| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3912|3912| 	else if (!msg.starting || msg.error)
|3913|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3913|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveCompleted", "data": msg});
|3914|3914| };
|3915|3915| 
|3916|3916| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3910|3910| 	if (msg.starting && !msg.error)
|3911|3911| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3912|3912| 	else if (!msg.starting || msg.error)
|3913|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3913|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg });
|3914|3914| };
|3915|3915| 
|3916|3916| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3918|3918| 	// TODO: This is a bit inefficient since every unit listens to every
|3919|3919| 	// construction message - ideally we could scope it to only the one we're building
|3920|3920| 
|3921|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3921|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3922|3922| };
|3923|3923| 
|3924|3924| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3918|3918| 	// TODO: This is a bit inefficient since every unit listens to every
|3919|3919| 	// construction message - ideally we could scope it to only the one we're building
|3920|3920| 
|3921|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3921|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3922|3922| };
|3923|3923| 
|3924|3924| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3943|3943| 
|3944|3944| UnitAI.prototype.OnAttacked = function(msg)
|3945|3945| {
|3946|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3946|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3947|3947| };
|3948|3948| 
|3949|3949| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3943|3943| 
|3944|3944| UnitAI.prototype.OnAttacked = function(msg)
|3945|3945| {
|3946|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3946|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3947|3947| };
|3948|3948| 
|3949|3949| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3948|3948| 
|3949|3949| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3950|3950| {
|3951|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3951|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3952|3952| };
|3953|3953| 
|3954|3954| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3948|3948| 
|3949|3949| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3950|3950| {
|3951|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3951|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3952|3952| };
|3953|3953| 
|3954|3954| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3953|3953| 
|3954|3954| UnitAI.prototype.OnHealthChanged = function(msg)
|3955|3955| {
|3956|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3956|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3957|3957| };
|3958|3958| 
|3959|3959| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3953|3953| 
|3954|3954| UnitAI.prototype.OnHealthChanged = function(msg)
|3955|3955| {
|3956|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3956|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3957|3957| };
|3958|3958| 
|3959|3959| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3959|3959| UnitAI.prototype.OnRangeUpdate = function(msg)
|3960|3960| {
|3961|3961| 	if (msg.tag == this.losRangeQuery)
|3962|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3962|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3963|3963| 	else if (msg.tag == this.losHealRangeQuery)
|3964|3964| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3965|3965| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3959|3959| UnitAI.prototype.OnRangeUpdate = function(msg)
|3960|3960| {
|3961|3961| 	if (msg.tag == this.losRangeQuery)
|3962|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3962|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3963|3963| 	else if (msg.tag == this.losHealRangeQuery)
|3964|3964| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3965|3965| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3961|3961| 	if (msg.tag == this.losRangeQuery)
|3962|3962| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3963|3963| 	else if (msg.tag == this.losHealRangeQuery)
|3964|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3964|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3965|3965| };
|3966|3966| 
|3967|3967| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3961|3961| 	if (msg.tag == this.losRangeQuery)
|3962|3962| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3963|3963| 	else if (msg.tag == this.losHealRangeQuery)
|3964|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3964|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3965|3965| };
|3966|3966| 
|3967|3967| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3966|3966| 
|3967|3967| UnitAI.prototype.OnPackFinished = function(msg)
|3968|3968| {
|3969|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3969|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3970|3970| };
|3971|3971| 
|3972|3972| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3966|3966| 
|3967|3967| UnitAI.prototype.OnPackFinished = function(msg)
|3968|3968| {
|3969|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3969|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3970|3970| };
|3971|3971| 
|3972|3972| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3969|3969| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3970|3970| };
|3971|3971| 
|3972|    |-//// Helper functions to be called by the FSM ////
|    |3972|+// // Helper functions to be called by the FSM ////
|3973|3973| 
|3974|3974| UnitAI.prototype.GetRunMultiplier = function()
|3975|3975| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4063|4063| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4064|4064| 		return undefined;
|4065|4065| 
|4066|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4066|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4067|4067| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4068|4068| 		return undefined;
|4069|4069| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4148|4148| 			PlaySound(name, member);
|4149|4149| 	}
|4150|4150| 	else
|4151|    |-	{
|    |4151|+	
|4152|4152| 		// Otherwise use our own sounds
|4153|4153| 		PlaySound(name, this.entity);
|4154|    |-	}
|    |4154|+	
|4155|4155| };
|4156|4156| 
|4157|4157| /*
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4317|4317| 	else
|4318|4318| 		// return false? Or hope you come close enough?
|4319|4319| 		var parabolicMaxRange = 0;
|4320|    |-		//return false;
|    |4320|+		// return false;
|4321|4321| 
|4322|4322| 	// the parabole changes while walking, take something in the middle
|4323|4323| 	var guessedMaxRange = (range.max + parabolicMaxRange)/2;
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4382|4382| 	if (this.IsFormationMember())
|4383|4383| 	{
|4384|4384| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4385|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4386|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4385|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4386|+			cmpFormationUnitAI.order.data.target == target)
|4387|4387| 			return true;
|4388|4388| 	}
|4389|4389| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4550|4550| UnitAI.prototype.AttackEntityInZone = function(ents)
|4551|4551| {
|4552|4552| 	var target = ents.find(target =>
|4553|    |-		this.CanAttack(target)
|4554|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4553|+		this.CanAttack(target) &&
|    |4554|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4555|4555| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4556|4556| 	);
|4557|4557| 	if (!target)
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4551|4551| {
|4552|4552| 	var target = ents.find(target =>
|4553|4553| 		this.CanAttack(target)
|4554|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4555|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4554|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4555|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4556|4556| 	);
|4557|4557| 	if (!target)
|4558|4558| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4615|4615| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4616|4616| 	if (this.isGuardOf)
|4617|4617| 	{
|4618|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4618|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4619|4619| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4620|4620| 		if (cmpUnitAI && cmpAttack &&
|4621|4621| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4619|4619| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4620|4620| 		if (cmpUnitAI && cmpAttack &&
|4621|4621| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4622|    |-				return false;
|    |4622|+			return false;
|4623|4623| 	}
|4624|4624| 
|4625|4625| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4624|4624| 
|4625|4625| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4626|4626| 	if (this.GetStance().respondHoldGround)
|4627|    |-	{
|    |4627|+	
|4628|4628| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4629|4629| 			return true;
|4630|    |-	}
|    |4630|+	
|4631|4631| 
|4632|4632| 	// Stop if it's left our vision range, unless we're especially persistent
|4633|4633| 	if (!this.GetStance().respondChaseBeyondVision)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4631|4631| 
|4632|4632| 	// Stop if it's left our vision range, unless we're especially persistent
|4633|4633| 	if (!this.GetStance().respondChaseBeyondVision)
|4634|    |-	{
|    |4634|+	
|4635|4635| 		if (!this.CheckTargetIsInVisionRange(target))
|4636|4636| 			return true;
|4637|    |-	}
|    |4637|+	
|4638|4638| 
|4639|4639| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4640|4640| 	// and will continue moving to its last seen position and then stop)
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4657|4657| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4658|4658| 	if (this.isGuardOf)
|4659|4659| 	{
|4660|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4660|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4661|4661| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4662|4662| 		if (cmpUnitAI && cmpAttack &&
|4663|4663| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4670|4670| 	return false;
|4671|4671| };
|4672|4672| 
|4673|    |-//// External interface functions ////
|    |4673|+// // External interface functions ////
|4674|4674| 
|4675|4675| UnitAI.prototype.SetFormationController = function(ent)
|4676|4676| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4680|4680| 	// of our own formation (or ourself if not in formation)
|4681|4681| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4682|4682| 	if (cmpObstruction)
|4683|    |-	{
|    |4683|+	
|4684|4684| 		if (ent == INVALID_ENTITY)
|4685|4685| 			cmpObstruction.SetControlGroup(this.entity);
|4686|4686| 		else
|4687|4687| 			cmpObstruction.SetControlGroup(ent);
|4688|    |-	}
|    |4688|+	
|4689|4689| 
|4690|4690| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4691|4691| 	if (ent == INVALID_ENTITY)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4823|4823| 	// if we already had an old guard order, do nothing if the target is the same
|4824|4824| 	// and the order is running, otherwise remove the previous order
|4825|4825| 	if (this.isGuardOf)
|4826|    |-	{
|    |4826|+	
|4827|4827| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4828|4828| 			return;
|4829|4829| 		else
|4830|4830| 			this.RemoveGuard();
|4831|    |-	}
|    |4831|+	
|4832|4832| 
|4833|4833| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4834|4834| };
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4826|4826| 	{
|4827|4827| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4828|4828| 			return;
|4829|    |-		else
|4830|    |-			this.RemoveGuard();
|    |4829|+		this.RemoveGuard();
|4831|4830| 	}
|4832|4831| 
|4833|4832| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4997|4997| 			this.WalkToTarget(target, queued);
|4998|4998| 		return;
|4999|4999| 	}
|5000|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5000|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5001|5001| };
|5002|5002| 
|5003|5003| /**
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5146|5146| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5147|5147| 	{
|5148|5148| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5149|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5149|+		if (cmpTrader.HasBothMarkets() &&
|5150|5150| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5151|5151| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5152|5152| 		{
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5427|5427| 				{
|5428|5428| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5429|5429| 					var targetClasses = this.order.data.targetClasses;
|5430|    |-					if (targetClasses.attack && cmpIdentity
|5431|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5430|+					if (targetClasses.attack && cmpIdentity &&
|    |5431|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5432|5432| 						continue;
|5433|5433| 					if (targetClasses.avoid && cmpIdentity
|5434|5434| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5430|5430| 					if (targetClasses.attack && cmpIdentity
|5431|5431| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5432|5432| 						continue;
|5433|    |-					if (targetClasses.avoid && cmpIdentity
|5434|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5433|+					if (targetClasses.avoid && cmpIdentity &&
|    |5434|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5435|5435| 						continue;
|5436|5436| 					// Only used by the AIs to prevent some choices of targets
|5437|5437| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5453|5453| 		{
|5454|5454| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5455|5455| 			var targetClasses = this.order.data.targetClasses;
|5456|    |-			if (cmpIdentity && targetClasses.attack
|5457|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5456|+			if (cmpIdentity && targetClasses.attack &&
|    |5457|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5458|5458| 				continue;
|5459|5459| 			if (cmpIdentity && targetClasses.avoid
|5460|5460| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5456|5456| 			if (cmpIdentity && targetClasses.attack
|5457|5457| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5458|5458| 				continue;
|5459|    |-			if (cmpIdentity && targetClasses.avoid
|5460|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5459|+			if (cmpIdentity && targetClasses.avoid &&
|    |5460|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5461|5461| 				continue;
|5462|5462| 			// Only used by the AIs to prevent some choices of targets
|5463|5463| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5597|5597| 
|5598|5598| UnitAI.prototype.SetHeldPosition = function(x, z)
|5599|5599| {
|5600|    |-	this.heldPosition = {"x": x, "z": z};
|    |5600|+	this.heldPosition = { "x": x, "z": z};
|5601|5601| };
|5602|5602| 
|5603|5603| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5597|5597| 
|5598|5598| UnitAI.prototype.SetHeldPosition = function(x, z)
|5599|5599| {
|5600|    |-	this.heldPosition = {"x": x, "z": z};
|    |5600|+	this.heldPosition = {"x": x, "z": z };
|5601|5601| };
|5602|5602| 
|5603|5603| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5624|5624| 	return false;
|5625|5625| };
|5626|5626| 
|5627|    |-//// Helper functions ////
|    |5627|+// // Helper functions ////
|5628|5628| 
|5629|5629| UnitAI.prototype.CanAttack = function(target)
|5630|5630| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5828|5828| 	return cmpPack && cmpPack.IsPacking();
|5829|5829| };
|5830|5830| 
|5831|    |-//// Formation specific functions ////
|    |5831|+// // Formation specific functions ////
|5832|5832| 
|5833|5833| UnitAI.prototype.IsAttackingAsFormation = function()
|5834|5834| {
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5833|5833| UnitAI.prototype.IsAttackingAsFormation = function()
|5834|5834| {
|5835|5835| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5836|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5837|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5836|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5837|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5838|5838| };
|5839|5839| 
|5840|5840| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5837|5837| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5838|5838| };
|5839|5839| 
|5840|    |-//// Animal specific functions ////
|    |5840|+// // Animal specific functions ////
|5841|5841| 
|5842|5842| UnitAI.prototype.MoveRandomly = function(distance)
|5843|5843| {

binaries/data/mods/public/simulation/components/UnitAI.js
|2408| »   »   »   »   »   »   let·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'nearby' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|3773| »   var·isWorkType·=·type·=>·type·==·"Gather"·||·type·==·"Trade"·||·type·==·"Repair"·||·type·==·"ReturnResource";
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'type' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4537| »   var·target·=·ents.find(target·=>·this.CanAttack(target));
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'target' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4552| »   var·target·=·ents.find(target·=>
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'target' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4598| »   var·ent·=·ents.find(ent·=>·this.CanHeal(ent));
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4621| »   »   ····cmpAttack.GetAttackTypes().some(type·=>·cmpUnitAI.CheckTargetAttackRange(this.isGuardOf,·type)))
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'type' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|5077| »   var·lastPos·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'lastPos' to undefined.

binaries/data/mods/public/simulation/components/UnitAI.js
| 365| »   »   ····&&·(this.lastShorelinePosition.z·==·cmpPosition.GetPosition().z))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|1878| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2019| »   »   »   »   »   »   &&·this.order.data.target·!=·msg.data.attacker·&&·this.GetBestAttackAgainst(msg.data.attacker,·true)·!=·"Capture")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2101| »   »   »   »   »   »   »   »   ·&&·((type.generic·==·"treasure"·&&·oldType.generic·==·"treasure")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2102| »   »   »   »   »   »   »   »   ·||·(type.specific·==·oldType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2103| »   »   »   »   »   »   »   »   ·&&·(type.specific·!=·"meat"·||·oldTemplate·==·template)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2126| »   »   »   »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(oldType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2166| »   »   »   »   »   »   »   »   &&·((type.generic·==·"treasure"·&&·oldType.generic·==·"treasure")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2167| »   »   »   »   »   »   »   »   ||·(type.specific·==·oldType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2168| »   »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·oldTemplate·==·template)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2213| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2214| »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·resourceTemplate·==·template))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2230| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2403| »   »   »   »   »   var·cmpResourceGatherer·=·Engine.QueryInterface(this.entity,·IID_ResourceGatherer);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceGatherer' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2419| »   »   »   »   »   var·nearby·=·this.FindNearbyResource(function(ent,·type,·template)·{
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2422| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2423| »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·resourceTemplate·==·template))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2443| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2632| »   »   »   »   »   var·cmpResourceGatherer·=·Engine.QueryInterface(this.entity,·IID_ResourceGatherer);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceGatherer' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2827| »   »   »   »   »   var·cmpResourceDropsite·=·Engine.QueryInterface(msg.data.newentity,·IID_ResourceDropsite);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceDropsite' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2903| »   »   »   »   »   if·(this.CanGarrison(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2906| »   »   »   »   »   »   if·(this.CheckGarrisonRange(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2908| »   »   »   »   »   »   »   var·cmpGarrisonHolder·=·Engine.QueryInterface(target,·IID_GarrisonHolder);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2930| »   »   »   »   »   »   »   »   var·cmpResourceDropsite·=·Engine.QueryInterface(target,·IID_ResourceDropsite);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2931| »   »   »   »   »   »   »   »   if·(cmpResourceDropsite·&&·this.CanReturnResource(target,·true))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2946| »   »   »   »   »   »   »   »   »   var·cmpHolderPosition·=·Engine.QueryInterface(target,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2947| »   »   »   »   »   »   »   »   »   var·cmpHolderUnitAI·=·Engine.QueryInterface(target,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2974| »   »   »   »   »   »   »   if·(this.MoveToTarget(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|3735| »   »   var·order·=·{·"type":·type,·"data":·data·};
|    | [NORMAL] JSHintBear:
|    | 'order' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|3804| »   for·(var·i·=·0;·i·<·this.orderQueue.length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|4066| »   let·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/UnitAI.js
|4319| »   »   var·parabolicMaxRange·=·0;
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|4323| »   var·guessedMaxRange·=·(range.max·+·parabolicMaxRange)/2;
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4330| »   return·cmpUnitMotion.MoveToTargetRange(target,·range.min,·Math.min(range.max,·parabolicMaxRange));
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4386| »   »   »   &&·cmpFormationUnitAI.order.data.target·==·target)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|4554| »   »   &&·this.CheckTargetDistanceFromHeldPosition(target,·IID_Attack,·this.GetBestAttackAgainst(target,·true))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|4555| »   »   &&·(this.GetStance().respondChaseBeyondVision·||·this.CheckTargetIsInVisionRange(target))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5077| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

binaries/data/mods/public/simulation/components/UnitAI.js
|5431| »   »   »   »   »   »   &&·!MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.attack))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5434| »   »   »   »   »   »   &&·MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.avoid))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5447| »   var·targets·=·this.GetTargetsFromUnit();
|    | [NORMAL] JSHintBear:
|    | 'targets' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5448| »   for·(var·targ·of·targets)
|    | [NORMAL] JSHintBear:
|    | 'targ' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5454| »   »   »   var·cmpIdentity·=·Engine.QueryInterface(targ,·IID_Identity);
|    | [NORMAL] JSHintBear:
|    | 'cmpIdentity' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5455| »   »   »   var·targetClasses·=·this.order.data.targetClasses;
|    | [NORMAL] JSHintBear:
|    | 'targetClasses' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5457| »   »   »   »   &&·!MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.attack))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5460| »   »   »   »   &&·MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.avoid))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5535| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [NORMAL] JSHintBear:
|    | 'cmpVision' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5538| »   »   var·range·=·cmpVision.GetRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5543| »   »   var·cmpRanged·=·Engine.QueryInterface(this.entity,·iid);
|    | [NORMAL] JSHintBear:
|    | 'cmpRanged' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5546| »   »   var·range·=·iid·!==·IID_Attack·?·cmpRanged.GetRange()·:·cmpRanged.GetFullAttackRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5546| »   »   var·range·=·iid·!==·IID_Attack·?·cmpRanged.GetRange()·:·cmpRanged.GetFullAttackRange();
|    | [MAJOR] JSHintBear:
|    | Too many errors. (92% scanned).

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

bb requested changes to this revision.Jun 20 2018, 11:22 PM

For some reason (couldn't quickly find why) a formation moves extremely slow right after it is created, when reforming (as in setting another shape) the problem is solved.

Some rejoin tests didn't reveal an oos.

binaries/data/mods/public/simulation/components/Formation.js
861 ↗(On Diff #6508)

The fact that the template_formation walkspeed is 1 makes this works, however we shouldn't assume that.

binaries/data/mods/public/simulation/components/UnitAI.js
3979 ↗(On Diff #6508)

we still need that function...

5589 ↗(On Diff #6508)

check for it

5595 ↗(On Diff #6508)

same

binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
110 ↗(On Diff #6508)

good

binaries/data/mods/public/simulation/templates/template_unit_mechanical.xml
25 ↗(On Diff #6508)

indentation

source/simulation2/components/CCmpUnitMotion.cpp
424 ↗(On Diff #6508)

no need for the period

This revision now requires changes to proceed.Jun 20 2018, 11:22 PM
In D438#63576, @bb wrote:

For some reason (couldn't quickly find why) a formation moves extremely slow right after it is created, when reforming (as in setting another shape) the problem is solved.

Pretty sure I've fixed that bug upstream, but I'll need to check. Thanks for another review :)

wraitii updated this revision to Diff 7178.Jan 1 2019, 4:45 PM
wraitii retitled this revision from D13 prereq 1 : change Run Speed into a Run multiplier to Change Run Speed into a Run multiplier.
wraitii edited the summary of this revision. (Show Details)

Rebasing with intention to commit soon.

This fixes bb's remarks above, I've tested that this works even with formations.

Vulcan added a comment.Jan 1 2019, 4:49 PM

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

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

source/tools/atlas/GameInterface/ActorViewer.cpp
|  33| #include·"graphics/Terrain.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character ({) when these macros are defined: ''.

source/tools/atlas/GameInterface/ActorViewer.cpp
|  33| #include·"graphics/Terrain.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character ({) when these macros are defined: 'MESSAGES_SKIP_STRUCTS'.

source/tools/atlas/GameInterface/ActorViewer.cpp
|  33| #include·"graphics/Terrain.h"
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character ({) when these macros are defined: '_MSC_VER'.
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|  74|  74| 	var newangle = angle;
|  75|  75| 	var canTurn = true;
|  76|  76| 	if (this.landing)
|  77|    |-	{
|    |  77|+	
|  78|  78| 		if (this.speed > 0 && this.onGround)
|  79|  79| 		{
|  80|  80| 			if (pos.y <= cmpWaterManager.GetWaterLevel(pos.x, pos.z) && this.template.DiesInWater == "true")
| 153| 153| 					this.waterDeath = true;
| 154| 154| 			}
| 155| 155| 		}
| 156|    |-	}
|    | 156|+	
| 157| 157| 	else
| 158| 158| 	{
| 159| 159| 		// If we haven't reached max speed yet then we're still on the ground;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|  93|  93| 				pos.y = Math.max(ground, pos.y - turnLength * this.template.ClimbRate);
|  94|  94| 		}
|  95|  95| 		else if (this.speed == 0 && this.onGround)
|  96|    |-		{
|    |  96|+		
|  97|  97| 			if (this.waterDeath && cmpHealth)
|  98|  98| 				cmpHealth.Kill();
|  99|  99| 			else
| 128| 128| 					newangle += Math.PI;
| 129| 129| 				}
| 130| 130| 			}
| 131|    |-		}
|    | 131|+		
| 132| 132| 		else
| 133| 133| 		{
| 134| 134| 			// Final Approach
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 101| 101| 				this.pitch = 0;
| 102| 102| 				// We've stopped.
| 103| 103| 				if (cmpGarrisonHolder)
| 104|    |-					cmpGarrisonHolder.AllowGarrisoning(true,"UnitMotionFlying");
|    | 104|+					cmpGarrisonHolder.AllowGarrisoning(true, "UnitMotionFlying");
| 105| 105| 				canTurn = false;
| 106| 106| 				this.hasTarget = false;
| 107| 107| 				this.landing = false;
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unexpected space after unary operator '-'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 138| 138| 			var targetHeight = ground;
| 139| 139| 			// Steep, then gradual descent.
| 140| 140| 			if ((pos.y - targetHeight) / this.template.FlyingHeight > 1 / SHORT_FINAL)
| 141|    |-				this.pitch = - Math.PI / 18;
|    | 141|+				this.pitch = -Math.PI / 18;
| 142| 142| 			else
| 143| 143| 				this.pitch = Math.PI / 18;
| 144| 144| 			var descentRate = ((pos.y - targetHeight) / this.template.FlyingHeight * this.template.ClimbRate + SHORT_FINAL) * SHORT_FINAL;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 155| 155| 		}
| 156| 156| 	}
| 157| 157| 	else
| 158|    |-	{
|    | 158|+	
| 159| 159| 		// If we haven't reached max speed yet then we're still on the ground;
| 160| 160| 		// otherwise we're taking off or flying
| 161| 161| 		// this.onGround in case of a go-around after landing (but not fully stopped)
| 195| 195| 				this.pitch = -1 * this.pitch;
| 196| 196| 			}
| 197| 197| 		}
| 198|    |-	}
|    | 198|+	
| 199| 199| 
| 200| 200| 	// If we're in range of the target then tell people that we've reached it
| 201| 201| 	// (TODO: quantisation breaks this)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 163| 163| 		if (this.speed < this.template.TakeoffSpeed && this.onGround)
| 164| 164| 		{
| 165| 165| 			if (cmpGarrisonHolder)
| 166|    |-				cmpGarrisonHolder.AllowGarrisoning(false,"UnitMotionFlying");
|    | 166|+				cmpGarrisonHolder.AllowGarrisoning(false, "UnitMotionFlying");
| 167| 167| 			this.pitch = 0;
| 168| 168| 			// Accelerate forwards
| 169| 169| 			this.speed = Math.min(this.template.MaxSpeed, this.speed + turnLength * this.template.AccelRate);
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unexpected space after unary operator '-'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 230| 230| 		if (newangle - angle > Math.PI / 18)
| 231| 231| 			this.roll = Math.PI / 9;
| 232| 232| 		else if (newangle - angle < -Math.PI / 18)
| 233|    |-			this.roll = - Math.PI / 9;
|    | 233|+			this.roll = -Math.PI / 9;
| 234| 234| 		else
| 235| 235| 			this.roll = newangle - angle;
| 236| 236| 	}
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 322| 322| UnitMotionFlying.prototype.GetSpeedRatio = function()
| 323| 323| {
| 324| 324| 	return this.GetCurrentSpeed() / this.GetWalkSpeed();
| 325|    |-}
|    | 325|+};
| 326| 326| 
| 327| 327| UnitMotionFlying.prototype.GetPassabilityClassName = function()
| 328| 328| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 346| 346| 
| 347| 347| UnitMotionFlying.prototype.StopMoving = function()
| 348| 348| {
| 349|    |-	//Invert
|    | 349|+	// Invert
| 350| 350| 	if (!this.waterDeath)
| 351| 351| 		this.landing = !this.landing;
| 352| 352| 

binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 182| »   »   »   var·targetHeight·=·ground·+·(+this.template.FlyingHeight);
|    | [NORMAL] JSHintBear:
|    | 'targetHeight' is already defined.

binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 325| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  34|  34| 
|  35|  35| 
|  36|  36| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  37|    |-		SetInterval: function() { },
|    |  37|+		"SetInterval": function() { },
|  38|  38| 		SetTimeout: function() { },
|  39|  39| 	});
|  40|  40| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  35|  35| 
|  36|  36| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  37|  37| 		SetInterval: function() { },
|  38|    |-		SetTimeout: function() { },
|    |  38|+		"SetTimeout": function() { },
|  39|  39| 	});
|  40|  40| 
|  41|  41| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  39|  39| 	});
|  40|  40| 
|  41|  41| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|  42|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    |  42|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  42|  42| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|    |-		EnableActiveQuery: function(id) { },
|    |  45|+		"EnableActiveQuery": function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  46|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  46|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|    |-		DisableActiveQuery: function(id) { },
|    |  47|+		"DisableActiveQuery": function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|  50|  50| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|    |-		GetEntityFlagMask: function(identifier) { },
|    |  48|+		"GetEntityFlagMask": function(identifier) { },
|  49|  49| 	});
|  50|  50| 
|  51|  51| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  49|  49| 	});
|  50|  50| 
|  51|  51| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  52|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    |  52|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
|  53|  53| 	});
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  53|  53| 	});
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  56|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    |  56|+		"GetPlayerByID": function(id) { return playerEntity; },
|  57|  57| 		GetNumPlayers: function() { return 2; },
|  58|  58| 	});
|  59|  59| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  56|  56| 		GetPlayerByID: function(id) { return playerEntity; },
|  57|    |-		GetNumPlayers: function() { return 2; },
|    |  57|+		"GetNumPlayers": function() { return 2; },
|  58|  58| 	});
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  58|  58| 	});
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|    |-		IsAlly: function() { return false; },
|    |  61|+		"IsAlly": function() { return false; },
|  62|  62| 		IsEnemy: function() { return true; },
|  63|  63| 		GetEnemies: function() { return []; },
|  64|  64| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|  61| 		IsAlly: function() { return false; },
|  62|    |-		IsEnemy: function() { return true; },
|    |  62|+		"IsEnemy": function() { return true; },
|  63|  63| 		GetEnemies: function() { return []; },
|  64|  64| 	});
|  65|  65| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|  61| 		IsAlly: function() { return false; },
|  62|  62| 		IsEnemy: function() { return true; },
|  63|    |-		GetEnemies: function() { return []; },
|    |  63|+		"GetEnemies": function() { return []; },
|  64|  64| 	});
|  65|  65| 
|  66|  66| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  67|  67| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
|  68|  68| 
|  69|  69| 	AddMock(unit, IID_Identity, {
|  70|    |-		GetClassesList: function() { return []; },
|    |  70|+		"GetClassesList": function() { return []; },
|  71|  71| 	});
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  71|  71| 	});
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Ownership, {
|  74|    |-		GetOwner: function() { return 1; },
|    |  74|+		"GetOwner": function() { return 1; },
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    |  78|+		"GetTurretParent": function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|    |-		GetPosition: function() { return new Vector3D(); },
|    |  79|+		"GetPosition": function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|    |-		GetPosition2D: function() { return new Vector2D(); },
|    |  80|+		"GetPosition2D": function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|  83|  83| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|    |-		GetRotation: function() { return { "y": 0 }; },
|    |  81|+		"GetRotation": function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|  83|  83| 	});
|  84|  84| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|    |-		IsInWorld: function() { return true; },
|    |  82|+		"IsInWorld": function() { return true; },
|  83|  83| 	});
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  83|  83| 	});
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|    |-		GetWalkSpeed: function() { return 1; },
|    |  86|+		"GetWalkSpeed": function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToFormationOffset' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|    |-		MoveToFormationOffset: function(target, x, z) { },
|    |  87|+		"MoveToFormationOffset": function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|    |-		IsInTargetRange: function(target, min, max) { return true; },
|    |  88|+		"IsInTargetRange": function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|    |-		MoveToTargetRange: function(target, min, max) { },
|    |  89|+		"MoveToTargetRange": function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|  92|  92| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|    |-		StopMoving: function() { },
|    |  90|+		"StopMoving": function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|  92|  92| 	});
|  93|  93| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|    |-		GetPassabilityClassName: function() { return "default"; },
|    |  91|+		"GetPassabilityClassName": function() { return "default"; },
|  92|  92| 	});
|  93|  93| 
|  94|  94| 	AddMock(unit, IID_Vision, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  92|  92| 	});
|  93|  93| 
|  94|  94| 	AddMock(unit, IID_Vision, {
|  95|    |-		GetRange: function() { return 10; },
|    |  95|+		"GetRange": function() { return 10; },
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    |  99|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    |  99|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 100|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 100|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 101|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102|    |-		GetPreference: function(t) { return 0; },
|    | 102|+		"GetPreference": function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 103|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 106| 106| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104|    |-		CanAttack: function(v) { return true; },
|    | 104|+		"CanAttack": function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 106| 106| 	});
| 107| 107| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 105|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 106| 106| 	});
| 107| 107| 
| 108| 108| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 113| 113| 	if (mode == 1)
| 114| 114| 	{
| 115| 115| 		AddMock(enemy, IID_Health, {
| 116|    |-			GetHitpoints: function() { return 10; },
|    | 116|+			"GetHitpoints": function() { return 10; },
| 117| 117| 		});
| 118| 118| 		AddMock(enemy, IID_UnitAI, {
| 119| 119| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 116| 116| 			GetHitpoints: function() { return 10; },
| 117| 117| 		});
| 118| 118| 		AddMock(enemy, IID_UnitAI, {
| 119|    |-			IsAnimal: function() { return false; }
|    | 119|+			"IsAnimal": function() { return false; }
| 120| 120| 		});
| 121| 121| 	}
| 122| 122| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 121| 121| 	}
| 122| 122| 	else if (mode == 2)
| 123| 123| 		AddMock(enemy, IID_Health, {
| 124|    |-			GetHitpoints: function() { return 0; },
|    | 124|+			"GetHitpoints": function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127| 127| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 124| 124| 			GetHitpoints: function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 127|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 124| 124| 			GetHitpoints: function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 127|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
| 131|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 131|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 132|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 130| 130| 	AddMock(controller, IID_Position, {
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 133|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 134|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
| 137| 137| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 135|+		"GetRotation": function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
| 137| 137| 	});
| 138| 138| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136|    |-		IsInWorld: function() { return true; },
|    | 136|+		"IsInWorld": function() { return true; },
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140|    |-		GetWalkSpeed: function() { return 1; },
|    | 140|+		"GetWalkSpeed": function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetSpeedRatio' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141|    |-		SetSpeedRatio: function(speed) { },
|    | 141|+		"SetSpeedRatio": function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
| 144| 144| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToPointRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142|    |-		MoveToPointRange: function(x, z, minRange, maxRange) { },
|    | 142|+		"MoveToPointRange": function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
| 144| 144| 	});
| 145| 145| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143|    |-		GetPassabilityClassName: function() { return "default"; },
|    | 143|+		"GetPassabilityClassName": function() { return "default"; },
| 144| 144| 	});
| 145| 145| 
| 146| 146| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 181| 181| 	var unitAIs = [];
| 182| 182| 
| 183| 183| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 184|    |-		SetInterval: function() { },
|    | 184|+		"SetInterval": function() { },
| 185| 185| 		SetTimeout: function() { },
| 186| 186| 	});
| 187| 187| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 182| 182| 
| 183| 183| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 184| 184| 		SetInterval: function() { },
| 185|    |-		SetTimeout: function() { },
|    | 185|+		"SetTimeout": function() { },
| 186| 186| 	});
| 187| 187| 
| 188| 188| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 187| 187| 
| 188| 188| 
| 189| 189| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 190|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 190|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 191| 191| 			return 1;
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 190| 190| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 191| 191| 			return 1;
| 192| 192| 		},
| 193|    |-		EnableActiveQuery: function(id) { },
|    | 193|+		"EnableActiveQuery": function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 191| 191| 			return 1;
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 194|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
| 197| 197| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195|    |-		DisableActiveQuery: function(id) { },
|    | 195|+		"DisableActiveQuery": function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
| 197| 197| 	});
| 198| 198| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196|    |-		GetEntityFlagMask: function(identifier) { },
|    | 196|+		"GetEntityFlagMask": function(identifier) { },
| 197| 197| 	});
| 198| 198| 
| 199| 199| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 197| 197| 	});
| 198| 198| 
| 199| 199| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 200|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 200|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 204|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 204|+		"GetPlayerByID": function(id) { return playerEntity; },
| 205| 205| 		GetNumPlayers: function() { return 2; },
| 206| 206| 	});
| 207| 207| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 204| 204| 		GetPlayerByID: function(id) { return playerEntity; },
| 205|    |-		GetNumPlayers: function() { return 2; },
|    | 205|+		"GetNumPlayers": function() { return 2; },
| 206| 206| 	});
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 206| 206| 	});
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209|    |-		IsAlly: function() { return false; },
|    | 209|+		"IsAlly": function() { return false; },
| 210| 210| 		IsEnemy: function() { return true; },
| 211| 211| 		GetEnemies: function() { return []; },
| 212| 212| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209| 209| 		IsAlly: function() { return false; },
| 210|    |-		IsEnemy: function() { return true; },
|    | 210|+		"IsEnemy": function() { return true; },
| 211| 211| 		GetEnemies: function() { return []; },
| 212| 212| 	});
| 213| 213| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209| 209| 		IsAlly: function() { return false; },
| 210| 210| 		IsEnemy: function() { return true; },
| 211|    |-		GetEnemies: function() { return []; },
|    | 211|+		"GetEnemies": function() { return []; },
| 212| 212| 	});
| 213| 213| 
| 214| 214| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 219| 219| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 220| 220| 
| 221| 221| 		AddMock(unit + i, IID_Identity, {
| 222|    |-			GetClassesList: function() { return []; },
|    | 222|+			"GetClassesList": function() { return []; },
| 223| 223| 		});
| 224| 224| 
| 225| 225| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 223| 223| 		});
| 224| 224| 
| 225| 225| 		AddMock(unit + i, IID_Ownership, {
| 226|    |-			GetOwner: function() { return 1; },
|    | 226|+			"GetOwner": function() { return 1; },
| 227| 227| 		});
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 227| 227| 		});
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 230|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231|    |-			GetPosition: function() { return new Vector3D(); },
|    | 231|+			"GetPosition": function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 232|+			"GetPosition2D": function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
| 235| 235| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 233|+			"GetRotation": function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
| 235| 235| 		});
| 236| 236| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234|    |-			IsInWorld: function() { return true; },
|    | 234|+			"IsInWorld": function() { return true; },
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238|    |-			GetWalkSpeed: function() { return 1; },
|    | 238|+			"GetWalkSpeed": function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToFormationOffset' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239|    |-			MoveToFormationOffset: function(target, x, z) { },
|    | 239|+			"MoveToFormationOffset": function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240|    |-			IsInTargetRange: function(target, min, max) { return true; },
|    | 240|+			"IsInTargetRange": function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241|    |-			MoveToTargetRange: function(target, min, max) { },
|    | 241|+			"MoveToTargetRange": function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
| 244| 244| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242|    |-			StopMoving: function() { },
|    | 242|+			"StopMoving": function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
| 244| 244| 		});
| 245| 245| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243|    |-			GetPassabilityClassName: function() { return "default"; },
|    | 243|+			"GetPassabilityClassName": function() { return "default"; },
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_Vision, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_Vision, {
| 247|    |-			GetRange: function() { return 10; },
|    | 247|+			"GetRange": function() { return 10; },
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return { "max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 252|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 252|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 253|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 254|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 257| 257| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255|    |-			CanAttack: function(v) { return true; },
|    | 255|+			"CanAttack": function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 257| 257| 		});
| 258| 258| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 256|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 257| 257| 		});
| 258| 258| 
| 259| 259| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 265| 265| 
| 266| 266| 	// create enemy
| 267| 267| 	AddMock(enemy, IID_Health, {
| 268|    |-		GetHitpoints: function() { return 40; },
|    | 268|+		"GetHitpoints": function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271| 271| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 268| 268| 		GetHitpoints: function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 271|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 268| 268| 		GetHitpoints: function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 271|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
| 275|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 275|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 276|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 274| 274| 	AddMock(controller, IID_Position, {
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 277|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 278|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
| 281| 281| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 279|+		"GetRotation": function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
| 281| 281| 	});
| 282| 282| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280|    |-		IsInWorld: function() { return true; },
|    | 280|+		"IsInWorld": function() { return true; },
| 281| 281| 	});
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 281| 281| 	});
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284|    |-		GetWalkSpeed: function() { return 1; },
|    | 284|+		"GetWalkSpeed": function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetSpeedRatio' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285|    |-		SetSpeedRatio: function(speed) { },
|    | 285|+		"SetSpeedRatio": function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToPointRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286|    |-		MoveToPointRange: function(x, z, minRange, maxRange) { },
|    | 286|+		"MoveToPointRange": function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287|    |-		IsInTargetRange: function(target, min, max) { return true; },
|    | 287|+		"IsInTargetRange": function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
| 290| 290| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288|    |-		StopMoving: function() { },
|    | 288|+		"StopMoving": function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
| 290| 290| 	});
| 291| 291| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289|    |-		GetPassabilityClassName: function() { return "default"; },
|    | 289|+		"GetPassabilityClassName": function() { return "default"; },
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return { "max":10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293| 293| 		GetRange: function() { return {"max":10, "min": 0}; },
| 294|    |-		CanAttackAsFormation: function() { return false; },
|    | 294|+		"CanAttackAsFormation": function() { return false; },
| 295| 295| 	});
| 296| 296| 
| 297| 297| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 	for (var ent of unitAIs)
| 304| 304| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 305| 305| 
| 306|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 306|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 307| 307| 
| 308| 308| 	// let all units be in position
| 309| 309| 	for (var ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 	for (var ent of unitAIs)
| 304| 304| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 305| 305| 
| 306|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 306|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 307| 307| 
| 308| 308| 	// let all units be in position
| 309| 309| 	for (var ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  46| »   »   ResetActiveQuery:·function(id)·{·if·(mode·==·0)·return·[];·else·return·[enemy];·},
|    | [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/tests/test_UnitAI.js
| 215| »   for·(var·i·=·0;·i·<·unitCount;·i++)·{
|    | [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/tests/test_UnitAI.js
| 309| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 312| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 304| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 313| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 226| 226| 		{
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229|    |-					"name": aura.auraName,
|    | 229|+				"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230|    |-					"description": aura.auraDescription || null,
|    | 230|+				"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231|    |-					"radius": aura.radius || null
|    | 231|+				"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
| 234| 234| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232|    |-				};
|    | 232|+			};
| 233| 233| 		}
| 234| 234| 	}
| 235| 235| 

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 (quote-props):
|    | Unquoted property 'GetPassabilityClass' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|   8|   8| let height = 5;
|   9|   9| 
|  10|  10| AddMock(SYSTEM_ENTITY, IID_Pathfinder, {
|  11|    |-	GetPassabilityClass: (name) => 1 << 8
|    |  11|+	"GetPassabilityClass": (name) => 1 << 8
|  12|  12| });
|  13|  13| 
|  14|  14| let cmpUnitMotionFlying = ConstructComponent(entity, "UnitMotionFlying", {

binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|  45| »   "SetHeightFixed":·(y)·=>·height·=·y,
|    | [NORMAL] ESLintBear (no-return-assign):
|    | Arrow function should not return assignment.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 126| 126| 	this.formationMembersWithAura = []; // Members with a formation aura
| 127| 127| 	this.width = 0;
| 128| 128| 	this.depth = 0;
| 129|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 129|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 130| 130| 	this.twinFormations = [];
| 131| 131| 	// distance from which two twin formations will merge into one.
| 132| 132| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 126| 126| 	this.formationMembersWithAura = []; // Members with a formation aura
| 127| 127| 	this.width = 0;
| 128| 128| 	this.depth = 0;
| 129|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 129|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 130| 130| 	this.twinFormations = [];
| 131| 131| 	// distance from which two twin formations will merge into one.
| 132| 132| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 144| 144| 
| 145| 145| Formation.prototype.GetSize = function()
| 146| 146| {
| 147|    |-	return {"width": this.width, "depth": this.depth};
|    | 147|+	return { "width": this.width, "depth": this.depth};
| 148| 148| };
| 149| 149| 
| 150| 150| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 144| 144| 
| 145| 145| Formation.prototype.GetSize = function()
| 146| 146| {
| 147|    |-	return {"width": this.width, "depth": this.depth};
|    | 147|+	return {"width": this.width, "depth": this.depth };
| 148| 148| };
| 149| 149| 
| 150| 150| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return { "width":1, "depth": 1};
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return {"width": 1, "depth": 1};
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return {"width":1, "depth": 1 };
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 565| 565| 	if (!footprints.length)
| 566| 566| 		return {"width":1, "depth": 1};
| 567| 567| 
| 568|    |-	var r = {"width": 0, "depth": 0};
|    | 568|+	var r = { "width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
| 570| 570| 	{
| 571| 571| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 565| 565| 	if (!footprints.length)
| 566| 566| 		return {"width":1, "depth": 1};
| 567| 567| 
| 568|    |-	var r = {"width": 0, "depth": 0};
|    | 568|+	var r = {"width": 0, "depth": 0 };
| 569| 569| 	for (var shape of footprints)
| 570| 570| 	{
| 571| 571| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
| 570|    |-	{
|    | 570|+	
| 571| 571| 		if (shape.type == "circle")
| 572| 572| 		{
| 573| 573| 			r.width += shape.radius * 2;
| 578| 578| 			r.width += shape.width;
| 579| 579| 			r.depth += shape.depth;
| 580| 580| 		}
| 581|    |-	}
|    | 581|+	
| 582| 582| 	r.width /= footprints.length;
| 583| 583| 	r.depth /= footprints.length;
| 584| 584| 	return r;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 591| 591| 	separation.depth *= this.separationMultiplier.depth;
| 592| 592| 
| 593| 593| 	if (this.columnar)
| 594|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 594|+		var sortingClasses = ["Cavalry", "Infantry"];
| 595| 595| 	else
| 596| 596| 		var sortingClasses = this.sortingClasses.slice();
| 597| 597| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 		var classes = cmpIdentity.GetClassesList();
| 609| 609| 		var done = false;
| 610| 610| 		for (var c = 0; c < sortingClasses.length; ++c)
| 611|    |-		{
|    | 611|+		
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614| 614| 				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
| 618|    |-		}
|    | 618|+		
| 619| 619| 		if (!done)
| 620| 620| 			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
| 621| 621| 	}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 		{
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 614|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 		{
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 614|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 635| 635| 	if (this.columnar)
| 636| 636| 	{
| 637| 637| 		shape = "square";
| 638|    |-		cols = Math.min(count,3);
|    | 638|+		cols = Math.min(count, 3);
| 639| 639| 		shiftRows = false;
| 640| 640| 		centerGap = 0;
| 641| 641| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 689| 689| 					n -= r%2;
| 690| 690| 			}
| 691| 691| 			else if (shape == "triangle")
| 692|    |-			{
|    | 692|+			
| 693| 693| 				if (shiftRows)
| 694| 694| 					var n = r + 1;
| 695| 695| 				else
| 696| 696| 					var n = r * 2 + 1;
| 697|    |-			}
|    | 697|+			
| 698| 698| 			if (!shiftRows && n > left)
| 699| 699| 				n = left;
| 700| 700| 			for (var c = 0; c < n && left > 0; ++c)
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 730| 730| 	// calculating offset distances without a zero average makes no sense, as the formation
| 731| 731| 	// will jump to a different position any time
| 732| 732| 	var avgoffset = Vector2D.average(offsets);
| 733|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 733|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 734| 734| 
| 735| 735| 	// sort the available places in certain ways
| 736| 736| 	// 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 '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 799| 799| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 800| 800| {
| 801| 801| 	var offsetPositions = [];
| 802|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 802|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 803| 803| 	// calculate the world positions
| 804| 804| 	for (var o of offsets)
| 805| 805| 		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 '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 799| 799| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 800| 800| {
| 801| 801| 	var offsetPositions = [];
| 802|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 802|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 803| 803| 	// calculate the world positions
| 804| 804| 	for (var o of offsets)
| 805| 805| 		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 '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 816| 816| Formation.prototype.GetEstimatedOrientation = function(pos)
| 817| 817| {
| 818| 818| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 819|    |-	var r = {"sin": 0, "cos": 1};
|    | 819|+	var r = { "sin": 0, "cos": 1};
| 820| 820| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 821| 821| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 822| 822| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 816| 816| Formation.prototype.GetEstimatedOrientation = function(pos)
| 817| 817| {
| 818| 818| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 819|    |-	var r = {"sin": 0, "cos": 1};
|    | 819|+	var r = {"sin": 0, "cos": 1 };
| 820| 820| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 821| 821| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 822| 822| 	{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 898| 898| 		cmpOtherFormation.RemoveMembers(otherMembers);
| 899| 899| 		this.AddMembers(otherMembers);
| 900| 900| 		Engine.DestroyEntity(this.twinFormations[i]);
| 901|    |-		this.twinFormations.splice(i,1);
|    | 901|+		this.twinFormations.splice(i, 1);
| 902| 902| 	}
| 903| 903| 	// Switch between column and box if necessary
| 904| 904| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 620| »   »   »   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
| 660| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 710| »   »   »   »   »   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
| 712| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 714| »   »   »   »   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
| 724| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 614| »   »   »   »   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
| 753| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

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

binaries/data/mods/public/simulation/components/Formation.js
| 860| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 410| 410| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 411| 411| 
| 412| 412| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 413|    |-			{
|    | 413|+			
| 414| 414| 				// For units, take the range in front of it, no spread. So angle = 0
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416|    |-			}
|    | 416|+			
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418| 418| 			{
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416| 416| 			}
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else
| 423| 423| 			{
| 424| 424| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421| 421| 			}
| 422| 422| 			else
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// not in world, set a default?
| 425| 425| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 426|    |-			}
|    | 426|+			
| 427| 427| 		}
| 428| 428| 	}
| 429| 429| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 791| 791| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 792| 792| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 793| 793| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 794|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 794|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 795| 795| 	}
| 796| 796| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 797| 797| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1310|1310| 		}
|1311|1311| 	}
|1312|1312| 	else
|1313|    |-	{
|    |1313|+	
|1314|1314| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1315|1315| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1316|1316| 		// wall piece.
|1331|1331| 			"pos": start.pos,
|1332|1332| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1333|1333| 		});
|1334|    |-	}
|    |1334|+	
|1335|1335| 
|1336|1336| 	if (end.pos)
|1337|1337| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1334|1334| 	}
|1335|1335| 
|1336|1336| 	if (end.pos)
|1337|    |-	{
|    |1337|+	
|1338|1338| 		// Analogous to the starting side case above
|1339|1339| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1340|1340| 		{
|1372|1372| 				"pos": end.pos,
|1373|1373| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1374|1374| 			});
|1375|    |-	}
|    |1375|+	
|1376|1376| 
|1377|1377| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1378|1378| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1550|1550| 
|1551|1551| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1552|1552| 		if (cmpVisual)
|1553|    |-		{
|    |1553|+		
|1554|1554| 			if (!allPiecesValid || !canAfford)
|1555|1555| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1556|1556| 			else
|1557|1557| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1558|    |-		}
|    |1558|+		
|1559|1559| 
|1560|1560| 		++entPool.numUsed;
|1561|1561| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1624|1624| 			{
|1625|1625| 				minDist2 = dist2;
|1626|1626| 				minDistEntitySnapData = {
|1627|    |-						"x": pos.x,
|    |1627|+					"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1625|1625| 				minDist2 = dist2;
|1626|1626| 				minDistEntitySnapData = {
|1627|1627| 						"x": pos.x,
|1628|    |-						"z": pos.z,
|    |1628|+					"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|1631|1631| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1626|1626| 				minDistEntitySnapData = {
|1627|1627| 						"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|    |-						"angle": cmpPosition.GetRotation().y,
|    |1629|+					"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|1631|1631| 				};
|1632|1632| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1627|1627| 						"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|    |-						"ent": ent
|    |1630|+					"ent": ent
|1631|1631| 				};
|1632|1632| 			}
|1633|1633| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1772|1772| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1773|1773| 	}
|1774|1774| 	else if (data.target === secondMarket)
|1775|    |-	{
|    |1775|+	
|1776|1776| 		result = {
|1777|1777| 			"type": "is second",
|1778|1778| 			"gain": cmpEntityTrader.GetGoods().amount,
|1779|1779| 		};
|1780|    |-	}
|    |1780|+	
|1781|1781| 	else if (!firstMarket)
|1782|1782| 	{
|1783|1783| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 		};
|1780|1780| 	}
|1781|1781| 	else if (!firstMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = { "type": "set first" };
|1784|    |-	}
|    |1784|+	
|1785|1785| 	else if (!secondMarket)
|1786|1786| 	{
|1787|1787| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1783|1783| 		result = { "type": "set first" };
|1784|1784| 	}
|1785|1785| 	else if (!secondMarket)
|1786|    |-	{
|    |1786|+	
|1787|1787| 		result = {
|1788|1788| 			"type": "set second",
|1789|1789| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1790|1790| 		};
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else
|1793|1793| 	{
|1794|1794| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		};
|1791|1791| 	}
|1792|1792| 	else
|1793|    |-	{
|    |1793|+	
|1794|1794| 		// Else both markets are not null and target is different from them
|1795|1795| 		result = { "type": "set first" };
|1796|    |-	}
|    |1796|+	
|1797|1797| 	return result;
|1798|1798| };
|1799|1799| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 228| 228| 		// Move a tile outside the building
| 229| 229| 		let range = 4;
| 230| 230| 		if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
| 231|    |-		{
|    | 231|+		
| 232| 232| 			// We've started walking to the given point
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234|    |-		}
|    | 234|+		
| 235| 235| 		else
| 236| 236| 		{
| 237| 237| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234| 234| 		}
| 235| 235| 		else
| 236|    |-		{
|    | 236|+		
| 237| 237| 			// We are already at the target, or can't move at all
| 238| 238| 			this.FinishOrder();
| 239|    |-		}
|    | 239|+		
| 240| 240| 	},
| 241| 241| 
| 242| 242| 	// Individual orders:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 335| 335| 
| 336| 336| 		var ok = this.MoveToTarget(this.order.data.target);
| 337| 337| 		if (ok)
| 338|    |-		{
|    | 338|+		
| 339| 339| 			// We've started walking to the given point
| 340| 340| 			if (this.IsAnimal())
| 341| 341| 				this.SetNextState("ANIMAL.WALKING");
| 342| 342| 			else
| 343| 343| 				this.SetNextState("INDIVIDUAL.WALKING");
| 344|    |-		}
|    | 344|+		
| 345| 345| 		else
| 346| 346| 		{
| 347| 347| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364| 364| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365| 365| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366|    |-		{
|    | 366|+		
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 369| 369| 				needToMove = false;
| 370|    |-		}
|    | 370|+		
| 371| 371| 
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 361| 361| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 362| 362| 		var needToMove = true;
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 364|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 365|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366| 366| 		{
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
| 374| 374| 		if (needToMove && this.MoveToTarget(this.order.data.target))
| 375|    |-		{
|    | 375|+		
| 376| 376| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
| 377|    |-		}
|    | 377|+		
| 378| 378| 		else
| 379| 379| 		{
| 380| 380| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 401| 401| 		var distance = DistanceBetweenEntities(this.entity, this.order.data.target) + (+this.template.FleeDistance);
| 402| 402| 		var cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
| 403| 403| 		if (cmpUnitMotion.MoveToTargetRange(this.order.data.target, distance, -1))
| 404|    |-		{
|    | 404|+		
| 405| 405| 			// We've started fleeing from the given target
| 406| 406| 			if (this.IsAnimal())
| 407| 407| 				this.SetNextState("ANIMAL.FLEEING");
| 408| 408| 			else
| 409| 409| 				this.SetNextState("INDIVIDUAL.FLEEING");
| 410|    |-		}
|    | 410|+		
| 411| 411| 		else
| 412| 412| 		{
| 413| 413| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 448| 448| 			}
| 449| 449| 
| 450| 450| 			if (this.order.data.attackType == this.oldAttackType)
| 451|    |-			{
|    | 451|+			
| 452| 452| 				if (this.IsAnimal())
| 453| 453| 					this.SetNextState("ANIMAL.COMBAT.ATTACKING");
| 454| 454| 				else
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456|    |-			}
|    | 456|+			
| 457| 457| 			else
| 458| 458| 			{
| 459| 459| 				if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456| 456| 			}
| 457| 457| 			else
| 458|    |-			{
|    | 458|+			
| 459| 459| 				if (this.IsAnimal())
| 460| 460| 					this.SetNextStateAlwaysEntering("ANIMAL.COMBAT.ATTACKING");
| 461| 461| 				else
| 462| 462| 					this.SetNextStateAlwaysEntering("INDIVIDUAL.COMBAT.ATTACKING");
| 463|    |-			}
|    | 463|+			
| 464| 464| 			return;
| 465| 465| 		}
| 466| 466| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 580| 580| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 581| 581| 				}
| 582| 582| 				else
| 583|    |-				{
|    | 583|+				
| 584| 584| 					// We couldn't move there, or the target moved away
| 585| 585| 					this.FinishOrder();
| 586|    |-				}
|    | 586|+				
| 587| 587| 				return;
| 588| 588| 			}
| 589| 589| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 593| 593| 
| 594| 594| 		// Try to move within range
| 595| 595| 		if (this.MoveToTargetRange(this.order.data.target, IID_ResourceGatherer))
| 596|    |-		{
|    | 596|+		
| 597| 597| 			// We've started walking to the given point
| 598| 598| 			this.SetNextState("INDIVIDUAL.GATHER.APPROACHING");
| 599|    |-		}
|    | 599|+		
| 600| 600| 		else
| 601| 601| 		{
| 602| 602| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 670| 670| 	"Order.Repair": function(msg) {
| 671| 671| 		// Try to move within range
| 672| 672| 		if (this.MoveToTargetRange(this.order.data.target, IID_Builder))
| 673|    |-		{
|    | 673|+		
| 674| 674| 			// We've started walking to the given point
| 675| 675| 			this.SetNextState("INDIVIDUAL.REPAIR.APPROACHING");
| 676|    |-		}
|    | 676|+		
| 677| 677| 		else
| 678| 678| 		{
| 679| 679| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 706| 706| 		}
| 707| 707| 
| 708| 708| 		if (this.MoveToGarrisonRange(this.order.data.target))
| 709|    |-		{
|    | 709|+		
| 710| 710| 			this.SetNextState("INDIVIDUAL.GARRISON.APPROACHING");
| 711|    |-		}
|    | 711|+		
| 712| 712| 		else
| 713| 713| 		{
| 714| 714| 			// We do a range check before actually garrisoning
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 834| 834| 			if (!this.CheckTargetAttackRange(target, target))
| 835| 835| 			{
| 836| 836| 				if (this.TargetIsAlive(target) && this.CheckTargetVisible(target))
| 837|    |-				{
|    | 837|+				
| 838| 838| 					if (this.MoveToTargetAttackRange(target, target))
| 839| 839| 					{
| 840| 840| 						this.SetNextState("COMBAT.APPROACHING");
| 841| 841| 						return;
| 842| 842| 					}
| 843|    |-				}
|    | 843|+				
| 844| 844| 				this.FinishOrder();
| 845| 845| 				return;
| 846| 846| 			}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 859| 859| 			}
| 860| 860| 			// Check if we are already in range, otherwise walk there
| 861| 861| 			if (!this.CheckGarrisonRange(msg.data.target))
| 862|    |-			{
|    | 862|+			
| 863| 863| 				if (!this.CheckTargetVisible(msg.data.target))
| 864| 864| 				{
| 865| 865| 					this.FinishOrder();
| 874| 874| 						return;
| 875| 875| 					}
| 876| 876| 				}
| 877|    |-			}
|    | 877|+			
| 878| 878| 
| 879| 879| 			this.SetNextState("GARRISON.GARRISONING");
| 880| 880| 		},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 866| 866| 					return;
| 867| 867| 				}
| 868| 868| 				else
| 869|    |-				{
|    | 869|+				
| 870| 870| 					// Out of range; move there in formation
| 871| 871| 					if (this.MoveToGarrisonRange(msg.data.target))
| 872| 872| 					{
| 873| 873| 						this.SetNextState("GARRISON.APPROACHING");
| 874| 874| 						return;
| 875| 875| 					}
| 876|    |-				}
|    | 876|+				
| 877| 877| 			}
| 878| 878| 
| 879| 879| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 865| 865| 					this.FinishOrder();
| 866| 866| 					return;
| 867| 867| 				}
| 868|    |-				else
| 869|    |-				{
|    | 868|+				
| 870| 869| 					// Out of range; move there in formation
| 871| 870| 					if (this.MoveToGarrisonRange(msg.data.target))
| 872| 871| 					{
| 873| 872| 						this.SetNextState("GARRISON.APPROACHING");
| 874| 873| 						return;
| 875| 874| 					}
| 876|    |-				}
|    | 875|+				
| 877| 876| 			}
| 878| 877| 
| 879| 878| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 892| 892| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 893| 893| 					}
| 894| 894| 					else
| 895|    |-					{
|    | 895|+					
| 896| 896| 						// We couldn't move there, or the target moved away
| 897| 897| 						this.FinishOrder();
| 898|    |-					}
|    | 898|+					
| 899| 899| 					return;
| 900| 900| 				}
| 901| 901| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1113|1113| 			},
|1114|1114| 		},
|1115|1115| 
|1116|    |-		"GARRISON":{
|    |1116|+		"GARRISON": {
|1117|1117| 			"enter": function() {
|1118|1118| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1119|1119| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1297|1297| 			// If the controller handled an order but some members rejected it,
|1298|1298| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1299|1299| 			if (this.orderQueue.length)
|1300|    |-			{
|    |1300|+			
|1301|1301| 				// We're leaving the formation, so stop our FormationWalk order
|1302|1302| 				if (this.FinishOrder())
|1303|1303| 					return;
|1304|    |-			}
|    |1304|+			
|1305|1305| 
|1306|1306| 			// No orders left, we're an individual now
|1307|1307| 			if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1325|1325| 			// Move a tile outside the building
|1326|1326| 			let range = 4;
|1327|1327| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|1328|    |-			{
|    |1328|+			
|1329|1329| 				// We've started walking to the given point
|1330|1330| 				this.SetNextState("WALKINGTOPOINT");
|1331|    |-			}
|    |1331|+			
|1332|1332| 			else
|1333|1333| 			{
|1334|1334| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1330|1330| 				this.SetNextState("WALKINGTOPOINT");
|1331|1331| 			}
|1332|1332| 			else
|1333|    |-			{
|    |1333|+			
|1334|1334| 				// We are already at the target, or can't move at all
|1335|1335| 				this.FinishOrder();
|1336|    |-			}
|    |1336|+			
|1337|1337| 		},
|1338|1338| 
|1339|1339| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1531|1531| 
|1532|1532| 			"LosRangeUpdate": function(msg) {
|1533|1533| 				if (this.GetStance().targetVisibleEnemies)
|1534|    |-				{
|    |1534|+				
|1535|1535| 					// Start attacking one of the newly-seen enemy (if any)
|1536|1536| 					this.AttackEntitiesByPreference(msg.data.added);
|1537|    |-				}
|    |1537|+				
|1538|1538| 			},
|1539|1539| 
|1540|1540| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1717|1717| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1718|1718| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1719|1719| 						if (cmpHealth && (cmpHealth.GetHitpoints() < cmpHealth.GetMaxHitpoints()))
|1720|    |-						{
|    |1720|+						
|1721|1721| 							if (this.CanHeal(this.isGuardOf))
|1722|1722| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1723|1723| 							else if (this.CanRepair(this.isGuardOf))
|1724|1724| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1725|    |-						}
|    |1725|+						
|1726|1726| 					}
|1727|1727| 				},
|1728|1728| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1802|1802| 				"MoveCompleted": function() {
|1803|1803| 
|1804|1804| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1805|    |-					{
|    |1805|+					
|1806|1806| 						// If the unit needs to unpack, do so
|1807|1807| 						if (this.CanUnpack())
|1808|1808| 						{
|1811|1811| 						}
|1812|1812| 						else
|1813|1813| 							this.SetNextState("ATTACKING");
|1814|    |-					}
|    |1814|+					
|1815|1815| 					else
|1816|1816| 					{
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1809|1809| 							this.PushOrderFront("Unpack", { "force": true });
|1810|1810| 							return;
|1811|1811| 						}
|1812|    |-						else
|1813|    |-							this.SetNextState("ATTACKING");
|    |1812|+						this.SetNextState("ATTACKING");
|1814|1813| 					}
|1815|1814| 					else
|1816|1815| 					{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1813|1813| 							this.SetNextState("ATTACKING");
|1814|1814| 					}
|1815|1815| 					else
|1816|    |-					{
|    |1816|+					
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1818|1818| 						{
|1819|1819| 							this.SetNextState("APPROACHING");
|1823|1823| 							// Give up
|1824|1824| 							this.FinishOrder();
|1825|1825| 						}
|1826|    |-					}
|    |1826|+					
|1827|1827| 				},
|1828|1828| 			},
|1829|1829| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1815|1815| 					else
|1816|1816| 					{
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1818|    |-						{
|    |1818|+						
|1819|1819| 							this.SetNextState("APPROACHING");
|1820|    |-						}
|    |1820|+						
|1821|1821| 						else
|1822|1822| 						{
|1823|1823| 							// Give up
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1819|1819| 							this.SetNextState("APPROACHING");
|1820|1820| 						}
|1821|1821| 						else
|1822|    |-						{
|    |1822|+						
|1823|1823| 							// Give up
|1824|1824| 							this.FinishOrder();
|1825|    |-						}
|    |1825|+						
|1826|1826| 					}
|1827|1827| 				},
|1828|1828| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1840|1840| 					}
|1841|1841| 					// Check the target is still alive and attackable
|1842|1842| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1843|    |-					{
|    |1843|+					
|1844|1844| 						// Can't reach it - try to chase after it
|1845|1845| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1846|1846| 						{
|1855|1855| 								return;
|1856|1856| 							}
|1857|1857| 						}
|1858|    |-					}
|    |1858|+					
|1859|1859| 
|1860|1860| 					var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|1861|1861| 					this.attackTimers = cmpAttack.GetTimers(this.order.data.attackType);
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1886|1886| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1887|1887| 
|1888|1888| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1889|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1889|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1890|1890| 
|1891|1891| 					this.FaceTowardsTarget(this.order.data.target);
|1892|1892| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2015|2015| 
|2016|2016| 				"Attacked": function(msg) {
|2017|2017| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2018|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2019|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2018|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2019|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2020|2020| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2021|2021| 				},
|2022|2022| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2029|2029| 					this.SelectAnimation("move");
|2030|2030| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2031|2031| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2032|    |-					{
|    |2032|+					
|2033|2033| 						// Run after a fleeing target
|2034|2034| 						this.SetMoveSpeedRatio(this.GetRunMultiplier());
|2035|    |-					}
|    |2035|+					
|2036|2036| 					this.StartTimer(1000, 1000);
|2037|2037| 				},
|2038|2038| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2097|2097| 						// Also don't switch to a different type of huntable animal
|2098|2098| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2099|2099| 							return (
|2100|    |-								ent != oldTarget
|2101|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2100|+								ent != oldTarget &&
|    |2101|+								 ((type.generic == "treasure" && oldType.generic == "treasure")
|2102|2102| 								 || (type.specific == oldType.specific
|2103|2103| 								 && (type.specific != "meat" || oldTemplate == template)))
|2104|2104| 							);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2098|2098| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2099|2099| 							return (
|2100|2100| 								ent != oldTarget
|2101|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2102|    |-								 || (type.specific == oldType.specific
|    |2101|+								 && ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2102|+								 (type.specific == oldType.specific
|2103|2103| 								 && (type.specific != "meat" || oldTemplate == template)))
|2104|2104| 							);
|2105|2105| 						}, oldTarget);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2099|2099| 							return (
|2100|2100| 								ent != oldTarget
|2101|2101| 								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2102|    |-								 || (type.specific == oldType.specific
|2103|    |-								 && (type.specific != "meat" || oldTemplate == template)))
|    |2102|+								 || (type.specific == oldType.specific &&
|    |2103|+								 (type.specific != "meat" || oldTemplate == template)))
|2104|2104| 							);
|2105|2105| 						}, oldTarget);
|2106|2106| 						if (nearby)
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2108|2108| 							this.PerformGather(nearby, false, false);
|2109|2109| 							return true;
|2110|2110| 						}
|2111|    |-						else
|2112|    |-						{
|    |2111|+						
|2113|2112| 							// It's probably better in this case, to avoid units getting stuck around a dropsite
|2114|2113| 							// in a "Target is far away, full, nearby are no good resources, return to dropsite" loop
|2115|2114| 							// to order it to GatherNear the resource position.
|2130|2129| 									return true;
|2131|2130| 								}
|2132|2131| 							}
|2133|    |-						}
|    |2132|+						
|2134|2133| 						return true;
|2135|2134| 					}
|2136|2135| 					return false;
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2120|2120| 								this.GatherNearPosition(pos.x, pos.z, oldType, oldTemplate);
|2121|2121| 								return true;
|2122|2122| 							}
|2123|    |-							else
|2124|    |-							{
|    |2123|+							
|2125|2124| 								// we're kind of stuck here. Return resource.
|2126|2125| 								var nearby = this.FindNearestDropsite(oldType.generic);
|2127|2126| 								if (nearby)
|2129|2128| 									this.PushOrderFront("ReturnResource", { "target": nearby, "force": false });
|2130|2129| 									return true;
|2131|2130| 								}
|2132|    |-							}
|    |2131|+							
|2133|2132| 						}
|2134|2133| 						return true;
|2135|2134| 					}
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2162|2162| 						// Also don't switch to a different type of huntable animal
|2163|2163| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2164|2164| 							return (
|2165|    |-								ent != oldTarget
|2166|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2165|+								ent != oldTarget &&
|    |2166|+								((type.generic == "treasure" && oldType.generic == "treasure")
|2167|2167| 								|| (type.specific == oldType.specific
|2168|2168| 								&& (type.specific != "meat" || oldTemplate == template)))
|2169|2169| 							);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2163|2163| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2164|2164| 							return (
|2165|2165| 								ent != oldTarget
|2166|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2167|    |-								|| (type.specific == oldType.specific
|    |2166|+								&& ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2167|+								(type.specific == oldType.specific
|2168|2168| 								&& (type.specific != "meat" || oldTemplate == template)))
|2169|2169| 							);
|2170|2170| 						});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2164|2164| 							return (
|2165|2165| 								ent != oldTarget
|2166|2166| 								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2167|    |-								|| (type.specific == oldType.specific
|2168|    |-								&& (type.specific != "meat" || oldTemplate == template)))
|    |2167|+								|| (type.specific == oldType.specific &&
|    |2168|+								(type.specific != "meat" || oldTemplate == template)))
|2169|2169| 							);
|2170|2170| 						});
|2171|2171| 						if (nearby)
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2209|2209| 					// Also don't switch to a different type of huntable animal
|2210|2210| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2211|2211| 						return (
|2212|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2213|    |-							|| (type.specific == resourceType.specific
|    |2212|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2213|+							(type.specific == resourceType.specific
|2214|2214| 							&& (type.specific != "meat" || resourceTemplate == template))
|2215|2215| 						);
|2216|2216| 					});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2210|2210| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2211|2211| 						return (
|2212|2212| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2213|    |-							|| (type.specific == resourceType.specific
|2214|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2213|+							|| (type.specific == resourceType.specific &&
|    |2214|+							(type.specific != "meat" || resourceTemplate == template))
|2215|2215| 						);
|2216|2216| 					});
|2217|2217| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2326|2326| 
|2327|2327| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2328|2328| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2329|    |-					{
|    |2329|+					
|2330|2330| 						// Check we can still reach and gather from the target
|2331|2331| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2332|2332| 						{
|2392|2392| 								return;
|2393|2393| 							}
|2394|2394| 						}
|2395|    |-					}
|    |2395|+					
|2396|2396| 
|2397|2397| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2398|2398| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2418|2418| 					// Also don't switch to a different type of huntable animal
|2419|2419| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2420|2420| 						return (
|2421|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2422|    |-							|| (type.specific == resourceType.specific
|    |2421|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2422|+							(type.specific == resourceType.specific
|2423|2423| 							&& (type.specific != "meat" || resourceTemplate == template))
|2424|2424| 						);
|2425|2425| 					});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2419|2419| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2420|2420| 						return (
|2421|2421| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2422|    |-							|| (type.specific == resourceType.specific
|2423|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2422|+							|| (type.specific == resourceType.specific &&
|    |2423|+							(type.specific != "meat" || resourceTemplate == template))
|2424|2424| 						);
|2425|2425| 					});
|2426|2426| 					if (nearby)
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2506|2506| 					this.StartTimer(prepare, this.healTimers.repeat);
|2507|2507| 
|2508|2508| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2509|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2509|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2510|2510| 
|2511|2511| 					this.FaceTowardsTarget(this.order.data.target);
|2512|2512| 				},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2721|2721| 					{
|2722|2722| 						// The building was already finished/fully repaired before we arrived;
|2723|2723| 						// let the ConstructionFinished handler handle this.
|2724|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2724|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2725|2725| 						return true;
|2726|2726| 					}
|2727|2727| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2721|2721| 					{
|2722|2722| 						// The building was already finished/fully repaired before we arrived;
|2723|2723| 						// let the ConstructionFinished handler handle this.
|2724|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2724|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2725|2725| 						return true;
|2726|2726| 					}
|2727|2727| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2761|2761| 					if (this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2762|2762| 						this.SetNextState("APPROACHING");
|2763|2763| 					else if (!this.CheckTargetRange(this.repairTarget, IID_Builder))
|2764|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2764|+						this.FinishOrder(); // can't approach and isn't in reach
|2765|2765| 				},
|2766|2766| 			},
|2767|2767| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2848|2848| 
|2849|2849| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2850|2850| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2851|    |-				{
|    |2851|+				
|2852|2852| 					// We're already walking to the given point, so add this as a order.
|2853|2853| 					this.WalkToTarget(msg.data.newentity, true);
|2854|    |-				}
|    |2854|+				
|2855|2855| 			},
|2856|2856| 		},
|2857|2857| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2901|2901| 
|2902|2902| 					// Check that we can garrison here
|2903|2903| 					if (this.CanGarrison(target))
|2904|    |-					{
|    |2904|+					
|2905|2905| 						// Check that we're in range of the garrison target
|2906|2906| 						if (this.CheckGarrisonRange(target))
|2907|2907| 						{
|2977|2977| 								return false;
|2978|2978| 							}
|2979|2979| 						}
|2980|    |-					}
|    |2980|+					
|2981|2981| 					// Garrisoning failed for some reason, so finish the order
|2982|2982| 					this.FinishOrder();
|2983|2983| 					return true;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3084|3084| 		"Attacked": function(msg) {
|3085|3085| 			if (this.template.NaturalBehaviour == "skittish" ||
|3086|3086| 			    this.template.NaturalBehaviour == "passive")
|3087|    |-			{
|    |3087|+			
|3088|3088| 				this.Flee(msg.data.attacker, false);
|3089|    |-			}
|    |3089|+			
|3090|3090| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3091|3091| 			{
|3092|3092| 				if (this.CanAttack(msg.data.attacker))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3093|3093| 					this.Attack(msg.data.attacker, false);
|3094|3094| 			}
|3095|3095| 			else if (this.template.NaturalBehaviour == "domestic")
|3096|    |-			{
|    |3096|+			
|3097|3097| 				// Never flee, stop what we were doing
|3098|3098| 				this.SetNextState("IDLE");
|3099|    |-			}
|    |3099|+			
|3100|3100| 		},
|3101|3101| 
|3102|3102| 		"Order.LeaveFoundation": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3103|3103| 			// Move a tile outside the building
|3104|3104| 			var range = 4;
|3105|3105| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|3106|    |-			{
|    |3106|+			
|3107|3107| 				// We've started walking to the given point
|3108|3108| 				this.SetNextState("WALKING");
|3109|    |-			}
|    |3109|+			
|3110|3110| 			else
|3111|3111| 			{
|3112|3112| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3108|3108| 				this.SetNextState("WALKING");
|3109|3109| 			}
|3110|3110| 			else
|3111|    |-			{
|    |3111|+			
|3112|3112| 				// We are already at the target, or can't move at all
|3113|3113| 				this.FinishOrder();
|3114|    |-			}
|    |3114|+			
|3115|3115| 		},
|3116|3116| 
|3117|3117| 		"IDLE": {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3150|3150| 				}
|3151|3151| 				// Start attacking one of the newly-seen enemy (if any)
|3152|3152| 				else if (this.IsDangerousAnimal())
|3153|    |-				{
|    |3153|+				
|3154|3154| 					this.AttackVisibleEntity(msg.data.added);
|3155|    |-				}
|    |3155|+				
|3156|3156| 
|3157|3157| 				// TODO: if two units enter our range together, we'll attack the
|3158|3158| 				// first and then the second won't trigger another LosRangeUpdate
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3193|3193| 				}
|3194|3194| 				// Start attacking one of the newly-seen enemy (if any)
|3195|3195| 				else if (this.template.NaturalBehaviour == "violent")
|3196|    |-				{
|    |3196|+				
|3197|3197| 					this.AttackVisibleEntity(msg.data.added);
|3198|    |-				}
|    |3198|+				
|3199|3199| 			},
|3200|3200| 
|3201|3201| 			"MoveCompleted": function() { },
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3210|3210| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3211|3211| 
|3212|3212| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3213|    |-							// only used for domestic animals
|    |3213|+		// only used for domestic animals
|3214|3214| 	},
|3215|3215| };
|3216|3216| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3267|3267| 
|3268|3268| UnitAI.prototype.IsAnimal = function()
|3269|3269| {
|3270|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3270|+	return (!!this.template.NaturalBehaviour);
|3271|3271| };
|3272|3272| 
|3273|3273| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3305|3305| UnitAI.prototype.GetGarrisonHolder = function()
|3306|3306| {
|3307|3307| 	if (this.IsGarrisoned())
|3308|    |-	{
|    |3308|+	
|3309|3309| 		for (let order of this.orderQueue)
|3310|3310| 			if (order.type == "Garrison")
|3311|3311| 				return order.data.target;
|3312|    |-	}
|    |3312|+	
|3313|3313| 	return INVALID_ENTITY;
|3314|3314| };
|3315|3315| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3383|3383| 		{
|3384|3384| 			let index = this.GetCurrentState().indexOf(".");
|3385|3385| 			if (index != -1)
|3386|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3386|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3387|3387| 			this.Stop(false);
|3388|3388| 		}
|3389|3389| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3439|3439| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3440|3440| 			continue;
|3441|3441| 		if (i == 0)
|3442|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3442|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3443|3443| 		else
|3444|3444| 			this.orderQueue.splice(i, 1);
|3445|3445| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3439|3439| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3440|3440| 			continue;
|3441|3441| 		if (i == 0)
|3442|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3442|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3443|3443| 		else
|3444|3444| 			this.orderQueue.splice(i, 1);
|3445|3445| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3523|3523| };
|3524|3524| 
|3525|3525| 
|3526|    |-//// FSM linkage functions ////
|    |3526|+// // FSM linkage functions ////
|3527|3527| 
|3528|3528| UnitAI.prototype.SetNextState = function(state)
|3529|3529| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3697|3697| 				continue;
|3698|3698| 			if (this.orderQueue[i].type == type)
|3699|3699| 				continue;
|3700|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3700|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3701|3701| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3702|3702| 			return;
|3703|3703| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3697|3697| 				continue;
|3698|3698| 			if (this.orderQueue[i].type == type)
|3699|3699| 				continue;
|3700|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3700|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3701|3701| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3702|3702| 			return;
|3703|3703| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3711|3711| {
|3712|3712| 	// Remember the previous work orders to be able to go back to them later if required
|3713|3713| 	if (data && data.force)
|3714|    |-	{
|    |3714|+	
|3715|3715| 		if (this.IsFormationController())
|3716|3716| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3717|3717| 		else
|3718|3718| 			this.UpdateWorkOrders(type);
|3719|    |-	}
|    |3719|+	
|3720|3720| 
|3721|3721| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3722|3722| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3788|3788| 	{
|3789|3789| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3790|3790| 		if (cmpUnitAI)
|3791|    |-		{
|    |3791|+		
|3792|3792| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3793|3793| 			{
|3794|3794| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3797|3797| 					return;
|3798|3798| 				}
|3799|3799| 			}
|3800|    |-		}
|    |3800|+		
|3801|3801| 	}
|3802|3802| 
|3803|3803| 	// If nothing found, take the unit orders
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3790|3790| 		if (cmpUnitAI)
|3791|3791| 		{
|3792|3792| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3793|    |-			{
|    |3793|+			
|3794|3794| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3795|3795| 				{
|3796|3796| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3797|3797| 					return;
|3798|3798| 				}
|3799|    |-			}
|    |3799|+			
|3800|3800| 		}
|3801|3801| 	}
|3802|3802| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3802|3802| 
|3803|3803| 	// If nothing found, take the unit orders
|3804|3804| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3805|    |-	{
|    |3805|+	
|3806|3806| 		if (isWorkType(this.orderQueue[i].type))
|3807|3807| 		{
|3808|3808| 			this.workOrders = this.orderQueue.slice(i);
|3809|3809| 			return;
|3810|3810| 		}
|3811|    |-	}
|    |3811|+	
|3812|3812| };
|3813|3813| 
|3814|3814| UnitAI.prototype.BackToWork = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3868|3868| 	if (data.timerRepeat === undefined)
|3869|3869| 		this.timer = undefined;
|3870|3870| 
|3871|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3871|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3872|3872| };
|3873|3873| 
|3874|3874| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3868|3868| 	if (data.timerRepeat === undefined)
|3869|3869| 		this.timer = undefined;
|3870|3870| 
|3871|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3871|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3872|3872| };
|3873|3873| 
|3874|3874| /**
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3903|3903| 	this.timer = undefined;
|3904|3904| };
|3905|3905| 
|3906|    |-//// Message handlers /////
|    |3906|+// // Message handlers /////
|3907|3907| 
|3908|3908| UnitAI.prototype.OnMotionChanged = function(msg)
|3909|3909| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3908|3908| UnitAI.prototype.OnMotionChanged = function(msg)
|3909|3909| {
|3910|3910| 	if (msg.starting && !msg.error)
|3911|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3911|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveStarted", "data": msg});
|3912|3912| 	else if (!msg.starting || msg.error)
|3913|3913| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3914|3914| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3908|3908| UnitAI.prototype.OnMotionChanged = function(msg)
|3909|3909| {
|3910|3910| 	if (msg.starting && !msg.error)
|3911|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3911|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg });
|3912|3912| 	else if (!msg.starting || msg.error)
|3913|3913| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3914|3914| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3910|3910| 	if (msg.starting && !msg.error)
|3911|3911| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3912|3912| 	else if (!msg.starting || msg.error)
|3913|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3913|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveCompleted", "data": msg});
|3914|3914| };
|3915|3915| 
|3916|3916| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3910|3910| 	if (msg.starting && !msg.error)
|3911|3911| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3912|3912| 	else if (!msg.starting || msg.error)
|3913|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3913|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg });
|3914|3914| };
|3915|3915| 
|3916|3916| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3918|3918| 	// TODO: This is a bit inefficient since every unit listens to every
|3919|3919| 	// construction message - ideally we could scope it to only the one we're building
|3920|3920| 
|3921|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3921|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3922|3922| };
|3923|3923| 
|3924|3924| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3918|3918| 	// TODO: This is a bit inefficient since every unit listens to every
|3919|3919| 	// construction message - ideally we could scope it to only the one we're building
|3920|3920| 
|3921|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3921|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3922|3922| };
|3923|3923| 
|3924|3924| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3943|3943| 
|3944|3944| UnitAI.prototype.OnAttacked = function(msg)
|3945|3945| {
|3946|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3946|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3947|3947| };
|3948|3948| 
|3949|3949| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3943|3943| 
|3944|3944| UnitAI.prototype.OnAttacked = function(msg)
|3945|3945| {
|3946|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3946|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3947|3947| };
|3948|3948| 
|3949|3949| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3948|3948| 
|3949|3949| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3950|3950| {
|3951|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3951|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3952|3952| };
|3953|3953| 
|3954|3954| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3948|3948| 
|3949|3949| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3950|3950| {
|3951|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3951|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3952|3952| };
|3953|3953| 
|3954|3954| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3953|3953| 
|3954|3954| UnitAI.prototype.OnHealthChanged = function(msg)
|3955|3955| {
|3956|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3956|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3957|3957| };
|3958|3958| 
|3959|3959| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3953|3953| 
|3954|3954| UnitAI.prototype.OnHealthChanged = function(msg)
|3955|3955| {
|3956|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3956|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3957|3957| };
|3958|3958| 
|3959|3959| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3959|3959| UnitAI.prototype.OnRangeUpdate = function(msg)
|3960|3960| {
|3961|3961| 	if (msg.tag == this.losRangeQuery)
|3962|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3962|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3963|3963| 	else if (msg.tag == this.losHealRangeQuery)
|3964|3964| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3965|3965| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3959|3959| UnitAI.prototype.OnRangeUpdate = function(msg)
|3960|3960| {
|3961|3961| 	if (msg.tag == this.losRangeQuery)
|3962|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3962|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3963|3963| 	else if (msg.tag == this.losHealRangeQuery)
|3964|3964| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3965|3965| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3961|3961| 	if (msg.tag == this.losRangeQuery)
|3962|3962| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3963|3963| 	else if (msg.tag == this.losHealRangeQuery)
|3964|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3964|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3965|3965| };
|3966|3966| 
|3967|3967| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3961|3961| 	if (msg.tag == this.losRangeQuery)
|3962|3962| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3963|3963| 	else if (msg.tag == this.losHealRangeQuery)
|3964|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3964|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3965|3965| };
|3966|3966| 
|3967|3967| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3966|3966| 
|3967|3967| UnitAI.prototype.OnPackFinished = function(msg)
|3968|3968| {
|3969|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3969|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3970|3970| };
|3971|3971| 
|3972|3972| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3966|3966| 
|3967|3967| UnitAI.prototype.OnPackFinished = function(msg)
|3968|3968| {
|3969|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3969|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3970|3970| };
|3971|3971| 
|3972|3972| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3969|3969| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3970|3970| };
|3971|3971| 
|3972|    |-//// Helper functions to be called by the FSM ////
|    |3972|+// // Helper functions to be called by the FSM ////
|3973|3973| 
|3974|3974| UnitAI.prototype.GetWalkSpeed = function()
|3975|3975| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4071|4071| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4072|4072| 		return undefined;
|4073|4073| 
|4074|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4074|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4075|4075| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4076|4076| 		return undefined;
|4077|4077| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4156|4156| 			PlaySound(name, member);
|4157|4157| 	}
|4158|4158| 	else
|4159|    |-	{
|    |4159|+	
|4160|4160| 		// Otherwise use our own sounds
|4161|4161| 		PlaySound(name, this.entity);
|4162|    |-	}
|    |4162|+	
|4163|4163| };
|4164|4164| 
|4165|4165| /*
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4325|4325| 	else
|4326|4326| 		// return false? Or hope you come close enough?
|4327|4327| 		var parabolicMaxRange = 0;
|4328|    |-		//return false;
|    |4328|+		// return false;
|4329|4329| 
|4330|4330| 	// the parabole changes while walking, take something in the middle
|4331|4331| 	var guessedMaxRange = (range.max + parabolicMaxRange)/2;
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4390|4390| 	if (this.IsFormationMember())
|4391|4391| 	{
|4392|4392| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4393|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4394|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4393|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4394|+			cmpFormationUnitAI.order.data.target == target)
|4395|4395| 			return true;
|4396|4396| 	}
|4397|4397| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4558|4558| UnitAI.prototype.AttackEntityInZone = function(ents)
|4559|4559| {
|4560|4560| 	var target = ents.find(target =>
|4561|    |-		this.CanAttack(target)
|4562|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4561|+		this.CanAttack(target) &&
|    |4562|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4563|4563| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4564|4564| 	);
|4565|4565| 	if (!target)
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4559|4559| {
|4560|4560| 	var target = ents.find(target =>
|4561|4561| 		this.CanAttack(target)
|4562|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4563|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4562|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4563|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4564|4564| 	);
|4565|4565| 	if (!target)
|4566|4566| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4623|4623| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4624|4624| 	if (this.isGuardOf)
|4625|4625| 	{
|4626|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4626|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4627|4627| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4628|4628| 		if (cmpUnitAI && cmpAttack &&
|4629|4629| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4627|4627| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4628|4628| 		if (cmpUnitAI && cmpAttack &&
|4629|4629| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4630|    |-				return false;
|    |4630|+			return false;
|4631|4631| 	}
|4632|4632| 
|4633|4633| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4632|4632| 
|4633|4633| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4634|4634| 	if (this.GetStance().respondHoldGround)
|4635|    |-	{
|    |4635|+	
|4636|4636| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4637|4637| 			return true;
|4638|    |-	}
|    |4638|+	
|4639|4639| 
|4640|4640| 	// Stop if it's left our vision range, unless we're especially persistent
|4641|4641| 	if (!this.GetStance().respondChaseBeyondVision)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4639|4639| 
|4640|4640| 	// Stop if it's left our vision range, unless we're especially persistent
|4641|4641| 	if (!this.GetStance().respondChaseBeyondVision)
|4642|    |-	{
|    |4642|+	
|4643|4643| 		if (!this.CheckTargetIsInVisionRange(target))
|4644|4644| 			return true;
|4645|    |-	}
|    |4645|+	
|4646|4646| 
|4647|4647| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4648|4648| 	// and will continue moving to its last seen position and then stop)
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4665|4665| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4666|4666| 	if (this.isGuardOf)
|4667|4667| 	{
|4668|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4668|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4669|4669| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4670|4670| 		if (cmpUnitAI && cmpAttack &&
|4671|4671| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4678|4678| 	return false;
|4679|4679| };
|4680|4680| 
|4681|    |-//// External interface functions ////
|    |4681|+// // External interface functions ////
|4682|4682| 
|4683|4683| UnitAI.prototype.SetFormationController = function(ent)
|4684|4684| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4688|4688| 	// of our own formation (or ourself if not in formation)
|4689|4689| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4690|4690| 	if (cmpObstruction)
|4691|    |-	{
|    |4691|+	
|4692|4692| 		if (ent == INVALID_ENTITY)
|4693|4693| 			cmpObstruction.SetControlGroup(this.entity);
|4694|4694| 		else
|4695|4695| 			cmpObstruction.SetControlGroup(ent);
|4696|    |-	}
|    |4696|+	
|4697|4697| 
|4698|4698| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4699|4699| 	if (ent == INVALID_ENTITY)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4831|4831| 	// if we already had an old guard order, do nothing if the target is the same
|4832|4832| 	// and the order is running, otherwise remove the previous order
|4833|4833| 	if (this.isGuardOf)
|4834|    |-	{
|    |4834|+	
|4835|4835| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4836|4836| 			return;
|4837|4837| 		else
|4838|4838| 			this.RemoveGuard();
|4839|    |-	}
|    |4839|+	
|4840|4840| 
|4841|4841| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4842|4842| };
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4834|4834| 	{
|4835|4835| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4836|4836| 			return;
|4837|    |-		else
|4838|    |-			this.RemoveGuard();
|    |4837|+		this.RemoveGuard();
|4839|4838| 	}
|4840|4839| 
|4841|4840| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5005|5005| 			this.WalkToTarget(target, queued);
|5006|5006| 		return;
|5007|5007| 	}
|5008|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5008|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5009|5009| };
|5010|5010| 
|5011|5011| /**
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5154|5154| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5155|5155| 	{
|5156|5156| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5157|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5157|+		if (cmpTrader.HasBothMarkets() &&
|5158|5158| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5159|5159| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5160|5160| 		{
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5435|5435| 				{
|5436|5436| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5437|5437| 					var targetClasses = this.order.data.targetClasses;
|5438|    |-					if (targetClasses.attack && cmpIdentity
|5439|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5438|+					if (targetClasses.attack && cmpIdentity &&
|    |5439|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5440|5440| 						continue;
|5441|5441| 					if (targetClasses.avoid && cmpIdentity
|5442|5442| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5438|5438| 					if (targetClasses.attack && cmpIdentity
|5439|5439| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5440|5440| 						continue;
|5441|    |-					if (targetClasses.avoid && cmpIdentity
|5442|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5441|+					if (targetClasses.avoid && cmpIdentity &&
|    |5442|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5443|5443| 						continue;
|5444|5444| 					// Only used by the AIs to prevent some choices of targets
|5445|5445| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5461|5461| 		{
|5462|5462| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5463|5463| 			var targetClasses = this.order.data.targetClasses;
|5464|    |-			if (cmpIdentity && targetClasses.attack
|5465|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5464|+			if (cmpIdentity && targetClasses.attack &&
|    |5465|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5466|5466| 				continue;
|5467|5467| 			if (cmpIdentity && targetClasses.avoid
|5468|5468| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5464|5464| 			if (cmpIdentity && targetClasses.attack
|5465|5465| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5466|5466| 				continue;
|5467|    |-			if (cmpIdentity && targetClasses.avoid
|5468|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5467|+			if (cmpIdentity && targetClasses.avoid &&
|    |5468|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5469|5469| 				continue;
|5470|5470| 			// Only used by the AIs to prevent some choices of targets
|5471|5471| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5605|5605| 
|5606|5606| UnitAI.prototype.SetHeldPosition = function(x, z)
|5607|5607| {
|5608|    |-	this.heldPosition = {"x": x, "z": z};
|    |5608|+	this.heldPosition = { "x": x, "z": z};
|5609|5609| };
|5610|5610| 
|5611|5611| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5605|5605| 
|5606|5606| UnitAI.prototype.SetHeldPosition = function(x, z)
|5607|5607| {
|5608|    |-	this.heldPosition = {"x": x, "z": z};
|    |5608|+	this.heldPosition = {"x": x, "z": z };
|5609|5609| };
|5610|5610| 
|5611|5611| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5632|5632| 	return false;
|5633|5633| };
|5634|5634| 
|5635|    |-//// Helper functions ////
|    |5635|+// // Helper functions ////
|5636|5636| 
|5637|5637| UnitAI.prototype.CanAttack = function(target)
|5638|5638| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5836|5836| 	return cmpPack && cmpPack.IsPacking();
|5837|5837| };
|5838|5838| 
|5839|    |-//// Formation specific functions ////
|    |5839|+// // Formation specific functions ////
|5840|5840| 
|5841|5841| UnitAI.prototype.IsAttackingAsFormation = function()
|5842|5842| {
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5841|5841| UnitAI.prototype.IsAttackingAsFormation = function()
|5842|5842| {
|5843|5843| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5844|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5845|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5844|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5845|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5846|5846| };
|5847|5847| 
|5848|5848| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5845|5845| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5846|5846| };
|5847|5847| 
|5848|    |-//// Animal specific functions ////
|    |5848|+// // Animal specific functions ////
|5849|5849| 
|5850|5850| UnitAI.prototype.MoveRandomly = function(distance)
|5851|5851| {

binaries/data/mods/public/simulation/components/UnitAI.js
|2408| »   »   »   »   »   »   let·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'nearby' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|3773| »   var·isWorkType·=·type·=>·type·==·"Gather"·||·type·==·"Trade"·||·type·==·"Repair"·||·type·==·"ReturnResource";
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'type' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4545| »   var·target·=·ents.find(target·=>·this.CanAttack(target));
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'target' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4560| »   var·target·=·ents.find(target·=>
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'target' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4606| »   var·ent·=·ents.find(ent·=>·this.CanHeal(ent));
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4629| »   »   ····cmpAttack.GetAttackTypes().some(type·=>·cmpUnitAI.CheckTargetAttackRange(this.isGuardOf,·type)))
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'type' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|5085| »   var·lastPos·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'lastPos' to undefined.

binaries/data/mods/public/simulation/components/UnitAI.js
| 365| »   »   ····&&·(this.lastShorelinePosition.z·==·cmpPosition.GetPosition().z))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|1878| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2019| »   »   »   »   »   »   &&·this.order.data.target·!=·msg.data.attacker·&&·this.GetBestAttackAgainst(msg.data.attacker,·true)·!=·"Capture")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2101| »   »   »   »   »   »   »   »   ·&&·((type.generic·==·"treasure"·&&·oldType.generic·==·"treasure")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2102| »   »   »   »   »   »   »   »   ·||·(type.specific·==·oldType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2103| »   »   »   »   »   »   »   »   ·&&·(type.specific·!=·"meat"·||·oldTemplate·==·template)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2126| »   »   »   »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(oldType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2166| »   »   »   »   »   »   »   »   &&·((type.generic·==·"treasure"·&&·oldType.generic·==·"treasure")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2167| »   »   »   »   »   »   »   »   ||·(type.specific·==·oldType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2168| »   »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·oldTemplate·==·template)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2213| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2214| »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·resourceTemplate·==·template))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2230| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2403| »   »   »   »   »   var·cmpResourceGatherer·=·Engine.QueryInterface(this.entity,·IID_ResourceGatherer);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceGatherer' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2419| »   »   »   »   »   var·nearby·=·this.FindNearbyResource(function(ent,·type,·template)·{
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2422| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2423| »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·resourceTemplate·==·template))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2443| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2632| »   »   »   »   »   var·cmpResourceGatherer·=·Engine.QueryInterface(this.entity,·IID_ResourceGatherer);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceGatherer' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2827| »   »   »   »   »   var·cmpResourceDropsite·=·Engine.QueryInterface(msg.data.newentity,·IID_ResourceDropsite);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceDropsite' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2903| »   »   »   »   »   if·(this.CanGarrison(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2906| »   »   »   »   »   »   if·(this.CheckGarrisonRange(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2908| »   »   »   »   »   »   »   var·cmpGarrisonHolder·=·Engine.QueryInterface(target,·IID_GarrisonHolder);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2930| »   »   »   »   »   »   »   »   var·cmpResourceDropsite·=·Engine.QueryInterface(target,·IID_ResourceDropsite);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2931| »   »   »   »   »   »   »   »   if·(cmpResourceDropsite·&&·this.CanReturnResource(target,·true))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2946| »   »   »   »   »   »   »   »   »   var·cmpHolderPosition·=·Engine.QueryInterface(target,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2947| »   »   »   »   »   »   »   »   »   var·cmpHolderUnitAI·=·Engine.QueryInterface(target,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2974| »   »   »   »   »   »   »   if·(this.MoveToTarget(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|3735| »   »   var·order·=·{·"type":·type,·"data":·data·};
|    | [NORMAL] JSHintBear:
|    | 'order' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|3804| »   for·(var·i·=·0;·i·<·this.orderQueue.length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|4074| »   let·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/UnitAI.js
|4327| »   »   var·parabolicMaxRange·=·0;
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|4331| »   var·guessedMaxRange·=·(range.max·+·parabolicMaxRange)/2;
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4338| »   return·cmpUnitMotion.MoveToTargetRange(target,·range.min,·Math.min(range.max,·parabolicMaxRange));
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4394| »   »   »   &&·cmpFormationUnitAI.order.data.target·==·target)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|4562| »   »   &&·this.CheckTargetDistanceFromHeldPosition(target,·IID_Attack,·this.GetBestAttackAgainst(target,·true))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|4563| »   »   &&·(this.GetStance().respondChaseBeyondVision·||·this.CheckTargetIsInVisionRange(target))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5085| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

binaries/data/mods/public/simulation/components/UnitAI.js
|5439| »   »   »   »   »   »   &&·!MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.attack))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5442| »   »   »   »   »   »   &&·MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.avoid))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5455| »   var·targets·=·this.GetTargetsFromUnit();
|    | [NORMAL] JSHintBear:
|    | 'targets' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5456| »   for·(var·targ·of·targets)
|    | [NORMAL] JSHintBear:
|    | 'targ' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5462| »   »   »   var·cmpIdentity·=·Engine.QueryInterface(targ,·IID_Identity);
|    | [NORMAL] JSHintBear:
|    | 'cmpIdentity' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5463| »   »   »   var·targetClasses·=·this.order.data.targetClasses;
|    | [NORMAL] JSHintBear:
|    | 'targetClasses' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5465| »   »   »   »   &&·!MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.attack))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5468| »   »   »   »   &&·MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.avoid))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5543| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [NORMAL] JSHintBear:
|    | 'cmpVision' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5546| »   »   var·range·=·cmpVision.GetRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5551| »   »   var·cmpRanged·=·Engine.QueryInterface(this.entity,·iid);
|    | [NORMAL] JSHintBear:
|    | 'cmpRanged' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5554| »   »   var·range·=·iid·!==·IID_Attack·?·cmpRanged.GetRange()·:·cmpRanged.GetFullAttackRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5554| »   »   var·range·=·iid·!==·IID_Attack·?·cmpRanged.GetRange()·:·cmpRanged.GetFullAttackRange();
|    | [MAJOR] JSHintBear:
|    | Too many errors. (92% scanned).

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

bb added a comment.Mar 16 2019, 4:47 PM

Something in the lioness changed, small rebase

Only the formation catch up is an interesting comment, rest is trivial.
Didn't test for oos on rejoin with the last version yet

binaries/data/mods/public/simulation/components/UnitAI.js
2039–2043 ↗(On Diff #7178)

The logic in the getRunspeed got removed so this code has become death I suppose (same for the other changed healthchanged stuff)

5596–5597 ↗(On Diff #7178)

check him

5602–5603 ↗(On Diff #7178)

same

binaries/data/mods/public/simulation/templates/template_formation.xml
59–60 ↗(On Diff #7178)

Sounds hackish

binaries/data/mods/public/simulation/templates/template_unit.xml
115 ↗(On Diff #7178)

Notice that this increases the run speed of almost every unit a little, meh

binaries/data/mods/public/simulation/templates/template_unit_champion_infantry_maceman.xml
36 ↗(On Diff #7178)

rly?

binaries/data/mods/public/simulation/templates/template_unit_hero_infantry.xml
27–32 ↗(On Diff #7178)

That was some really nice code :P

binaries/data/mods/public/simulation/templates/template_unit_hero_infantry_spearman.xml
32–34 ↗(On Diff #7178)

More of the 1x stuff

source/simulation2/components/CCmpUnitMotion.cpp
456 ↗(On Diff #7178)

"Should" be death code right?

858–863 ↗(On Diff #7178)

Removing this implies that formation members do not catch up with the formation anymore
Maybe you want something like

	fixed basicSpeed;
 		if (IsFormationMember())
 			basicSpeed = m_WalkSpeed * m_RunSpeedMultiplier;
 		else
                    basicSpeed = m_Speed;

Or the same with a ternary

Stan added inline comments.Mar 16 2019, 4:54 PM
binaries/data/mods/public/simulation/components/UnitMotionFlying.js
314 ↗(On Diff #7178)

Why 1 ? Can't we have planes with a speedboost ?

binaries/data/mods/public/simulation/data/auras/units/heroes/brit_hero_caratacos.json
6 ↗(On Diff #7178)

Why not UnitMotion/RunMultiplier ?

binaries/data/mods/public/simulation/templates/template_formation.xml
60 ↗(On Diff #7178)

Not really a fan of comments in XML files.

bb added inline comments.Mar 16 2019, 4:56 PM
binaries/data/mods/public/simulation/data/auras/units/heroes/brit_hero_caratacos.json
6 ↗(On Diff #7178)

as that would multiply the runspeed with 1.15*1.15

Stan added inline comments.Mar 16 2019, 4:57 PM
binaries/data/mods/public/simulation/data/auras/units/heroes/brit_hero_caratacos.json
6 ↗(On Diff #7178)

I see thanks !

wraitii marked 15 inline comments as done.Apr 13 2019, 12:01 PM
wraitii added inline comments.
binaries/data/mods/public/simulation/components/UnitMotionFlying.js
314 ↗(On Diff #7178)

UMF handles speed completely differently, and at this point should probably be separated from unitMotion, so I'd say no to this.

binaries/data/mods/public/simulation/data/auras/units/heroes/brit_hero_caratacos.json
6 ↗(On Diff #7178)

Indeed that the advantage of this change: you no longer have to update both values.

binaries/data/mods/public/simulation/templates/template_formation.xml
60 ↗(On Diff #7178)

There's really no other way to define it that I can think of. Formations have a base walk speed of 1 and are treated as "running" at a multiplier of that based on the unit's therein speed.

I'd rather not special-case them in code so this stays imo.

An alternative would be to give them a walkSpeed of 100 and a runMultiplier of 1, but really it's the same issue.

binaries/data/mods/public/simulation/templates/template_unit.xml
115 ↗(On Diff #7178)

Meh, as you say. Changed it anyways because I can.

binaries/data/mods/public/simulation/templates/template_unit_champion_infantry_maceman.xml
36 ↗(On Diff #7178)

Rebasing is a hell of a drug :p

binaries/data/mods/public/simulation/templates/template_unit_hero_infantry_spearman.xml
32–34 ↗(On Diff #7178)

I guess that's the flow of using incomplete tools sometimes.

source/simulation2/components/CCmpUnitMotion.cpp
456 ↗(On Diff #7178)

Not sure what you mean? This is more for internal coherence / preventing passing garbage values which we can't really control in the JS.

858–863 ↗(On Diff #7178)

Good note, there's an even easier way.

wraitii updated this revision to Diff 7746.Apr 13 2019, 12:01 PM
wraitii marked 8 inline comments as done.

Rebased addressing bb's comments. Hopefully good to go this time :)

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

Linter detected issues:
Executing section Source...

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

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

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

source/tools/atlas/GameInterface/ActorViewer.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/tools/atlas/GameInterface/ActorViewer.cpp
| 213| »   void·UpdatePropListRecursive(CModelAbstract*·model);
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClass' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|   8|   8| let height = 5;
|   9|   9| 
|  10|  10| AddMock(SYSTEM_ENTITY, IID_Pathfinder, {
|  11|    |-	GetPassabilityClass: (name) => 1 << 8
|    |  11|+	"GetPassabilityClass": (name) => 1 << 8
|  12|  12| });
|  13|  13| 
|  14|  14| let cmpUnitMotionFlying = ConstructComponent(entity, "UnitMotionFlying", {

binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|  45| »   "SetHeightFixed":·(y)·=>·height·=·y,
|    | [NORMAL] ESLintBear (no-return-assign):
|    | Arrow function should not return assignment.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|  74|  74| 	var newangle = angle;
|  75|  75| 	var canTurn = true;
|  76|  76| 	if (this.landing)
|  77|    |-	{
|    |  77|+	
|  78|  78| 		if (this.speed > 0 && this.onGround)
|  79|  79| 		{
|  80|  80| 			if (pos.y <= cmpWaterManager.GetWaterLevel(pos.x, pos.z) && this.template.DiesInWater == "true")
| 153| 153| 					this.waterDeath = true;
| 154| 154| 			}
| 155| 155| 		}
| 156|    |-	}
|    | 156|+	
| 157| 157| 	else
| 158| 158| 	{
| 159| 159| 		// If we haven't reached max speed yet then we're still on the ground;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|  93|  93| 				pos.y = Math.max(ground, pos.y - turnLength * this.template.ClimbRate);
|  94|  94| 		}
|  95|  95| 		else if (this.speed == 0 && this.onGround)
|  96|    |-		{
|    |  96|+		
|  97|  97| 			if (this.waterDeath && cmpHealth)
|  98|  98| 				cmpHealth.Kill();
|  99|  99| 			else
| 128| 128| 					newangle += Math.PI;
| 129| 129| 				}
| 130| 130| 			}
| 131|    |-		}
|    | 131|+		
| 132| 132| 		else
| 133| 133| 		{
| 134| 134| 			// Final Approach
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 101| 101| 				this.pitch = 0;
| 102| 102| 				// We've stopped.
| 103| 103| 				if (cmpGarrisonHolder)
| 104|    |-					cmpGarrisonHolder.AllowGarrisoning(true,"UnitMotionFlying");
|    | 104|+					cmpGarrisonHolder.AllowGarrisoning(true, "UnitMotionFlying");
| 105| 105| 				canTurn = false;
| 106| 106| 				this.hasTarget = false;
| 107| 107| 				this.landing = false;
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unexpected space after unary operator '-'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 138| 138| 			var targetHeight = ground;
| 139| 139| 			// Steep, then gradual descent.
| 140| 140| 			if ((pos.y - targetHeight) / this.template.FlyingHeight > 1 / SHORT_FINAL)
| 141|    |-				this.pitch = - Math.PI / 18;
|    | 141|+				this.pitch = -Math.PI / 18;
| 142| 142| 			else
| 143| 143| 				this.pitch = Math.PI / 18;
| 144| 144| 			var descentRate = ((pos.y - targetHeight) / this.template.FlyingHeight * this.template.ClimbRate + SHORT_FINAL) * SHORT_FINAL;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 155| 155| 		}
| 156| 156| 	}
| 157| 157| 	else
| 158|    |-	{
|    | 158|+	
| 159| 159| 		// If we haven't reached max speed yet then we're still on the ground;
| 160| 160| 		// otherwise we're taking off or flying
| 161| 161| 		// this.onGround in case of a go-around after landing (but not fully stopped)
| 195| 195| 				this.pitch = -1 * this.pitch;
| 196| 196| 			}
| 197| 197| 		}
| 198|    |-	}
|    | 198|+	
| 199| 199| 
| 200| 200| 	// If we're in range of the target then tell people that we've reached it
| 201| 201| 	// (TODO: quantisation breaks this)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 163| 163| 		if (this.speed < this.template.TakeoffSpeed && this.onGround)
| 164| 164| 		{
| 165| 165| 			if (cmpGarrisonHolder)
| 166|    |-				cmpGarrisonHolder.AllowGarrisoning(false,"UnitMotionFlying");
|    | 166|+				cmpGarrisonHolder.AllowGarrisoning(false, "UnitMotionFlying");
| 167| 167| 			this.pitch = 0;
| 168| 168| 			// Accelerate forwards
| 169| 169| 			this.speed = Math.min(this.template.MaxSpeed, this.speed + turnLength * this.template.AccelRate);
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unexpected space after unary operator '-'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 230| 230| 		if (newangle - angle > Math.PI / 18)
| 231| 231| 			this.roll = Math.PI / 9;
| 232| 232| 		else if (newangle - angle < -Math.PI / 18)
| 233|    |-			this.roll = - Math.PI / 9;
|    | 233|+			this.roll = -Math.PI / 9;
| 234| 234| 		else
| 235| 235| 			this.roll = newangle - angle;
| 236| 236| 	}
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 322| 322| UnitMotionFlying.prototype.GetSpeedRatio = function()
| 323| 323| {
| 324| 324| 	return this.GetCurrentSpeed() / this.GetWalkSpeed();
| 325|    |-}
|    | 325|+};
| 326| 326| 
| 327| 327| UnitMotionFlying.prototype.GetPassabilityClassName = function()
| 328| 328| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 346| 346| 
| 347| 347| UnitMotionFlying.prototype.StopMoving = function()
| 348| 348| {
| 349|    |-	//Invert
|    | 349|+	// Invert
| 350| 350| 	if (!this.waterDeath)
| 351| 351| 		this.landing = !this.landing;
| 352| 352| 

binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 182| »   »   »   var·targetHeight·=·ground·+·(+this.template.FlyingHeight);
|    | [NORMAL] JSHintBear:
|    | 'targetHeight' is already defined.

binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 325| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 410| 410| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 411| 411| 
| 412| 412| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 413|    |-			{
|    | 413|+			
| 414| 414| 				// For units, take the range in front of it, no spread. So angle = 0
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416|    |-			}
|    | 416|+			
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418| 418| 			{
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416| 416| 			}
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else
| 423| 423| 			{
| 424| 424| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421| 421| 			}
| 422| 422| 			else
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// not in world, set a default?
| 425| 425| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 426|    |-			}
|    | 426|+			
| 427| 427| 		}
| 428| 428| 	}
| 429| 429| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 791| 791| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 792| 792| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 793| 793| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 794|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 794|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 795| 795| 	}
| 796| 796| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 797| 797| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1310|1310| 		}
|1311|1311| 	}
|1312|1312| 	else
|1313|    |-	{
|    |1313|+	
|1314|1314| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1315|1315| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1316|1316| 		// wall piece.
|1331|1331| 			"pos": start.pos,
|1332|1332| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1333|1333| 		});
|1334|    |-	}
|    |1334|+	
|1335|1335| 
|1336|1336| 	if (end.pos)
|1337|1337| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1334|1334| 	}
|1335|1335| 
|1336|1336| 	if (end.pos)
|1337|    |-	{
|    |1337|+	
|1338|1338| 		// Analogous to the starting side case above
|1339|1339| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1340|1340| 		{
|1372|1372| 				"pos": end.pos,
|1373|1373| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1374|1374| 			});
|1375|    |-	}
|    |1375|+	
|1376|1376| 
|1377|1377| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1378|1378| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1550|1550| 
|1551|1551| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1552|1552| 		if (cmpVisual)
|1553|    |-		{
|    |1553|+		
|1554|1554| 			if (!allPiecesValid || !canAfford)
|1555|1555| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1556|1556| 			else
|1557|1557| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1558|    |-		}
|    |1558|+		
|1559|1559| 
|1560|1560| 		++entPool.numUsed;
|1561|1561| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1624|1624| 			{
|1625|1625| 				minDist2 = dist2;
|1626|1626| 				minDistEntitySnapData = {
|1627|    |-						"x": pos.x,
|    |1627|+					"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1625|1625| 				minDist2 = dist2;
|1626|1626| 				minDistEntitySnapData = {
|1627|1627| 						"x": pos.x,
|1628|    |-						"z": pos.z,
|    |1628|+					"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|1631|1631| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1626|1626| 				minDistEntitySnapData = {
|1627|1627| 						"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|    |-						"angle": cmpPosition.GetRotation().y,
|    |1629|+					"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|1631|1631| 				};
|1632|1632| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1627|1627| 						"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|    |-						"ent": ent
|    |1630|+					"ent": ent
|1631|1631| 				};
|1632|1632| 			}
|1633|1633| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1772|1772| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1773|1773| 	}
|1774|1774| 	else if (data.target === secondMarket)
|1775|    |-	{
|    |1775|+	
|1776|1776| 		result = {
|1777|1777| 			"type": "is second",
|1778|1778| 			"gain": cmpEntityTrader.GetGoods().amount,
|1779|1779| 		};
|1780|    |-	}
|    |1780|+	
|1781|1781| 	else if (!firstMarket)
|1782|1782| 	{
|1783|1783| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 		};
|1780|1780| 	}
|1781|1781| 	else if (!firstMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = { "type": "set first" };
|1784|    |-	}
|    |1784|+	
|1785|1785| 	else if (!secondMarket)
|1786|1786| 	{
|1787|1787| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1783|1783| 		result = { "type": "set first" };
|1784|1784| 	}
|1785|1785| 	else if (!secondMarket)
|1786|    |-	{
|    |1786|+	
|1787|1787| 		result = {
|1788|1788| 			"type": "set second",
|1789|1789| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1790|1790| 		};
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else
|1793|1793| 	{
|1794|1794| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		};
|1791|1791| 	}
|1792|1792| 	else
|1793|    |-	{
|    |1793|+	
|1794|1794| 		// Else both markets are not null and target is different from them
|1795|1795| 		result = { "type": "set first" };
|1796|    |-	}
|    |1796|+	
|1797|1797| 	return result;
|1798|1798| };
|1799|1799| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 226| 226| 		{
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229|    |-					"name": aura.auraName,
|    | 229|+				"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230|    |-					"description": aura.auraDescription || null,
|    | 230|+				"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231|    |-					"radius": aura.radius || null
|    | 231|+				"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
| 234| 234| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232|    |-				};
|    | 232|+			};
| 233| 233| 		}
| 234| 234| 	}
| 235| 235| 

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 (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  34|  34| 
|  35|  35| 
|  36|  36| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  37|    |-		SetInterval: function() { },
|    |  37|+		"SetInterval": function() { },
|  38|  38| 		SetTimeout: function() { },
|  39|  39| 	});
|  40|  40| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  35|  35| 
|  36|  36| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  37|  37| 		SetInterval: function() { },
|  38|    |-		SetTimeout: function() { },
|    |  38|+		"SetTimeout": function() { },
|  39|  39| 	});
|  40|  40| 
|  41|  41| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  39|  39| 	});
|  40|  40| 
|  41|  41| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|  42|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    |  42|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  42|  42| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|    |-		EnableActiveQuery: function(id) { },
|    |  45|+		"EnableActiveQuery": function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  46|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  46|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|    |-		DisableActiveQuery: function(id) { },
|    |  47|+		"DisableActiveQuery": function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|  50|  50| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|    |-		GetEntityFlagMask: function(identifier) { },
|    |  48|+		"GetEntityFlagMask": function(identifier) { },
|  49|  49| 	});
|  50|  50| 
|  51|  51| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  49|  49| 	});
|  50|  50| 
|  51|  51| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  52|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    |  52|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
|  53|  53| 	});
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  53|  53| 	});
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  56|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    |  56|+		"GetPlayerByID": function(id) { return playerEntity; },
|  57|  57| 		GetNumPlayers: function() { return 2; },
|  58|  58| 	});
|  59|  59| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  56|  56| 		GetPlayerByID: function(id) { return playerEntity; },
|  57|    |-		GetNumPlayers: function() { return 2; },
|    |  57|+		"GetNumPlayers": function() { return 2; },
|  58|  58| 	});
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  58|  58| 	});
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|    |-		IsAlly: function() { return false; },
|    |  61|+		"IsAlly": function() { return false; },
|  62|  62| 		IsEnemy: function() { return true; },
|  63|  63| 		GetEnemies: function() { return []; },
|  64|  64| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|  61| 		IsAlly: function() { return false; },
|  62|    |-		IsEnemy: function() { return true; },
|    |  62|+		"IsEnemy": function() { return true; },
|  63|  63| 		GetEnemies: function() { return []; },
|  64|  64| 	});
|  65|  65| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|  61| 		IsAlly: function() { return false; },
|  62|  62| 		IsEnemy: function() { return true; },
|  63|    |-		GetEnemies: function() { return []; },
|    |  63|+		"GetEnemies": function() { return []; },
|  64|  64| 	});
|  65|  65| 
|  66|  66| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  67|  67| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
|  68|  68| 
|  69|  69| 	AddMock(unit, IID_Identity, {
|  70|    |-		GetClassesList: function() { return []; },
|    |  70|+		"GetClassesList": function() { return []; },
|  71|  71| 	});
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  71|  71| 	});
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Ownership, {
|  74|    |-		GetOwner: function() { return 1; },
|    |  74|+		"GetOwner": function() { return 1; },
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    |  78|+		"GetTurretParent": function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|    |-		GetPosition: function() { return new Vector3D(); },
|    |  79|+		"GetPosition": function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|    |-		GetPosition2D: function() { return new Vector2D(); },
|    |  80|+		"GetPosition2D": function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|  83|  83| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|    |-		GetRotation: function() { return { "y": 0 }; },
|    |  81|+		"GetRotation": function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|  83|  83| 	});
|  84|  84| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|    |-		IsInWorld: function() { return true; },
|    |  82|+		"IsInWorld": function() { return true; },
|  83|  83| 	});
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  83|  83| 	});
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|    |-		GetWalkSpeed: function() { return 1; },
|    |  86|+		"GetWalkSpeed": function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToFormationOffset' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|    |-		MoveToFormationOffset: function(target, x, z) { },
|    |  87|+		"MoveToFormationOffset": function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|    |-		IsInTargetRange: function(target, min, max) { return true; },
|    |  88|+		"IsInTargetRange": function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|    |-		MoveToTargetRange: function(target, min, max) { },
|    |  89|+		"MoveToTargetRange": function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|  92|  92| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|    |-		StopMoving: function() { },
|    |  90|+		"StopMoving": function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|  92|  92| 	});
|  93|  93| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|    |-		GetPassabilityClassName: function() { return "default"; },
|    |  91|+		"GetPassabilityClassName": function() { return "default"; },
|  92|  92| 	});
|  93|  93| 
|  94|  94| 	AddMock(unit, IID_Vision, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  92|  92| 	});
|  93|  93| 
|  94|  94| 	AddMock(unit, IID_Vision, {
|  95|    |-		GetRange: function() { return 10; },
|    |  95|+		"GetRange": function() { return 10; },
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    |  99|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    |  99|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 100|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 100|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 101|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102|    |-		GetPreference: function(t) { return 0; },
|    | 102|+		"GetPreference": function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 103|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 106| 106| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104|    |-		CanAttack: function(v) { return true; },
|    | 104|+		"CanAttack": function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 106| 106| 	});
| 107| 107| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 105|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 106| 106| 	});
| 107| 107| 
| 108| 108| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 113| 113| 	if (mode == 1)
| 114| 114| 	{
| 115| 115| 		AddMock(enemy, IID_Health, {
| 116|    |-			GetHitpoints: function() { return 10; },
|    | 116|+			"GetHitpoints": function() { return 10; },
| 117| 117| 		});
| 118| 118| 		AddMock(enemy, IID_UnitAI, {
| 119| 119| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 116| 116| 			GetHitpoints: function() { return 10; },
| 117| 117| 		});
| 118| 118| 		AddMock(enemy, IID_UnitAI, {
| 119|    |-			IsAnimal: function() { return false; }
|    | 119|+			"IsAnimal": function() { return false; }
| 120| 120| 		});
| 121| 121| 	}
| 122| 122| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 121| 121| 	}
| 122| 122| 	else if (mode == 2)
| 123| 123| 		AddMock(enemy, IID_Health, {
| 124|    |-			GetHitpoints: function() { return 0; },
|    | 124|+			"GetHitpoints": function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127| 127| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 124| 124| 			GetHitpoints: function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 127|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 124| 124| 			GetHitpoints: function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 127|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
| 131|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 131|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 132|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 130| 130| 	AddMock(controller, IID_Position, {
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 133|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 134|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
| 137| 137| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 135|+		"GetRotation": function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
| 137| 137| 	});
| 138| 138| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136|    |-		IsInWorld: function() { return true; },
|    | 136|+		"IsInWorld": function() { return true; },
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140|    |-		GetWalkSpeed: function() { return 1; },
|    | 140|+		"GetWalkSpeed": function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetSpeedRatio' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141|    |-		SetSpeedRatio: function(speed) { },
|    | 141|+		"SetSpeedRatio": function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
| 144| 144| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToPointRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142|    |-		MoveToPointRange: function(x, z, minRange, maxRange) { },
|    | 142|+		"MoveToPointRange": function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
| 144| 144| 	});
| 145| 145| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143|    |-		GetPassabilityClassName: function() { return "default"; },
|    | 143|+		"GetPassabilityClassName": function() { return "default"; },
| 144| 144| 	});
| 145| 145| 
| 146| 146| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 181| 181| 	var unitAIs = [];
| 182| 182| 
| 183| 183| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 184|    |-		SetInterval: function() { },
|    | 184|+		"SetInterval": function() { },
| 185| 185| 		SetTimeout: function() { },
| 186| 186| 	});
| 187| 187| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 182| 182| 
| 183| 183| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 184| 184| 		SetInterval: function() { },
| 185|    |-		SetTimeout: function() { },
|    | 185|+		"SetTimeout": function() { },
| 186| 186| 	});
| 187| 187| 
| 188| 188| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 187| 187| 
| 188| 188| 
| 189| 189| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 190|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 190|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 191| 191| 			return 1;
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 190| 190| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 191| 191| 			return 1;
| 192| 192| 		},
| 193|    |-		EnableActiveQuery: function(id) { },
|    | 193|+		"EnableActiveQuery": function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 191| 191| 			return 1;
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 194|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
| 197| 197| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195|    |-		DisableActiveQuery: function(id) { },
|    | 195|+		"DisableActiveQuery": function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
| 197| 197| 	});
| 198| 198| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196|    |-		GetEntityFlagMask: function(identifier) { },
|    | 196|+		"GetEntityFlagMask": function(identifier) { },
| 197| 197| 	});
| 198| 198| 
| 199| 199| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 197| 197| 	});
| 198| 198| 
| 199| 199| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 200|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 200|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 204|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 204|+		"GetPlayerByID": function(id) { return playerEntity; },
| 205| 205| 		GetNumPlayers: function() { return 2; },
| 206| 206| 	});
| 207| 207| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 204| 204| 		GetPlayerByID: function(id) { return playerEntity; },
| 205|    |-		GetNumPlayers: function() { return 2; },
|    | 205|+		"GetNumPlayers": function() { return 2; },
| 206| 206| 	});
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 206| 206| 	});
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209|    |-		IsAlly: function() { return false; },
|    | 209|+		"IsAlly": function() { return false; },
| 210| 210| 		IsEnemy: function() { return true; },
| 211| 211| 		GetEnemies: function() { return []; },
| 212| 212| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209| 209| 		IsAlly: function() { return false; },
| 210|    |-		IsEnemy: function() { return true; },
|    | 210|+		"IsEnemy": function() { return true; },
| 211| 211| 		GetEnemies: function() { return []; },
| 212| 212| 	});
| 213| 213| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209| 209| 		IsAlly: function() { return false; },
| 210| 210| 		IsEnemy: function() { return true; },
| 211|    |-		GetEnemies: function() { return []; },
|    | 211|+		"GetEnemies": function() { return []; },
| 212| 212| 	});
| 213| 213| 
| 214| 214| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 219| 219| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 220| 220| 
| 221| 221| 		AddMock(unit + i, IID_Identity, {
| 222|    |-			GetClassesList: function() { return []; },
|    | 222|+			"GetClassesList": function() { return []; },
| 223| 223| 		});
| 224| 224| 
| 225| 225| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 223| 223| 		});
| 224| 224| 
| 225| 225| 		AddMock(unit + i, IID_Ownership, {
| 226|    |-			GetOwner: function() { return 1; },
|    | 226|+			"GetOwner": function() { return 1; },
| 227| 227| 		});
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 227| 227| 		});
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 230|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231|    |-			GetPosition: function() { return new Vector3D(); },
|    | 231|+			"GetPosition": function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 232|+			"GetPosition2D": function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
| 235| 235| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 233|+			"GetRotation": function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
| 235| 235| 		});
| 236| 236| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234|    |-			IsInWorld: function() { return true; },
|    | 234|+			"IsInWorld": function() { return true; },
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238|    |-			GetWalkSpeed: function() { return 1; },
|    | 238|+			"GetWalkSpeed": function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToFormationOffset' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239|    |-			MoveToFormationOffset: function(target, x, z) { },
|    | 239|+			"MoveToFormationOffset": function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240|    |-			IsInTargetRange: function(target, min, max) { return true; },
|    | 240|+			"IsInTargetRange": function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241|    |-			MoveToTargetRange: function(target, min, max) { },
|    | 241|+			"MoveToTargetRange": function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
| 244| 244| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242|    |-			StopMoving: function() { },
|    | 242|+			"StopMoving": function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
| 244| 244| 		});
| 245| 245| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243|    |-			GetPassabilityClassName: function() { return "default"; },
|    | 243|+			"GetPassabilityClassName": function() { return "default"; },
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_Vision, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_Vision, {
| 247|    |-			GetRange: function() { return 10; },
|    | 247|+			"GetRange": function() { return 10; },
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return { "max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 252|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 252|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 253|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 254|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 257| 257| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255|    |-			CanAttack: function(v) { return true; },
|    | 255|+			"CanAttack": function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 257| 257| 		});
| 258| 258| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 256|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 257| 257| 		});
| 258| 258| 
| 259| 259| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 265| 265| 
| 266| 266| 	// create enemy
| 267| 267| 	AddMock(enemy, IID_Health, {
| 268|    |-		GetHitpoints: function() { return 40; },
|    | 268|+		"GetHitpoints": function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271| 271| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 268| 268| 		GetHitpoints: function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 271|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 268| 268| 		GetHitpoints: function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 271|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
| 275|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 275|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 276|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 274| 274| 	AddMock(controller, IID_Position, {
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 277|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 278|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
| 281| 281| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 279|+		"GetRotation": function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
| 281| 281| 	});
| 282| 282| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280|    |-		IsInWorld: function() { return true; },
|    | 280|+		"IsInWorld": function() { return true; },
| 281| 281| 	});
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 281| 281| 	});
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284|    |-		GetWalkSpeed: function() { return 1; },
|    | 284|+		"GetWalkSpeed": function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetSpeedRatio' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285|    |-		SetSpeedRatio: function(speed) { },
|    | 285|+		"SetSpeedRatio": function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToPointRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286|    |-		MoveToPointRange: function(x, z, minRange, maxRange) { },
|    | 286|+		"MoveToPointRange": function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287|    |-		IsInTargetRange: function(target, min, max) { return true; },
|    | 287|+		"IsInTargetRange": function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
| 290| 290| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288|    |-		StopMoving: function() { },
|    | 288|+		"StopMoving": function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
| 290| 290| 	});
| 291| 291| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289|    |-		GetPassabilityClassName: function() { return "default"; },
|    | 289|+		"GetPassabilityClassName": function() { return "default"; },
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return { "max":10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293| 293| 		GetRange: function() { return {"max":10, "min": 0}; },
| 294|    |-		CanAttackAsFormation: function() { return false; },
|    | 294|+		"CanAttackAsFormation": function() { return false; },
| 295| 295| 	});
| 296| 296| 
| 297| 297| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 	for (var ent of unitAIs)
| 304| 304| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 305| 305| 
| 306|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 306|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 307| 307| 
| 308| 308| 	// let all units be in position
| 309| 309| 	for (var ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 	for (var ent of unitAIs)
| 304| 304| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 305| 305| 
| 306|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 306|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 307| 307| 
| 308| 308| 	// let all units be in position
| 309| 309| 	for (var ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  46| »   »   ResetActiveQuery:·function(id)·{·if·(mode·==·0)·return·[];·else·return·[enemy];·},
|    | [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/tests/test_UnitAI.js
| 215| »   for·(var·i·=·0;·i·<·unitCount;·i++)·{
|    | [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/tests/test_UnitAI.js
| 309| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 312| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 304| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 313| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 126| 126| 	this.formationMembersWithAura = []; // Members with a formation aura
| 127| 127| 	this.width = 0;
| 128| 128| 	this.depth = 0;
| 129|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 129|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 130| 130| 	this.twinFormations = [];
| 131| 131| 	// distance from which two twin formations will merge into one.
| 132| 132| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 126| 126| 	this.formationMembersWithAura = []; // Members with a formation aura
| 127| 127| 	this.width = 0;
| 128| 128| 	this.depth = 0;
| 129|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 129|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 130| 130| 	this.twinFormations = [];
| 131| 131| 	// distance from which two twin formations will merge into one.
| 132| 132| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 144| 144| 
| 145| 145| Formation.prototype.GetSize = function()
| 146| 146| {
| 147|    |-	return {"width": this.width, "depth": this.depth};
|    | 147|+	return { "width": this.width, "depth": this.depth};
| 148| 148| };
| 149| 149| 
| 150| 150| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 144| 144| 
| 145| 145| Formation.prototype.GetSize = function()
| 146| 146| {
| 147|    |-	return {"width": this.width, "depth": this.depth};
|    | 147|+	return {"width": this.width, "depth": this.depth };
| 148| 148| };
| 149| 149| 
| 150| 150| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return { "width":1, "depth": 1};
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return {"width": 1, "depth": 1};
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return {"width":1, "depth": 1 };
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 565| 565| 	if (!footprints.length)
| 566| 566| 		return {"width":1, "depth": 1};
| 567| 567| 
| 568|    |-	var r = {"width": 0, "depth": 0};
|    | 568|+	var r = { "width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
| 570| 570| 	{
| 571| 571| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 565| 565| 	if (!footprints.length)
| 566| 566| 		return {"width":1, "depth": 1};
| 567| 567| 
| 568|    |-	var r = {"width": 0, "depth": 0};
|    | 568|+	var r = {"width": 0, "depth": 0 };
| 569| 569| 	for (var shape of footprints)
| 570| 570| 	{
| 571| 571| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
| 570|    |-	{
|    | 570|+	
| 571| 571| 		if (shape.type == "circle")
| 572| 572| 		{
| 573| 573| 			r.width += shape.radius * 2;
| 578| 578| 			r.width += shape.width;
| 579| 579| 			r.depth += shape.depth;
| 580| 580| 		}
| 581|    |-	}
|    | 581|+	
| 582| 582| 	r.width /= footprints.length;
| 583| 583| 	r.depth /= footprints.length;
| 584| 584| 	return r;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 591| 591| 	separation.depth *= this.separationMultiplier.depth;
| 592| 592| 
| 593| 593| 	if (this.columnar)
| 594|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 594|+		var sortingClasses = ["Cavalry", "Infantry"];
| 595| 595| 	else
| 596| 596| 		var sortingClasses = this.sortingClasses.slice();
| 597| 597| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 		var classes = cmpIdentity.GetClassesList();
| 609| 609| 		var done = false;
| 610| 610| 		for (var c = 0; c < sortingClasses.length; ++c)
| 611|    |-		{
|    | 611|+		
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614| 614| 				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
| 618|    |-		}
|    | 618|+		
| 619| 619| 		if (!done)
| 620| 620| 			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
| 621| 621| 	}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 		{
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 614|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 		{
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 614|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 635| 635| 	if (this.columnar)
| 636| 636| 	{
| 637| 637| 		shape = "square";
| 638|    |-		cols = Math.min(count,3);
|    | 638|+		cols = Math.min(count, 3);
| 639| 639| 		shiftRows = false;
| 640| 640| 		centerGap = 0;
| 641| 641| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 689| 689| 					n -= r%2;
| 690| 690| 			}
| 691| 691| 			else if (shape == "triangle")
| 692|    |-			{
|    | 692|+			
| 693| 693| 				if (shiftRows)
| 694| 694| 					var n = r + 1;
| 695| 695| 				else
| 696| 696| 					var n = r * 2 + 1;
| 697|    |-			}
|    | 697|+			
| 698| 698| 			if (!shiftRows && n > left)
| 699| 699| 				n = left;
| 700| 700| 			for (var c = 0; c < n && left > 0; ++c)
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 730| 730| 	// calculating offset distances without a zero average makes no sense, as the formation
| 731| 731| 	// will jump to a different position any time
| 732| 732| 	var avgoffset = Vector2D.average(offsets);
| 733|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 733|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 734| 734| 
| 735| 735| 	// sort the available places in certain ways
| 736| 736| 	// 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 '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 799| 799| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 800| 800| {
| 801| 801| 	var offsetPositions = [];
| 802|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 802|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 803| 803| 	// calculate the world positions
| 804| 804| 	for (var o of offsets)
| 805| 805| 		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 '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 799| 799| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 800| 800| {
| 801| 801| 	var offsetPositions = [];
| 802|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 802|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 803| 803| 	// calculate the world positions
| 804| 804| 	for (var o of offsets)
| 805| 805| 		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 '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 816| 816| Formation.prototype.GetEstimatedOrientation = function(pos)
| 817| 817| {
| 818| 818| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 819|    |-	var r = {"sin": 0, "cos": 1};
|    | 819|+	var r = { "sin": 0, "cos": 1};
| 820| 820| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 821| 821| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 822| 822| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 816| 816| Formation.prototype.GetEstimatedOrientation = function(pos)
| 817| 817| {
| 818| 818| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 819|    |-	var r = {"sin": 0, "cos": 1};
|    | 819|+	var r = {"sin": 0, "cos": 1 };
| 820| 820| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 821| 821| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 822| 822| 	{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 898| 898| 		cmpOtherFormation.RemoveMembers(otherMembers);
| 899| 899| 		this.AddMembers(otherMembers);
| 900| 900| 		Engine.DestroyEntity(this.twinFormations[i]);
| 901|    |-		this.twinFormations.splice(i,1);
|    | 901|+		this.twinFormations.splice(i, 1);
| 902| 902| 	}
| 903| 903| 	// Switch between column and box if necessary
| 904| 904| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 620| »   »   »   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
| 660| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 710| »   »   »   »   »   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
| 712| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 714| »   »   »   »   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
| 724| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 614| »   »   »   »   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
| 753| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

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

binaries/data/mods/public/simulation/components/Formation.js
| 860| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 228| 228| 		// Move a tile outside the building
| 229| 229| 		let range = 4;
| 230| 230| 		if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
| 231|    |-		{
|    | 231|+		
| 232| 232| 			// We've started walking to the given point
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234|    |-		}
|    | 234|+		
| 235| 235| 		else
| 236| 236| 		{
| 237| 237| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234| 234| 		}
| 235| 235| 		else
| 236|    |-		{
|    | 236|+		
| 237| 237| 			// We are already at the target, or can't move at all
| 238| 238| 			this.FinishOrder();
| 239|    |-		}
|    | 239|+		
| 240| 240| 	},
| 241| 241| 
| 242| 242| 	// Individual orders:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 335| 335| 
| 336| 336| 		var ok = this.MoveToTarget(this.order.data.target);
| 337| 337| 		if (ok)
| 338|    |-		{
|    | 338|+		
| 339| 339| 			// We've started walking to the given point
| 340| 340| 			if (this.IsAnimal())
| 341| 341| 				this.SetNextState("ANIMAL.WALKING");
| 342| 342| 			else
| 343| 343| 				this.SetNextState("INDIVIDUAL.WALKING");
| 344|    |-		}
|    | 344|+		
| 345| 345| 		else
| 346| 346| 		{
| 347| 347| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364| 364| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365| 365| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366|    |-		{
|    | 366|+		
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 369| 369| 				needToMove = false;
| 370|    |-		}
|    | 370|+		
| 371| 371| 
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 361| 361| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 362| 362| 		var needToMove = true;
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 364|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 365|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366| 366| 		{
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
| 374| 374| 		if (needToMove && this.MoveToTarget(this.order.data.target))
| 375|    |-		{
|    | 375|+		
| 376| 376| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
| 377|    |-		}
|    | 377|+		
| 378| 378| 		else
| 379| 379| 		{
| 380| 380| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 401| 401| 		var distance = DistanceBetweenEntities(this.entity, this.order.data.target) + (+this.template.FleeDistance);
| 402| 402| 		var cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
| 403| 403| 		if (cmpUnitMotion.MoveToTargetRange(this.order.data.target, distance, -1))
| 404|    |-		{
|    | 404|+		
| 405| 405| 			// We've started fleeing from the given target
| 406| 406| 			if (this.IsAnimal())
| 407| 407| 				this.SetNextState("ANIMAL.FLEEING");
| 408| 408| 			else
| 409| 409| 				this.SetNextState("INDIVIDUAL.FLEEING");
| 410|    |-		}
|    | 410|+		
| 411| 411| 		else
| 412| 412| 		{
| 413| 413| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 448| 448| 			}
| 449| 449| 
| 450| 450| 			if (this.order.data.attackType == this.oldAttackType)
| 451|    |-			{
|    | 451|+			
| 452| 452| 				if (this.IsAnimal())
| 453| 453| 					this.SetNextState("ANIMAL.COMBAT.ATTACKING");
| 454| 454| 				else
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456|    |-			}
|    | 456|+			
| 457| 457| 			else
| 458| 458| 			{
| 459| 459| 				if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456| 456| 			}
| 457| 457| 			else
| 458|    |-			{
|    | 458|+			
| 459| 459| 				if (this.IsAnimal())
| 460| 460| 					this.SetNextState("ANIMAL.COMBAT.ATTACKING");
| 461| 461| 				else
| 462| 462| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 463|    |-			}
|    | 463|+			
| 464| 464| 			return;
| 465| 465| 		}
| 466| 466| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 580| 580| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 581| 581| 				}
| 582| 582| 				else
| 583|    |-				{
|    | 583|+				
| 584| 584| 					// We couldn't move there, or the target moved away
| 585| 585| 					this.FinishOrder();
| 586|    |-				}
|    | 586|+				
| 587| 587| 				return;
| 588| 588| 			}
| 589| 589| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 593| 593| 
| 594| 594| 		// Try to move within range
| 595| 595| 		if (this.MoveToTargetRange(this.order.data.target, IID_ResourceGatherer))
| 596|    |-		{
|    | 596|+		
| 597| 597| 			// We've started walking to the given point
| 598| 598| 			this.SetNextState("INDIVIDUAL.GATHER.APPROACHING");
| 599|    |-		}
|    | 599|+		
| 600| 600| 		else
| 601| 601| 		{
| 602| 602| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 670| 670| 	"Order.Repair": function(msg) {
| 671| 671| 		// Try to move within range
| 672| 672| 		if (this.MoveToTargetRange(this.order.data.target, IID_Builder))
| 673|    |-		{
|    | 673|+		
| 674| 674| 			// We've started walking to the given point
| 675| 675| 			this.SetNextState("INDIVIDUAL.REPAIR.APPROACHING");
| 676|    |-		}
|    | 676|+		
| 677| 677| 		else
| 678| 678| 		{
| 679| 679| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 706| 706| 		}
| 707| 707| 
| 708| 708| 		if (this.MoveToGarrisonRange(this.order.data.target))
| 709|    |-		{
|    | 709|+		
| 710| 710| 			this.SetNextState("INDIVIDUAL.GARRISON.APPROACHING");
| 711|    |-		}
|    | 711|+		
| 712| 712| 		else
| 713| 713| 		{
| 714| 714| 			// We do a range check before actually garrisoning
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 834| 834| 			if (!this.CheckTargetAttackRange(target, target))
| 835| 835| 			{
| 836| 836| 				if (this.TargetIsAlive(target) && this.CheckTargetVisible(target))
| 837|    |-				{
|    | 837|+				
| 838| 838| 					if (this.MoveToTargetAttackRange(target, target))
| 839| 839| 					{
| 840| 840| 						this.SetNextState("COMBAT.APPROACHING");
| 841| 841| 						return;
| 842| 842| 					}
| 843|    |-				}
|    | 843|+				
| 844| 844| 				this.FinishOrder();
| 845| 845| 				return;
| 846| 846| 			}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 859| 859| 			}
| 860| 860| 			// Check if we are already in range, otherwise walk there
| 861| 861| 			if (!this.CheckGarrisonRange(msg.data.target))
| 862|    |-			{
|    | 862|+			
| 863| 863| 				if (!this.CheckTargetVisible(msg.data.target))
| 864| 864| 				{
| 865| 865| 					this.FinishOrder();
| 874| 874| 						return;
| 875| 875| 					}
| 876| 876| 				}
| 877|    |-			}
|    | 877|+			
| 878| 878| 
| 879| 879| 			this.SetNextState("GARRISON.GARRISONING");
| 880| 880| 		},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 866| 866| 					return;
| 867| 867| 				}
| 868| 868| 				else
| 869|    |-				{
|    | 869|+				
| 870| 870| 					// Out of range; move there in formation
| 871| 871| 					if (this.MoveToGarrisonRange(msg.data.target))
| 872| 872| 					{
| 873| 873| 						this.SetNextState("GARRISON.APPROACHING");
| 874| 874| 						return;
| 875| 875| 					}
| 876|    |-				}
|    | 876|+				
| 877| 877| 			}
| 878| 878| 
| 879| 879| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 865| 865| 					this.FinishOrder();
| 866| 866| 					return;
| 867| 867| 				}
| 868|    |-				else
| 869|    |-				{
|    | 868|+				
| 870| 869| 					// Out of range; move there in formation
| 871| 870| 					if (this.MoveToGarrisonRange(msg.data.target))
| 872| 871| 					{
| 873| 872| 						this.SetNextState("GARRISON.APPROACHING");
| 874| 873| 						return;
| 875| 874| 					}
| 876|    |-				}
|    | 875|+				
| 877| 876| 			}
| 878| 877| 
| 879| 878| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 892| 892| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 893| 893| 					}
| 894| 894| 					else
| 895|    |-					{
|    | 895|+					
| 896| 896| 						// We couldn't move there, or the target moved away
| 897| 897| 						this.FinishOrder();
| 898|    |-					}
|    | 898|+					
| 899| 899| 					return;
| 900| 900| 				}
| 901| 901| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1113|1113| 			},
|1114|1114| 		},
|1115|1115| 
|1116|    |-		"GARRISON":{
|    |1116|+		"GARRISON": {
|1117|1117| 			"enter": function() {
|1118|1118| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1119|1119| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1297|1297| 			// If the controller handled an order but some members rejected it,
|1298|1298| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1299|1299| 			if (this.orderQueue.length)
|1300|    |-			{
|    |1300|+			
|1301|1301| 				// We're leaving the formation, so stop our FormationWalk order
|1302|1302| 				if (this.FinishOrder())
|1303|1303| 					return;
|1304|    |-			}
|    |1304|+			
|1305|1305| 
|1306|1306| 			// No orders left, we're an individual now
|1307|1307| 			if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1325|1325| 			// Move a tile outside the building
|1326|1326| 			let range = 4;
|1327|1327| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|1328|    |-			{
|    |1328|+			
|1329|1329| 				// We've started walking to the given point
|1330|1330| 				this.SetNextState("WALKINGTOPOINT");
|1331|    |-			}
|    |1331|+			
|1332|1332| 			else
|1333|1333| 			{
|1334|1334| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1330|1330| 				this.SetNextState("WALKINGTOPOINT");
|1331|1331| 			}
|1332|1332| 			else
|1333|    |-			{
|    |1333|+			
|1334|1334| 				// We are already at the target, or can't move at all
|1335|1335| 				this.FinishOrder();
|1336|    |-			}
|    |1336|+			
|1337|1337| 		},
|1338|1338| 
|1339|1339| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1531|1531| 
|1532|1532| 			"LosRangeUpdate": function(msg) {
|1533|1533| 				if (this.GetStance().targetVisibleEnemies)
|1534|    |-				{
|    |1534|+				
|1535|1535| 					// Start attacking one of the newly-seen enemy (if any)
|1536|1536| 					this.AttackEntitiesByPreference(msg.data.added);
|1537|    |-				}
|    |1537|+				
|1538|1538| 			},
|1539|1539| 
|1540|1540| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1717|1717| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1718|1718| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1719|1719| 						if (cmpHealth && (cmpHealth.GetHitpoints() < cmpHealth.GetMaxHitpoints()))
|1720|    |-						{
|    |1720|+						
|1721|1721| 							if (this.CanHeal(this.isGuardOf))
|1722|1722| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1723|1723| 							else if (this.CanRepair(this.isGuardOf))
|1724|1724| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1725|    |-						}
|    |1725|+						
|1726|1726| 					}
|1727|1727| 				},
|1728|1728| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1802|1802| 				"MoveCompleted": function() {
|1803|1803| 
|1804|1804| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1805|    |-					{
|    |1805|+					
|1806|1806| 						// If the unit needs to unpack, do so
|1807|1807| 						if (this.CanUnpack())
|1808|1808| 						{
|1811|1811| 						}
|1812|1812| 						else
|1813|1813| 							this.SetNextState("ATTACKING");
|1814|    |-					}
|    |1814|+					
|1815|1815| 					else
|1816|1816| 					{
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1809|1809| 							this.PushOrderFront("Unpack", { "force": true });
|1810|1810| 							return;
|1811|1811| 						}
|1812|    |-						else
|1813|    |-							this.SetNextState("ATTACKING");
|    |1812|+						this.SetNextState("ATTACKING");
|1814|1813| 					}
|1815|1814| 					else
|1816|1815| 					{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1813|1813| 							this.SetNextState("ATTACKING");
|1814|1814| 					}
|1815|1815| 					else
|1816|    |-					{
|    |1816|+					
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1818|1818| 						{
|1819|1819| 							this.SetNextState("APPROACHING");
|1823|1823| 							// Give up
|1824|1824| 							this.FinishOrder();
|1825|1825| 						}
|1826|    |-					}
|    |1826|+					
|1827|1827| 				},
|1828|1828| 			},
|1829|1829| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1815|1815| 					else
|1816|1816| 					{
|1817|1817| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1818|    |-						{
|    |1818|+						
|1819|1819| 							this.SetNextState("APPROACHING");
|1820|    |-						}
|    |1820|+						
|1821|1821| 						else
|1822|1822| 						{
|1823|1823| 							// Give up
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1819|1819| 							this.SetNextState("APPROACHING");
|1820|1820| 						}
|1821|1821| 						else
|1822|    |-						{
|    |1822|+						
|1823|1823| 							// Give up
|1824|1824| 							this.FinishOrder();
|1825|    |-						}
|    |1825|+						
|1826|1826| 					}
|1827|1827| 				},
|1828|1828| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1840|1840| 					}
|1841|1841| 					// Check the target is still alive and attackable
|1842|1842| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1843|    |-					{
|    |1843|+					
|1844|1844| 						// Can't reach it - try to chase after it
|1845|1845| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1846|1846| 						{
|1855|1855| 								return;
|1856|1856| 							}
|1857|1857| 						}
|1858|    |-					}
|    |1858|+					
|1859|1859| 
|1860|1860| 					var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|1861|1861| 					this.attackTimers = cmpAttack.GetTimers(this.order.data.attackType);
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1886|1886| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1887|1887| 
|1888|1888| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1889|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1889|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1890|1890| 
|1891|1891| 					this.FaceTowardsTarget(this.order.data.target);
|1892|1892| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2015|2015| 
|2016|2016| 				"Attacked": function(msg) {
|2017|2017| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2018|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2019|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2018|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2019|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2020|2020| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2021|2021| 				},
|2022|2022| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2029|2029| 					this.SelectAnimation("move");
|2030|2030| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2031|2031| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2032|    |-					{
|    |2032|+					
|2033|2033| 						// Run after a fleeing target
|2034|2034| 						this.SetMoveSpeedRatio(this.GetRunMultiplier());
|2035|    |-					}
|    |2035|+					
|2036|2036| 					this.StartTimer(1000, 1000);
|2037|2037| 				},
|2038|2038| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2088|2088| 						// Also don't switch to a different type of huntable animal
|2089|2089| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2090|2090| 							return (
|2091|    |-								ent != oldTarget
|2092|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2091|+								ent != oldTarget &&
|    |2092|+								 ((type.generic == "treasure" && oldType.generic == "treasure")
|2093|2093| 								 || (type.specific == oldType.specific
|2094|2094| 								 && (type.specific != "meat" || oldTemplate == template)))
|2095|2095| 							);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2089|2089| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2090|2090| 							return (
|2091|2091| 								ent != oldTarget
|2092|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2093|    |-								 || (type.specific == oldType.specific
|    |2092|+								 && ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2093|+								 (type.specific == oldType.specific
|2094|2094| 								 && (type.specific != "meat" || oldTemplate == template)))
|2095|2095| 							);
|2096|2096| 						}, oldTarget);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2090|2090| 							return (
|2091|2091| 								ent != oldTarget
|2092|2092| 								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2093|    |-								 || (type.specific == oldType.specific
|2094|    |-								 && (type.specific != "meat" || oldTemplate == template)))
|    |2093|+								 || (type.specific == oldType.specific &&
|    |2094|+								 (type.specific != "meat" || oldTemplate == template)))
|2095|2095| 							);
|2096|2096| 						}, oldTarget);
|2097|2097| 						if (nearby)
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2099|2099| 							this.PerformGather(nearby, false, false);
|2100|2100| 							return true;
|2101|2101| 						}
|2102|    |-						else
|2103|    |-						{
|    |2102|+						
|2104|2103| 							// It's probably better in this case, to avoid units getting stuck around a dropsite
|2105|2104| 							// in a "Target is far away, full, nearby are no good resources, return to dropsite" loop
|2106|2105| 							// to order it to GatherNear the resource position.
|2121|2120| 									return true;
|2122|2121| 								}
|2123|2122| 							}
|2124|    |-						}
|    |2123|+						
|2125|2124| 						return true;
|2126|2125| 					}
|2127|2126| 					return false;
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2111|2111| 								this.GatherNearPosition(pos.x, pos.z, oldType, oldTemplate);
|2112|2112| 								return true;
|2113|2113| 							}
|2114|    |-							else
|2115|    |-							{
|    |2114|+							
|2116|2115| 								// we're kind of stuck here. Return resource.
|2117|2116| 								var nearby = this.FindNearestDropsite(oldType.generic);
|2118|2117| 								if (nearby)
|2120|2119| 									this.PushOrderFront("ReturnResource", { "target": nearby, "force": false });
|2121|2120| 									return true;
|2122|2121| 								}
|2123|    |-							}
|    |2122|+							
|2124|2123| 						}
|2125|2124| 						return true;
|2126|2125| 					}
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2153|2153| 						// Also don't switch to a different type of huntable animal
|2154|2154| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2155|2155| 							return (
|2156|    |-								ent != oldTarget
|2157|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2156|+								ent != oldTarget &&
|    |2157|+								((type.generic == "treasure" && oldType.generic == "treasure")
|2158|2158| 								|| (type.specific == oldType.specific
|2159|2159| 								&& (type.specific != "meat" || oldTemplate == template)))
|2160|2160| 							);
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2154|2154| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2155|2155| 							return (
|2156|2156| 								ent != oldTarget
|2157|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2158|    |-								|| (type.specific == oldType.specific
|    |2157|+								&& ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2158|+								(type.specific == oldType.specific
|2159|2159| 								&& (type.specific != "meat" || oldTemplate == template)))
|2160|2160| 							);
|2161|2161| 						});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2155|2155| 							return (
|2156|2156| 								ent != oldTarget
|2157|2157| 								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2158|    |-								|| (type.specific == oldType.specific
|2159|    |-								&& (type.specific != "meat" || oldTemplate == template)))
|    |2158|+								|| (type.specific == oldType.specific &&
|    |2159|+								(type.specific != "meat" || oldTemplate == template)))
|2160|2160| 							);
|2161|2161| 						});
|2162|2162| 						if (nearby)
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2200|2200| 					// Also don't switch to a different type of huntable animal
|2201|2201| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2202|2202| 						return (
|2203|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2204|    |-							|| (type.specific == resourceType.specific
|    |2203|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2204|+							(type.specific == resourceType.specific
|2205|2205| 							&& (type.specific != "meat" || resourceTemplate == template))
|2206|2206| 						);
|2207|2207| 					});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2201|2201| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2202|2202| 						return (
|2203|2203| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2204|    |-							|| (type.specific == resourceType.specific
|2205|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2204|+							|| (type.specific == resourceType.specific &&
|    |2205|+							(type.specific != "meat" || resourceTemplate == template))
|2206|2206| 						);
|2207|2207| 					});
|2208|2208| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2317|2317| 
|2318|2318| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2319|2319| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2320|    |-					{
|    |2320|+					
|2321|2321| 						// Check we can still reach and gather from the target
|2322|2322| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2323|2323| 						{
|2383|2383| 								return;
|2384|2384| 							}
|2385|2385| 						}
|2386|    |-					}
|    |2386|+					
|2387|2387| 
|2388|2388| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2389|2389| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2409|2409| 					// Also don't switch to a different type of huntable animal
|2410|2410| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2411|2411| 						return (
|2412|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2413|    |-							|| (type.specific == resourceType.specific
|    |2412|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2413|+							(type.specific == resourceType.specific
|2414|2414| 							&& (type.specific != "meat" || resourceTemplate == template))
|2415|2415| 						);
|2416|2416| 					});
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2410|2410| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2411|2411| 						return (
|2412|2412| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2413|    |-							|| (type.specific == resourceType.specific
|2414|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2413|+							|| (type.specific == resourceType.specific &&
|    |2414|+							(type.specific != "meat" || resourceTemplate == template))
|2415|2415| 						);
|2416|2416| 					});
|2417|2417| 					if (nearby)
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2497|2497| 					this.StartTimer(prepare, this.healTimers.repeat);
|2498|2498| 
|2499|2499| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2500|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2500|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2501|2501| 
|2502|2502| 					this.FaceTowardsTarget(this.order.data.target);
|2503|2503| 				},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2712|2712| 					{
|2713|2713| 						// The building was already finished/fully repaired before we arrived;
|2714|2714| 						// let the ConstructionFinished handler handle this.
|2715|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2715|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2716|2716| 						return true;
|2717|2717| 					}
|2718|2718| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2712|2712| 					{
|2713|2713| 						// The building was already finished/fully repaired before we arrived;
|2714|2714| 						// let the ConstructionFinished handler handle this.
|2715|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2715|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2716|2716| 						return true;
|2717|2717| 					}
|2718|2718| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2752|2752| 					if (this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2753|2753| 						this.SetNextState("APPROACHING");
|2754|2754| 					else if (!this.CheckTargetRange(this.repairTarget, IID_Builder))
|2755|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2755|+						this.FinishOrder(); // can't approach and isn't in reach
|2756|2756| 				},
|2757|2757| 			},
|2758|2758| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2839|2839| 
|2840|2840| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2841|2841| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2842|    |-				{
|    |2842|+				
|2843|2843| 					// We're already walking to the given point, so add this as a order.
|2844|2844| 					this.WalkToTarget(msg.data.newentity, true);
|2845|    |-				}
|    |2845|+				
|2846|2846| 			},
|2847|2847| 		},
|2848|2848| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2892|2892| 
|2893|2893| 					// Check that we can garrison here
|2894|2894| 					if (this.CanGarrison(target))
|2895|    |-					{
|    |2895|+					
|2896|2896| 						// Check that we're in range of the garrison target
|2897|2897| 						if (this.CheckGarrisonRange(target))
|2898|2898| 						{
|2968|2968| 								return false;
|2969|2969| 							}
|2970|2970| 						}
|2971|    |-					}
|    |2971|+					
|2972|2972| 					// Garrisoning failed for some reason, so finish the order
|2973|2973| 					this.FinishOrder();
|2974|2974| 					return true;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3075|3075| 		"Attacked": function(msg) {
|3076|3076| 			if (this.template.NaturalBehaviour == "skittish" ||
|3077|3077| 			    this.template.NaturalBehaviour == "passive")
|3078|    |-			{
|    |3078|+			
|3079|3079| 				this.Flee(msg.data.attacker, false);
|3080|    |-			}
|    |3080|+			
|3081|3081| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3082|3082| 			{
|3083|3083| 				if (this.CanAttack(msg.data.attacker))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3084|3084| 					this.Attack(msg.data.attacker, false);
|3085|3085| 			}
|3086|3086| 			else if (this.template.NaturalBehaviour == "domestic")
|3087|    |-			{
|    |3087|+			
|3088|3088| 				// Never flee, stop what we were doing
|3089|3089| 				this.SetNextState("IDLE");
|3090|    |-			}
|    |3090|+			
|3091|3091| 		},
|3092|3092| 
|3093|3093| 		"Order.LeaveFoundation": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3094|3094| 			// Move a tile outside the building
|3095|3095| 			var range = 4;
|3096|3096| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|3097|    |-			{
|    |3097|+			
|3098|3098| 				// We've started walking to the given point
|3099|3099| 				this.SetNextState("WALKING");
|3100|    |-			}
|    |3100|+			
|3101|3101| 			else
|3102|3102| 			{
|3103|3103| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3099|3099| 				this.SetNextState("WALKING");
|3100|3100| 			}
|3101|3101| 			else
|3102|    |-			{
|    |3102|+			
|3103|3103| 				// We are already at the target, or can't move at all
|3104|3104| 				this.FinishOrder();
|3105|    |-			}
|    |3105|+			
|3106|3106| 		},
|3107|3107| 
|3108|3108| 		"IDLE": {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3141|3141| 				}
|3142|3142| 				// Start attacking one of the newly-seen enemy (if any)
|3143|3143| 				else if (this.IsDangerousAnimal())
|3144|    |-				{
|    |3144|+				
|3145|3145| 					this.AttackVisibleEntity(msg.data.added);
|3146|    |-				}
|    |3146|+				
|3147|3147| 
|3148|3148| 				// TODO: if two units enter our range together, we'll attack the
|3149|3149| 				// first and then the second won't trigger another LosRangeUpdate
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3184|3184| 				}
|3185|3185| 				// Start attacking one of the newly-seen enemy (if any)
|3186|3186| 				else if (this.template.NaturalBehaviour == "violent")
|3187|    |-				{
|    |3187|+				
|3188|3188| 					this.AttackVisibleEntity(msg.data.added);
|3189|    |-				}
|    |3189|+				
|3190|3190| 			},
|3191|3191| 
|3192|3192| 			"MoveCompleted": function() { },
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3201|3201| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3202|3202| 
|3203|3203| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3204|    |-							// only used for domestic animals
|    |3204|+		// only used for domestic animals
|3205|3205| 	},
|3206|3206| };
|3207|3207| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3258|3258| 
|3259|3259| UnitAI.prototype.IsAnimal = function()
|3260|3260| {
|3261|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3261|+	return (!!this.template.NaturalBehaviour);
|3262|3262| };
|3263|3263| 
|3264|3264| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3296|3296| UnitAI.prototype.GetGarrisonHolder = function()
|3297|3297| {
|3298|3298| 	if (this.IsGarrisoned())
|3299|    |-	{
|    |3299|+	
|3300|3300| 		for (let order of this.orderQueue)
|3301|3301| 			if (order.type == "Garrison")
|3302|3302| 				return order.data.target;
|3303|    |-	}
|    |3303|+	
|3304|3304| 	return INVALID_ENTITY;
|3305|3305| };
|3306|3306| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3374|3374| 		{
|3375|3375| 			let index = this.GetCurrentState().indexOf(".");
|3376|3376| 			if (index != -1)
|3377|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3377|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3378|3378| 			this.Stop(false);
|3379|3379| 		}
|3380|3380| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3430|3430| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3431|3431| 			continue;
|3432|3432| 		if (i == 0)
|3433|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3433|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3434|3434| 		else
|3435|3435| 			this.orderQueue.splice(i, 1);
|3436|3436| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3430|3430| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3431|3431| 			continue;
|3432|3432| 		if (i == 0)
|3433|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3433|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3434|3434| 		else
|3435|3435| 			this.orderQueue.splice(i, 1);
|3436|3436| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3514|3514| };
|3515|3515| 
|3516|3516| 
|3517|    |-//// FSM linkage functions ////
|    |3517|+// // FSM linkage functions ////
|3518|3518| 
|3519|3519| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3520|3520| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3686|3686| 				continue;
|3687|3687| 			if (this.orderQueue[i].type == type)
|3688|3688| 				continue;
|3689|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3689|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3690|3690| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3691|3691| 			return;
|3692|3692| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3686|3686| 				continue;
|3687|3687| 			if (this.orderQueue[i].type == type)
|3688|3688| 				continue;
|3689|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3689|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3690|3690| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3691|3691| 			return;
|3692|3692| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3700|3700| {
|3701|3701| 	// Remember the previous work orders to be able to go back to them later if required
|3702|3702| 	if (data && data.force)
|3703|    |-	{
|    |3703|+	
|3704|3704| 		if (this.IsFormationController())
|3705|3705| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3706|3706| 		else
|3707|3707| 			this.UpdateWorkOrders(type);
|3708|    |-	}
|    |3708|+	
|3709|3709| 
|3710|3710| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3711|3711| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3777|3777| 	{
|3778|3778| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3779|3779| 		if (cmpUnitAI)
|3780|    |-		{
|    |3780|+		
|3781|3781| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3782|3782| 			{
|3783|3783| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3786|3786| 					return;
|3787|3787| 				}
|3788|3788| 			}
|3789|    |-		}
|    |3789|+		
|3790|3790| 	}
|3791|3791| 
|3792|3792| 	// If nothing found, take the unit orders
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3779|3779| 		if (cmpUnitAI)
|3780|3780| 		{
|3781|3781| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3782|    |-			{
|    |3782|+			
|3783|3783| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3784|3784| 				{
|3785|3785| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3786|3786| 					return;
|3787|3787| 				}
|3788|    |-			}
|    |3788|+			
|3789|3789| 		}
|3790|3790| 	}
|3791|3791| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3791|3791| 
|3792|3792| 	// If nothing found, take the unit orders
|3793|3793| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3794|    |-	{
|    |3794|+	
|3795|3795| 		if (isWorkType(this.orderQueue[i].type))
|3796|3796| 		{
|3797|3797| 			this.workOrders = this.orderQueue.slice(i);
|3798|3798| 			return;
|3799|3799| 		}
|3800|    |-	}
|    |3800|+	
|3801|3801| };
|3802|3802| 
|3803|3803| UnitAI.prototype.BackToWork = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3857|3857| 	if (data.timerRepeat === undefined)
|3858|3858| 		this.timer = undefined;
|3859|3859| 
|3860|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3860|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3861|3861| };
|3862|3862| 
|3863|3863| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3857|3857| 	if (data.timerRepeat === undefined)
|3858|3858| 		this.timer = undefined;
|3859|3859| 
|3860|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3860|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3861|3861| };
|3862|3862| 
|3863|3863| /**
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3892|3892| 	this.timer = undefined;
|3893|3893| };
|3894|3894| 
|3895|    |-//// Message handlers /////
|    |3895|+// // Message handlers /////
|3896|3896| 
|3897|3897| UnitAI.prototype.OnMotionChanged = function(msg)
|3898|3898| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3897|3897| UnitAI.prototype.OnMotionChanged = function(msg)
|3898|3898| {
|3899|3899| 	if (msg.starting && !msg.error)
|3900|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3900|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveStarted", "data": msg});
|3901|3901| 	else if (!msg.starting || msg.error)
|3902|3902| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3903|3903| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3897|3897| UnitAI.prototype.OnMotionChanged = function(msg)
|3898|3898| {
|3899|3899| 	if (msg.starting && !msg.error)
|3900|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3900|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg });
|3901|3901| 	else if (!msg.starting || msg.error)
|3902|3902| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3903|3903| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3899|3899| 	if (msg.starting && !msg.error)
|3900|3900| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3901|3901| 	else if (!msg.starting || msg.error)
|3902|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3902|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveCompleted", "data": msg});
|3903|3903| };
|3904|3904| 
|3905|3905| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3899|3899| 	if (msg.starting && !msg.error)
|3900|3900| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3901|3901| 	else if (!msg.starting || msg.error)
|3902|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3902|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg });
|3903|3903| };
|3904|3904| 
|3905|3905| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3907|3907| 	// TODO: This is a bit inefficient since every unit listens to every
|3908|3908| 	// construction message - ideally we could scope it to only the one we're building
|3909|3909| 
|3910|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3910|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3911|3911| };
|3912|3912| 
|3913|3913| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3907|3907| 	// TODO: This is a bit inefficient since every unit listens to every
|3908|3908| 	// construction message - ideally we could scope it to only the one we're building
|3909|3909| 
|3910|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3910|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3911|3911| };
|3912|3912| 
|3913|3913| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3932|3932| 
|3933|3933| UnitAI.prototype.OnAttacked = function(msg)
|3934|3934| {
|3935|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3935|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3936|3936| };
|3937|3937| 
|3938|3938| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3932|3932| 
|3933|3933| UnitAI.prototype.OnAttacked = function(msg)
|3934|3934| {
|3935|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3935|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3936|3936| };
|3937|3937| 
|3938|3938| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3937|3937| 
|3938|3938| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3939|3939| {
|3940|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3940|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3941|3941| };
|3942|3942| 
|3943|3943| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3937|3937| 
|3938|3938| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3939|3939| {
|3940|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3940|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3941|3941| };
|3942|3942| 
|3943|3943| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3942|3942| 
|3943|3943| UnitAI.prototype.OnHealthChanged = function(msg)
|3944|3944| {
|3945|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3945|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3946|3946| };
|3947|3947| 
|3948|3948| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3942|3942| 
|3943|3943| UnitAI.prototype.OnHealthChanged = function(msg)
|3944|3944| {
|3945|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3945|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3946|3946| };
|3947|3947| 
|3948|3948| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3948|3948| UnitAI.prototype.OnRangeUpdate = function(msg)
|3949|3949| {
|3950|3950| 	if (msg.tag == this.losRangeQuery)
|3951|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3951|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3952|3952| 	else if (msg.tag == this.losHealRangeQuery)
|3953|3953| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3954|3954| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3948|3948| UnitAI.prototype.OnRangeUpdate = function(msg)
|3949|3949| {
|3950|3950| 	if (msg.tag == this.losRangeQuery)
|3951|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3951|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3952|3952| 	else if (msg.tag == this.losHealRangeQuery)
|3953|3953| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3954|3954| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3950|3950| 	if (msg.tag == this.losRangeQuery)
|3951|3951| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3952|3952| 	else if (msg.tag == this.losHealRangeQuery)
|3953|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3953|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3954|3954| };
|3955|3955| 
|3956|3956| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3950|3950| 	if (msg.tag == this.losRangeQuery)
|3951|3951| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3952|3952| 	else if (msg.tag == this.losHealRangeQuery)
|3953|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3953|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3954|3954| };
|3955|3955| 
|3956|3956| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3955|3955| 
|3956|3956| UnitAI.prototype.OnPackFinished = function(msg)
|3957|3957| {
|3958|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3958|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3959|3959| };
|3960|3960| 
|3961|3961| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3955|3955| 
|3956|3956| UnitAI.prototype.OnPackFinished = function(msg)
|3957|3957| {
|3958|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3958|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3959|3959| };
|3960|3960| 
|3961|3961| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3958|3958| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3959|3959| };
|3960|3960| 
|3961|    |-//// Helper functions to be called by the FSM ////
|    |3961|+// // Helper functions to be called by the FSM ////
|3962|3962| 
|3963|3963| UnitAI.prototype.GetWalkSpeed = function()
|3964|3964| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4060|4060| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4061|4061| 		return undefined;
|4062|4062| 
|4063|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4063|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4064|4064| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4065|4065| 		return undefined;
|4066|4066| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4145|4145| 			PlaySound(name, member);
|4146|4146| 	}
|4147|4147| 	else
|4148|    |-	{
|    |4148|+	
|4149|4149| 		// Otherwise use our own sounds
|4150|4150| 		PlaySound(name, this.entity);
|4151|    |-	}
|    |4151|+	
|4152|4152| };
|4153|4153| 
|4154|4154| /*
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4314|4314| 	else
|4315|4315| 		// return false? Or hope you come close enough?
|4316|4316| 		var parabolicMaxRange = 0;
|4317|    |-		//return false;
|    |4317|+		// return false;
|4318|4318| 
|4319|4319| 	// the parabole changes while walking, take something in the middle
|4320|4320| 	var guessedMaxRange = (range.max + parabolicMaxRange)/2;
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4379|4379| 	if (this.IsFormationMember())
|4380|4380| 	{
|4381|4381| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4382|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4383|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4382|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4383|+			cmpFormationUnitAI.order.data.target == target)
|4384|4384| 			return true;
|4385|4385| 	}
|4386|4386| 
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4547|4547| UnitAI.prototype.AttackEntityInZone = function(ents)
|4548|4548| {
|4549|4549| 	var target = ents.find(target =>
|4550|    |-		this.CanAttack(target)
|4551|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4550|+		this.CanAttack(target) &&
|    |4551|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4552|4552| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4553|4553| 	);
|4554|4554| 	if (!target)
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4548|4548| {
|4549|4549| 	var target = ents.find(target =>
|4550|4550| 		this.CanAttack(target)
|4551|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4552|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4551|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4552|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4553|4553| 	);
|4554|4554| 	if (!target)
|4555|4555| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4612|4612| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4613|4613| 	if (this.isGuardOf)
|4614|4614| 	{
|4615|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4615|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4616|4616| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4617|4617| 		if (cmpUnitAI && cmpAttack &&
|4618|4618| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4616|4616| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4617|4617| 		if (cmpUnitAI && cmpAttack &&
|4618|4618| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4619|    |-				return false;
|    |4619|+			return false;
|4620|4620| 	}
|4621|4621| 
|4622|4622| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4621|4621| 
|4622|4622| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4623|4623| 	if (this.GetStance().respondHoldGround)
|4624|    |-	{
|    |4624|+	
|4625|4625| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4626|4626| 			return true;
|4627|    |-	}
|    |4627|+	
|4628|4628| 
|4629|4629| 	// Stop if it's left our vision range, unless we're especially persistent
|4630|4630| 	if (!this.GetStance().respondChaseBeyondVision)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4628|4628| 
|4629|4629| 	// Stop if it's left our vision range, unless we're especially persistent
|4630|4630| 	if (!this.GetStance().respondChaseBeyondVision)
|4631|    |-	{
|    |4631|+	
|4632|4632| 		if (!this.CheckTargetIsInVisionRange(target))
|4633|4633| 			return true;
|4634|    |-	}
|    |4634|+	
|4635|4635| 
|4636|4636| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4637|4637| 	// and will continue moving to its last seen position and then stop)
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4654|4654| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4655|4655| 	if (this.isGuardOf)
|4656|4656| 	{
|4657|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4657|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4658|4658| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4659|4659| 		if (cmpUnitAI && cmpAttack &&
|4660|4660| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4667|4667| 	return false;
|4668|4668| };
|4669|4669| 
|4670|    |-//// External interface functions ////
|    |4670|+// // External interface functions ////
|4671|4671| 
|4672|4672| UnitAI.prototype.SetFormationController = function(ent)
|4673|4673| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4677|4677| 	// of our own formation (or ourself if not in formation)
|4678|4678| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4679|4679| 	if (cmpObstruction)
|4680|    |-	{
|    |4680|+	
|4681|4681| 		if (ent == INVALID_ENTITY)
|4682|4682| 			cmpObstruction.SetControlGroup(this.entity);
|4683|4683| 		else
|4684|4684| 			cmpObstruction.SetControlGroup(ent);
|4685|    |-	}
|    |4685|+	
|4686|4686| 
|4687|4687| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4688|4688| 	if (ent == INVALID_ENTITY)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4820|4820| 	// if we already had an old guard order, do nothing if the target is the same
|4821|4821| 	// and the order is running, otherwise remove the previous order
|4822|4822| 	if (this.isGuardOf)
|4823|    |-	{
|    |4823|+	
|4824|4824| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4825|4825| 			return;
|4826|4826| 		else
|4827|4827| 			this.RemoveGuard();
|4828|    |-	}
|    |4828|+	
|4829|4829| 
|4830|4830| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4831|4831| };
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4823|4823| 	{
|4824|4824| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4825|4825| 			return;
|4826|    |-		else
|4827|    |-			this.RemoveGuard();
|    |4826|+		this.RemoveGuard();
|4828|4827| 	}
|4829|4828| 
|4830|4829| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4994|4994| 			this.WalkToTarget(target, queued);
|4995|4995| 		return;
|4996|4996| 	}
|4997|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |4997|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|4998|4998| };
|4999|4999| 
|5000|5000| /**
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5143|5143| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5144|5144| 	{
|5145|5145| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5146|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5146|+		if (cmpTrader.HasBothMarkets() &&
|5147|5147| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5148|5148| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5149|5149| 		{
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5424|5424| 				{
|5425|5425| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5426|5426| 					var targetClasses = this.order.data.targetClasses;
|5427|    |-					if (targetClasses.attack && cmpIdentity
|5428|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5427|+					if (targetClasses.attack && cmpIdentity &&
|    |5428|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5429|5429| 						continue;
|5430|5430| 					if (targetClasses.avoid && cmpIdentity
|5431|5431| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5427|5427| 					if (targetClasses.attack && cmpIdentity
|5428|5428| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5429|5429| 						continue;
|5430|    |-					if (targetClasses.avoid && cmpIdentity
|5431|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5430|+					if (targetClasses.avoid && cmpIdentity &&
|    |5431|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5432|5432| 						continue;
|5433|5433| 					// Only used by the AIs to prevent some choices of targets
|5434|5434| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5450|5450| 		{
|5451|5451| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5452|5452| 			var targetClasses = this.order.data.targetClasses;
|5453|    |-			if (cmpIdentity && targetClasses.attack
|5454|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5453|+			if (cmpIdentity && targetClasses.attack &&
|    |5454|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5455|5455| 				continue;
|5456|5456| 			if (cmpIdentity && targetClasses.avoid
|5457|5457| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5453|5453| 			if (cmpIdentity && targetClasses.attack
|5454|5454| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5455|5455| 				continue;
|5456|    |-			if (cmpIdentity && targetClasses.avoid
|5457|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5456|+			if (cmpIdentity && targetClasses.avoid &&
|    |5457|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5458|5458| 				continue;
|5459|5459| 			// Only used by the AIs to prevent some choices of targets
|5460|5460| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5598|5598| 
|5599|5599| UnitAI.prototype.SetHeldPosition = function(x, z)
|5600|5600| {
|5601|    |-	this.heldPosition = {"x": x, "z": z};
|    |5601|+	this.heldPosition = { "x": x, "z": z};
|5602|5602| };
|5603|5603| 
|5604|5604| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5598|5598| 
|5599|5599| UnitAI.prototype.SetHeldPosition = function(x, z)
|5600|5600| {
|5601|    |-	this.heldPosition = {"x": x, "z": z};
|    |5601|+	this.heldPosition = {"x": x, "z": z };
|5602|5602| };
|5603|5603| 
|5604|5604| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5625|5625| 	return false;
|5626|5626| };
|5627|5627| 
|5628|    |-//// Helper functions ////
|    |5628|+// // Helper functions ////
|5629|5629| 
|5630|5630| UnitAI.prototype.CanAttack = function(target)
|5631|5631| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5829|5829| 	return cmpPack && cmpPack.IsPacking();
|5830|5830| };
|5831|5831| 
|5832|    |-//// Formation specific functions ////
|    |5832|+// // Formation specific functions ////
|5833|5833| 
|5834|5834| UnitAI.prototype.IsAttackingAsFormation = function()
|5835|5835| {
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5834|5834| UnitAI.prototype.IsAttackingAsFormation = function()
|5835|5835| {
|5836|5836| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5837|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5838|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5837|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5838|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5839|5839| };
|5840|5840| 
|5841|5841| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5838|5838| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5839|5839| };
|5840|5840| 
|5841|    |-//// Animal specific functions ////
|    |5841|+// // Animal specific functions ////
|5842|5842| 
|5843|5843| UnitAI.prototype.MoveRandomly = function(distance)
|5844|5844| {

binaries/data/mods/public/simulation/components/UnitAI.js
|2399| »   »   »   »   »   »   let·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'nearby' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|3762| »   var·isWorkType·=·type·=>·type·==·"Gather"·||·type·==·"Trade"·||·type·==·"Repair"·||·type·==·"ReturnResource";
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'type' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4534| »   var·target·=·ents.find(target·=>·this.CanAttack(target));
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'target' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4549| »   var·target·=·ents.find(target·=>
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'target' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4595| »   var·ent·=·ents.find(ent·=>·this.CanHeal(ent));
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4618| »   »   ····cmpAttack.GetAttackTypes().some(type·=>·cmpUnitAI.CheckTargetAttackRange(this.isGuardOf,·type)))
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'type' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|5074| »   var·lastPos·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'lastPos' to undefined.

binaries/data/mods/public/simulation/components/UnitAI.js
| 365| »   »   ····&&·(this.lastShorelinePosition.z·==·cmpPosition.GetPosition().z))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|1878| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2019| »   »   »   »   »   »   &&·this.order.data.target·!=·msg.data.attacker·&&·this.GetBestAttackAgainst(msg.data.attacker,·true)·!=·"Capture")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2092| »   »   »   »   »   »   »   »   ·&&·((type.generic·==·"treasure"·&&·oldType.generic·==·"treasure")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2093| »   »   »   »   »   »   »   »   ·||·(type.specific·==·oldType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2094| »   »   »   »   »   »   »   »   ·&&·(type.specific·!=·"meat"·||·oldTemplate·==·template)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2117| »   »   »   »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(oldType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2157| »   »   »   »   »   »   »   »   &&·((type.generic·==·"treasure"·&&·oldType.generic·==·"treasure")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2158| »   »   »   »   »   »   »   »   ||·(type.specific·==·oldType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2159| »   »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·oldTemplate·==·template)))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2204| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2205| »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·resourceTemplate·==·template))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2221| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2394| »   »   »   »   »   var·cmpResourceGatherer·=·Engine.QueryInterface(this.entity,·IID_ResourceGatherer);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceGatherer' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2410| »   »   »   »   »   var·nearby·=·this.FindNearbyResource(function(ent,·type,·template)·{
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2413| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '||'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2414| »   »   »   »   »   »   »   &&·(type.specific·!=·"meat"·||·resourceTemplate·==·template))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|2434| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2623| »   »   »   »   »   var·cmpResourceGatherer·=·Engine.QueryInterface(this.entity,·IID_ResourceGatherer);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceGatherer' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2818| »   »   »   »   »   var·cmpResourceDropsite·=·Engine.QueryInterface(msg.data.newentity,·IID_ResourceDropsite);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceDropsite' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2894| »   »   »   »   »   if·(this.CanGarrison(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2897| »   »   »   »   »   »   if·(this.CheckGarrisonRange(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2899| »   »   »   »   »   »   »   var·cmpGarrisonHolder·=·Engine.QueryInterface(target,·IID_GarrisonHolder);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2921| »   »   »   »   »   »   »   »   var·cmpResourceDropsite·=·Engine.QueryInterface(target,·IID_ResourceDropsite);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2922| »   »   »   »   »   »   »   »   if·(cmpResourceDropsite·&&·this.CanReturnResource(target,·true))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2937| »   »   »   »   »   »   »   »   »   var·cmpHolderPosition·=·Engine.QueryInterface(target,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2938| »   »   »   »   »   »   »   »   »   var·cmpHolderUnitAI·=·Engine.QueryInterface(target,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2965| »   »   »   »   »   »   »   if·(this.MoveToTarget(target))
|    | [NORMAL] JSHintBear:
|    | 'target' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|3724| »   »   var·order·=·{·"type":·type,·"data":·data·};
|    | [NORMAL] JSHintBear:
|    | 'order' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|3793| »   for·(var·i·=·0;·i·<·this.orderQueue.length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|4063| »   let·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/components/UnitAI.js
|4316| »   »   var·parabolicMaxRange·=·0;
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|4320| »   var·guessedMaxRange·=·(range.max·+·parabolicMaxRange)/2;
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4327| »   return·cmpUnitMotion.MoveToTargetRange(target,·range.min,·Math.min(range.max,·parabolicMaxRange));
|    | [NORMAL] JSHintBear:
|    | 'parabolicMaxRange' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|4383| »   »   »   &&·cmpFormationUnitAI.order.data.target·==·target)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|4551| »   »   &&·this.CheckTargetDistanceFromHeldPosition(target,·IID_Attack,·this.GetBestAttackAgainst(target,·true))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|4552| »   »   &&·(this.GetStance().respondChaseBeyondVision·||·this.CheckTargetIsInVisionRange(target))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5074| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

binaries/data/mods/public/simulation/components/UnitAI.js
|5428| »   »   »   »   »   »   &&·!MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.attack))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5431| »   »   »   »   »   »   &&·MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.avoid))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5444| »   var·targets·=·this.GetTargetsFromUnit();
|    | [NORMAL] JSHintBear:
|    | 'targets' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5445| »   for·(var·targ·of·targets)
|    | [NORMAL] JSHintBear:
|    | 'targ' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5451| »   »   »   var·cmpIdentity·=·Engine.QueryInterface(targ,·IID_Identity);
|    | [NORMAL] JSHintBear:
|    | 'cmpIdentity' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5452| »   »   »   var·targetClasses·=·this.order.data.targetClasses;
|    | [NORMAL] JSHintBear:
|    | 'targetClasses' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5454| »   »   »   »   &&·!MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.attack))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5457| »   »   »   »   &&·MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.avoid))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5532| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [NORMAL] JSHintBear:
|    | 'cmpVision' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5535| »   »   var·range·=·cmpVision.GetRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5540| »   »   var·cmpRanged·=·Engine.QueryInterface(this.entity,·iid);
|    | [NORMAL] JSHintBear:
|    | 'cmpRanged' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5543| »   »   var·range·=·iid·!==·IID_Attack·?·cmpRanged.GetRange()·:·cmpRanged.GetFullAttackRange();
|    | [NORMAL] JSHintBear:
|    | 'range' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|5543| »   »   var·range·=·iid·!==·IID_Attack·?·cmpRanged.GetRange()·:·cmpRanged.GetFullAttackRange();
|    | [MAJOR] JSHintBear:
|    | Too many errors. (92% scanned).
Executing section cli...

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

Stan added inline comments.Apr 13 2019, 4:15 PM
binaries/data/mods/public/simulation/templates/template_formation.xml
60 ↗(On Diff #7178)

Sur but I mean the comments could go in the wiki or a tutorial :)

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

Linter detected issues:
Executing section Source...

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

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

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

source/tools/atlas/GameInterface/ActorViewer.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"

source/tools/atlas/GameInterface/ActorViewer.cpp
| 213| »   void·UpdatePropListRecursive(CModelAbstract*·model);
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Invalid number of character '{' when these macros are defined: 'MESSAGESSETUP_NOTFIRST'.
Executing section JS...
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClass' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|   8|   8| let height = 5;
|   9|   9| 
|  10|  10| AddMock(SYSTEM_ENTITY, IID_Pathfinder, {
|  11|    |-	GetPassabilityClass: (name) => 1 << 8
|    |  11|+	"GetPassabilityClass": (name) => 1 << 8
|  12|  12| });
|  13|  13| 
|  14|  14| let cmpUnitMotionFlying = ConstructComponent(entity, "UnitMotionFlying", {

binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|  45| »   "SetHeightFixed":·(y)·=>·height·=·y,
|    | [NORMAL] ESLintBear (no-return-assign):
|    | Arrow function should not return assignment.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|  74|  74| 	var newangle = angle;
|  75|  75| 	var canTurn = true;
|  76|  76| 	if (this.landing)
|  77|    |-	{
|    |  77|+	
|  78|  78| 		if (this.speed > 0 && this.onGround)
|  79|  79| 		{
|  80|  80| 			if (pos.y <= cmpWaterManager.GetWaterLevel(pos.x, pos.z) && this.template.DiesInWater == "true")
| 153| 153| 					this.waterDeath = true;
| 154| 154| 			}
| 155| 155| 		}
| 156|    |-	}
|    | 156|+	
| 157| 157| 	else
| 158| 158| 	{
| 159| 159| 		// If we haven't reached max speed yet then we're still on the ground;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|  93|  93| 				pos.y = Math.max(ground, pos.y - turnLength * this.template.ClimbRate);
|  94|  94| 		}
|  95|  95| 		else if (this.speed == 0 && this.onGround)
|  96|    |-		{
|    |  96|+		
|  97|  97| 			if (this.waterDeath && cmpHealth)
|  98|  98| 				cmpHealth.Kill();
|  99|  99| 			else
| 128| 128| 					newangle += Math.PI;
| 129| 129| 				}
| 130| 130| 			}
| 131|    |-		}
|    | 131|+		
| 132| 132| 		else
| 133| 133| 		{
| 134| 134| 			// Final Approach
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 101| 101| 				this.pitch = 0;
| 102| 102| 				// We've stopped.
| 103| 103| 				if (cmpGarrisonHolder)
| 104|    |-					cmpGarrisonHolder.AllowGarrisoning(true,"UnitMotionFlying");
|    | 104|+					cmpGarrisonHolder.AllowGarrisoning(true, "UnitMotionFlying");
| 105| 105| 				canTurn = false;
| 106| 106| 				this.hasTarget = false;
| 107| 107| 				this.landing = false;
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unexpected space after unary operator '-'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 138| 138| 			var targetHeight = ground;
| 139| 139| 			// Steep, then gradual descent.
| 140| 140| 			if ((pos.y - targetHeight) / this.template.FlyingHeight > 1 / SHORT_FINAL)
| 141|    |-				this.pitch = - Math.PI / 18;
|    | 141|+				this.pitch = -Math.PI / 18;
| 142| 142| 			else
| 143| 143| 				this.pitch = Math.PI / 18;
| 144| 144| 			var descentRate = ((pos.y - targetHeight) / this.template.FlyingHeight * this.template.ClimbRate + SHORT_FINAL) * SHORT_FINAL;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 155| 155| 		}
| 156| 156| 	}
| 157| 157| 	else
| 158|    |-	{
|    | 158|+	
| 159| 159| 		// If we haven't reached max speed yet then we're still on the ground;
| 160| 160| 		// otherwise we're taking off or flying
| 161| 161| 		// this.onGround in case of a go-around after landing (but not fully stopped)
| 195| 195| 				this.pitch = -1 * this.pitch;
| 196| 196| 			}
| 197| 197| 		}
| 198|    |-	}
|    | 198|+	
| 199| 199| 
| 200| 200| 	// If we're in range of the target then tell people that we've reached it
| 201| 201| 	// (TODO: quantisation breaks this)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 163| 163| 		if (this.speed < this.template.TakeoffSpeed && this.onGround)
| 164| 164| 		{
| 165| 165| 			if (cmpGarrisonHolder)
| 166|    |-				cmpGarrisonHolder.AllowGarrisoning(false,"UnitMotionFlying");
|    | 166|+				cmpGarrisonHolder.AllowGarrisoning(false, "UnitMotionFlying");
| 167| 167| 			this.pitch = 0;
| 168| 168| 			// Accelerate forwards
| 169| 169| 			this.speed = Math.min(this.template.MaxSpeed, this.speed + turnLength * this.template.AccelRate);
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unexpected space after unary operator '-'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 230| 230| 		if (newangle - angle > Math.PI / 18)
| 231| 231| 			this.roll = Math.PI / 9;
| 232| 232| 		else if (newangle - angle < -Math.PI / 18)
| 233|    |-			this.roll = - Math.PI / 9;
|    | 233|+			this.roll = -Math.PI / 9;
| 234| 234| 		else
| 235| 235| 			this.roll = newangle - angle;
| 236| 236| 	}
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 322| 322| UnitMotionFlying.prototype.GetSpeedRatio = function()
| 323| 323| {
| 324| 324| 	return this.GetCurrentSpeed() / this.GetWalkSpeed();
| 325|    |-}
|    | 325|+};
| 326| 326| 
| 327| 327| UnitMotionFlying.prototype.GetPassabilityClassName = function()
| 328| 328| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 346| 346| 
| 347| 347| UnitMotionFlying.prototype.StopMoving = function()
| 348| 348| {
| 349|    |-	//Invert
|    | 349|+	// Invert
| 350| 350| 	if (!this.waterDeath)
| 351| 351| 		this.landing = !this.landing;
| 352| 352| 

binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 182| »   »   »   var·targetHeight·=·ground·+·(+this.template.FlyingHeight);
|    | [NORMAL] JSHintBear:
|    | 'targetHeight' is already defined.

binaries/data/mods/public/simulation/components/UnitMotionFlying.js
| 325| }
|    | [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/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/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| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 226| 226| 		{
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229|    |-					"name": aura.auraName,
|    | 229|+				"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 227| 227| 			let aura = auraTemplates[auraID];
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230|    |-					"description": aura.auraDescription || null,
|    | 230|+				"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 228| 228| 			ret.auras[auraID] = {
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231|    |-					"radius": aura.radius || null
|    | 231|+				"radius": aura.radius || null
| 232| 232| 				};
| 233| 233| 		}
| 234| 234| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/globalscripts/Templates.js
| 229| 229| 					"name": aura.auraName,
| 230| 230| 					"description": aura.auraDescription || null,
| 231| 231| 					"radius": aura.radius || null
| 232|    |-				};
|    | 232|+			};
| 233| 233| 		}
| 234| 234| 	}
| 235| 235| 

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 (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  34|  34| 
|  35|  35| 
|  36|  36| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  37|    |-		SetInterval: function() { },
|    |  37|+		"SetInterval": function() { },
|  38|  38| 		SetTimeout: function() { },
|  39|  39| 	});
|  40|  40| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  35|  35| 
|  36|  36| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  37|  37| 		SetInterval: function() { },
|  38|    |-		SetTimeout: function() { },
|    |  38|+		"SetTimeout": function() { },
|  39|  39| 	});
|  40|  40| 
|  41|  41| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  39|  39| 	});
|  40|  40| 
|  41|  41| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|  42|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    |  42|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  42|  42| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|    |-		EnableActiveQuery: function(id) { },
|    |  45|+		"EnableActiveQuery": function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  46|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 			return 1;
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  46|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  44|  44| 		},
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|    |-		DisableActiveQuery: function(id) { },
|    |  47|+		"DisableActiveQuery": function(id) { },
|  48|  48| 		GetEntityFlagMask: function(identifier) { },
|  49|  49| 	});
|  50|  50| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  45|  45| 		EnableActiveQuery: function(id) { },
|  46|  46| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  47|  47| 		DisableActiveQuery: function(id) { },
|  48|    |-		GetEntityFlagMask: function(identifier) { },
|    |  48|+		"GetEntityFlagMask": function(identifier) { },
|  49|  49| 	});
|  50|  50| 
|  51|  51| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  49|  49| 	});
|  50|  50| 
|  51|  51| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  52|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    |  52|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
|  53|  53| 	});
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  53|  53| 	});
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  56|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    |  56|+		"GetPlayerByID": function(id) { return playerEntity; },
|  57|  57| 		GetNumPlayers: function() { return 2; },
|  58|  58| 	});
|  59|  59| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  54|  54| 
|  55|  55| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  56|  56| 		GetPlayerByID: function(id) { return playerEntity; },
|  57|    |-		GetNumPlayers: function() { return 2; },
|    |  57|+		"GetNumPlayers": function() { return 2; },
|  58|  58| 	});
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  58|  58| 	});
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|    |-		IsAlly: function() { return false; },
|    |  61|+		"IsAlly": function() { return false; },
|  62|  62| 		IsEnemy: function() { return true; },
|  63|  63| 		GetEnemies: function() { return []; },
|  64|  64| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  59|  59| 
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|  61| 		IsAlly: function() { return false; },
|  62|    |-		IsEnemy: function() { return true; },
|    |  62|+		"IsEnemy": function() { return true; },
|  63|  63| 		GetEnemies: function() { return []; },
|  64|  64| 	});
|  65|  65| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  60|  60| 	AddMock(playerEntity, IID_Player, {
|  61|  61| 		IsAlly: function() { return false; },
|  62|  62| 		IsEnemy: function() { return true; },
|  63|    |-		GetEnemies: function() { return []; },
|    |  63|+		"GetEnemies": function() { return []; },
|  64|  64| 	});
|  65|  65| 
|  66|  66| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  67|  67| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
|  68|  68| 
|  69|  69| 	AddMock(unit, IID_Identity, {
|  70|    |-		GetClassesList: function() { return []; },
|    |  70|+		"GetClassesList": function() { return []; },
|  71|  71| 	});
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  71|  71| 	});
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Ownership, {
|  74|    |-		GetOwner: function() { return 1; },
|    |  74|+		"GetOwner": function() { return 1; },
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    |  78|+		"GetTurretParent": function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|    |-		GetPosition: function() { return new Vector3D(); },
|    |  79|+		"GetPosition": function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  77|  77| 	AddMock(unit, IID_Position, {
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|    |-		GetPosition2D: function() { return new Vector2D(); },
|    |  80|+		"GetPosition2D": function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|  83|  83| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  78|  78| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|    |-		GetRotation: function() { return { "y": 0 }; },
|    |  81|+		"GetRotation": function() { return { "y": 0 }; },
|  82|  82| 		IsInWorld: function() { return true; },
|  83|  83| 	});
|  84|  84| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  79|  79| 		GetPosition: function() { return new Vector3D(); },
|  80|  80| 		GetPosition2D: function() { return new Vector2D(); },
|  81|  81| 		GetRotation: function() { return { "y": 0 }; },
|  82|    |-		IsInWorld: function() { return true; },
|    |  82|+		"IsInWorld": function() { return true; },
|  83|  83| 	});
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  83|  83| 	});
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|    |-		GetWalkSpeed: function() { return 1; },
|    |  86|+		"GetWalkSpeed": function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToFormationOffset' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  84|  84| 
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|    |-		MoveToFormationOffset: function(target, x, z) { },
|    |  87|+		"MoveToFormationOffset": function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  85|  85| 	AddMock(unit, IID_UnitMotion, {
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|    |-		IsInTargetRange: function(target, min, max) { return true; },
|    |  88|+		"IsInTargetRange": function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  86|  86| 		GetWalkSpeed: function() { return 1; },
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|    |-		MoveToTargetRange: function(target, min, max) { },
|    |  89|+		"MoveToTargetRange": function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|  92|  92| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  87|  87| 		MoveToFormationOffset: function(target, x, z) { },
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|    |-		StopMoving: function() { },
|    |  90|+		"StopMoving": function() { },
|  91|  91| 		GetPassabilityClassName: function() { return "default"; },
|  92|  92| 	});
|  93|  93| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  88|  88| 		IsInTargetRange: function(target, min, max) { return true; },
|  89|  89| 		MoveToTargetRange: function(target, min, max) { },
|  90|  90| 		StopMoving: function() { },
|  91|    |-		GetPassabilityClassName: function() { return "default"; },
|    |  91|+		"GetPassabilityClassName": function() { return "default"; },
|  92|  92| 	});
|  93|  93| 
|  94|  94| 	AddMock(unit, IID_Vision, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  92|  92| 	});
|  93|  93| 
|  94|  94| 	AddMock(unit, IID_Vision, {
|  95|    |-		GetRange: function() { return 10; },
|    |  95|+		"GetRange": function() { return 10; },
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    |  99|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    |  99|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 100|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 100|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  98|  98| 	AddMock(unit, IID_Attack, {
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 101|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  99|  99| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102|    |-		GetPreference: function(t) { return 0; },
|    | 102|+		"GetPreference": function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 100| 100| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 103|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 106| 106| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 101| 101| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104|    |-		CanAttack: function(v) { return true; },
|    | 104|+		"CanAttack": function(v) { return true; },
| 105| 105| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 106| 106| 	});
| 107| 107| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 102| 102| 		GetPreference: function(t) { return 0; },
| 103| 103| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 104| 104| 		CanAttack: function(v) { return true; },
| 105|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 105|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 106| 106| 	});
| 107| 107| 
| 108| 108| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 113| 113| 	if (mode == 1)
| 114| 114| 	{
| 115| 115| 		AddMock(enemy, IID_Health, {
| 116|    |-			GetHitpoints: function() { return 10; },
|    | 116|+			"GetHitpoints": function() { return 10; },
| 117| 117| 		});
| 118| 118| 		AddMock(enemy, IID_UnitAI, {
| 119| 119| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 116| 116| 			GetHitpoints: function() { return 10; },
| 117| 117| 		});
| 118| 118| 		AddMock(enemy, IID_UnitAI, {
| 119|    |-			IsAnimal: function() { return false; }
|    | 119|+			"IsAnimal": function() { return false; }
| 120| 120| 		});
| 121| 121| 	}
| 122| 122| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 121| 121| 	}
| 122| 122| 	else if (mode == 2)
| 123| 123| 		AddMock(enemy, IID_Health, {
| 124|    |-			GetHitpoints: function() { return 0; },
|    | 124|+			"GetHitpoints": function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127| 127| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 124| 124| 			GetHitpoints: function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 127|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 124| 124| 			GetHitpoints: function() { return 0; },
| 125| 125| 		});
| 126| 126| 
| 127|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 127|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
| 131|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 131|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 129| 129| 
| 130| 130| 	AddMock(controller, IID_Position, {
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 132|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 130| 130| 	AddMock(controller, IID_Position, {
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 133|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 131| 131| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 134|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
| 137| 137| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 132| 132| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 135|+		"GetRotation": function() { return { "y": 0 }; },
| 136| 136| 		IsInWorld: function() { return true; },
| 137| 137| 	});
| 138| 138| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 134| 134| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 135| 135| 		GetRotation: function() { return { "y": 0 }; },
| 136|    |-		IsInWorld: function() { return true; },
|    | 136|+		"IsInWorld": function() { return true; },
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140|    |-		GetWalkSpeed: function() { return 1; },
|    | 140|+		"GetWalkSpeed": function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetSpeedRatio' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 138| 138| 
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141|    |-		SetSpeedRatio: function(speed) { },
|    | 141|+		"SetSpeedRatio": function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
| 144| 144| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToPointRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 139| 139| 	AddMock(controller, IID_UnitMotion, {
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142|    |-		MoveToPointRange: function(x, z, minRange, maxRange) { },
|    | 142|+		"MoveToPointRange": function(x, z, minRange, maxRange) { },
| 143| 143| 		GetPassabilityClassName: function() { return "default"; },
| 144| 144| 	});
| 145| 145| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 140| 140| 		GetWalkSpeed: function() { return 1; },
| 141| 141| 		SetSpeedRatio: function(speed) { },
| 142| 142| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 143|    |-		GetPassabilityClassName: function() { return "default"; },
|    | 143|+		"GetPassabilityClassName": function() { return "default"; },
| 144| 144| 	});
| 145| 145| 
| 146| 146| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 181| 181| 	var unitAIs = [];
| 182| 182| 
| 183| 183| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 184|    |-		SetInterval: function() { },
|    | 184|+		"SetInterval": function() { },
| 185| 185| 		SetTimeout: function() { },
| 186| 186| 	});
| 187| 187| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 182| 182| 
| 183| 183| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 184| 184| 		SetInterval: function() { },
| 185|    |-		SetTimeout: function() { },
|    | 185|+		"SetTimeout": function() { },
| 186| 186| 	});
| 187| 187| 
| 188| 188| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 187| 187| 
| 188| 188| 
| 189| 189| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 190|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 190|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 191| 191| 			return 1;
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 190| 190| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 191| 191| 			return 1;
| 192| 192| 		},
| 193|    |-		EnableActiveQuery: function(id) { },
|    | 193|+		"EnableActiveQuery": function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 191| 191| 			return 1;
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 194|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
| 197| 197| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 192| 192| 		},
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195|    |-		DisableActiveQuery: function(id) { },
|    | 195|+		"DisableActiveQuery": function(id) { },
| 196| 196| 		GetEntityFlagMask: function(identifier) { },
| 197| 197| 	});
| 198| 198| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 193| 193| 		EnableActiveQuery: function(id) { },
| 194| 194| 		ResetActiveQuery: function(id) { return [enemy]; },
| 195| 195| 		DisableActiveQuery: function(id) { },
| 196|    |-		GetEntityFlagMask: function(identifier) { },
|    | 196|+		"GetEntityFlagMask": function(identifier) { },
| 197| 197| 	});
| 198| 198| 
| 199| 199| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 197| 197| 	});
| 198| 198| 
| 199| 199| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 200|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 200|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 204|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 204|+		"GetPlayerByID": function(id) { return playerEntity; },
| 205| 205| 		GetNumPlayers: function() { return 2; },
| 206| 206| 	});
| 207| 207| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 204| 204| 		GetPlayerByID: function(id) { return playerEntity; },
| 205|    |-		GetNumPlayers: function() { return 2; },
|    | 205|+		"GetNumPlayers": function() { return 2; },
| 206| 206| 	});
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 206| 206| 	});
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209|    |-		IsAlly: function() { return false; },
|    | 209|+		"IsAlly": function() { return false; },
| 210| 210| 		IsEnemy: function() { return true; },
| 211| 211| 		GetEnemies: function() { return []; },
| 212| 212| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 207| 207| 
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209| 209| 		IsAlly: function() { return false; },
| 210|    |-		IsEnemy: function() { return true; },
|    | 210|+		"IsEnemy": function() { return true; },
| 211| 211| 		GetEnemies: function() { return []; },
| 212| 212| 	});
| 213| 213| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 208| 208| 	AddMock(playerEntity, IID_Player, {
| 209| 209| 		IsAlly: function() { return false; },
| 210| 210| 		IsEnemy: function() { return true; },
| 211|    |-		GetEnemies: function() { return []; },
|    | 211|+		"GetEnemies": function() { return []; },
| 212| 212| 	});
| 213| 213| 
| 214| 214| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 219| 219| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 220| 220| 
| 221| 221| 		AddMock(unit + i, IID_Identity, {
| 222|    |-			GetClassesList: function() { return []; },
|    | 222|+			"GetClassesList": function() { return []; },
| 223| 223| 		});
| 224| 224| 
| 225| 225| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 223| 223| 		});
| 224| 224| 
| 225| 225| 		AddMock(unit + i, IID_Ownership, {
| 226|    |-			GetOwner: function() { return 1; },
|    | 226|+			"GetOwner": function() { return 1; },
| 227| 227| 		});
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 227| 227| 		});
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 230|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231|    |-			GetPosition: function() { return new Vector3D(); },
|    | 231|+			"GetPosition": function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 229| 229| 		AddMock(unit + i, IID_Position, {
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 232|+			"GetPosition2D": function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
| 235| 235| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 230| 230| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 233|+			"GetRotation": function() { return { "y": 0 }; },
| 234| 234| 			IsInWorld: function() { return true; },
| 235| 235| 		});
| 236| 236| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 231| 231| 			GetPosition: function() { return new Vector3D(); },
| 232| 232| 			GetPosition2D: function() { return new Vector2D(); },
| 233| 233| 			GetRotation: function() { return { "y": 0 }; },
| 234|    |-			IsInWorld: function() { return true; },
|    | 234|+			"IsInWorld": function() { return true; },
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238|    |-			GetWalkSpeed: function() { return 1; },
|    | 238|+			"GetWalkSpeed": function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToFormationOffset' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239|    |-			MoveToFormationOffset: function(target, x, z) { },
|    | 239|+			"MoveToFormationOffset": function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 237| 237| 		AddMock(unit + i, IID_UnitMotion, {
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240|    |-			IsInTargetRange: function(target, min, max) { return true; },
|    | 240|+			"IsInTargetRange": function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 238| 238| 			GetWalkSpeed: function() { return 1; },
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241|    |-			MoveToTargetRange: function(target, min, max) { },
|    | 241|+			"MoveToTargetRange": function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
| 244| 244| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 239| 239| 			MoveToFormationOffset: function(target, x, z) { },
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242|    |-			StopMoving: function() { },
|    | 242|+			"StopMoving": function() { },
| 243| 243| 			GetPassabilityClassName: function() { return "default"; },
| 244| 244| 		});
| 245| 245| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 240| 240| 			IsInTargetRange: function(target, min, max) { return true; },
| 241| 241| 			MoveToTargetRange: function(target, min, max) { },
| 242| 242| 			StopMoving: function() { },
| 243|    |-			GetPassabilityClassName: function() { return "default"; },
|    | 243|+			"GetPassabilityClassName": function() { return "default"; },
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_Vision, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_Vision, {
| 247|    |-			GetRange: function() { return 10; },
|    | 247|+			"GetRange": function() { return 10; },
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return { "max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 248| 248| 		});
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 251|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 252|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 249| 249| 
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 252|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 250| 250| 		AddMock(unit + i, IID_Attack, {
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 253|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 251| 251| 			GetRange: function() { return {"max":10, "min": 0}; },
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 254|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 257| 257| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 252| 252| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255|    |-			CanAttack: function(v) { return true; },
|    | 255|+			"CanAttack": function(v) { return true; },
| 256| 256| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 257| 257| 		});
| 258| 258| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 253| 253| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 254| 254| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 255| 255| 			CanAttack: function(v) { return true; },
| 256|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 256|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 257| 257| 		});
| 258| 258| 
| 259| 259| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 265| 265| 
| 266| 266| 	// create enemy
| 267| 267| 	AddMock(enemy, IID_Health, {
| 268|    |-		GetHitpoints: function() { return 40; },
|    | 268|+		"GetHitpoints": function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271| 271| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 268| 268| 		GetHitpoints: function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 271|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 268| 268| 		GetHitpoints: function() { return 40; },
| 269| 269| 	});
| 270| 270| 
| 271|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 271|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 272| 272| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
| 275|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 275|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 273| 273| 
| 274| 274| 	AddMock(controller, IID_Position, {
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 276|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 274| 274| 	AddMock(controller, IID_Position, {
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 277|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 275| 275| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 278|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
| 281| 281| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 276| 276| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 279|+		"GetRotation": function() { return { "y": 0 }; },
| 280| 280| 		IsInWorld: function() { return true; },
| 281| 281| 	});
| 282| 282| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 277| 277| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 278| 278| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 279| 279| 		GetRotation: function() { return { "y": 0 }; },
| 280|    |-		IsInWorld: function() { return true; },
|    | 280|+		"IsInWorld": function() { return true; },
| 281| 281| 	});
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetWalkSpeed' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 281| 281| 	});
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284|    |-		GetWalkSpeed: function() { return 1; },
|    | 284|+		"GetWalkSpeed": function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetSpeedRatio' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285|    |-		SetSpeedRatio: function(speed) { },
|    | 285|+		"SetSpeedRatio": function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveToPointRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 	AddMock(controller, IID_UnitMotion, {
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286|    |-		MoveToPointRange: function(x, z, minRange, maxRange) { },
|    | 286|+		"MoveToPointRange": function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInTargetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 284| 284| 		GetWalkSpeed: function() { return 1; },
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287|    |-		IsInTargetRange: function(target, min, max) { return true; },
|    | 287|+		"IsInTargetRange": function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
| 290| 290| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'StopMoving' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 285| 285| 		SetSpeedRatio: function(speed) { },
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288|    |-		StopMoving: function() { },
|    | 288|+		"StopMoving": function() { },
| 289| 289| 		GetPassabilityClassName: function() { return "default"; },
| 290| 290| 	});
| 291| 291| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClassName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 286| 286| 		MoveToPointRange: function(x, z, minRange, maxRange) { },
| 287| 287| 		IsInTargetRange: function(target, min, max) { return true; },
| 288| 288| 		StopMoving: function() { },
| 289|    |-		GetPassabilityClassName: function() { return "default"; },
|    | 289|+		"GetPassabilityClassName": function() { return "default"; },
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return { "max":10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 293|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 294| 294| 		CanAttackAsFormation: function() { return false; },
| 295| 295| 	});
| 296| 296| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 291| 291| 
| 292| 292| 	AddMock(controller, IID_Attack, {
| 293| 293| 		GetRange: function() { return {"max":10, "min": 0}; },
| 294|    |-		CanAttackAsFormation: function() { return false; },
|    | 294|+		"CanAttackAsFormation": function() { return false; },
| 295| 295| 	});
| 296| 296| 
| 297| 297| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 	for (var ent of unitAIs)
| 304| 304| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 305| 305| 
| 306|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 306|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 307| 307| 
| 308| 308| 	// let all units be in position
| 309| 309| 	for (var ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 	for (var ent of unitAIs)
| 304| 304| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 305| 305| 
| 306|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 306|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 307| 307| 
| 308| 308| 	// let all units be in position
| 309| 309| 	for (var ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  46| »   »   ResetActiveQuery:·function(id)·{·if·(mode·==·0)·return·[];·else·return·[enemy];·},
|    | [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/tests/test_UnitAI.js
| 215| »   for·(var·i·=·0;·i·<·unitCount;·i++)·{
|    | [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/tests/test_UnitAI.js
| 309| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 312| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 304| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 313| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 126| 126| 	this.formationMembersWithAura = []; // Members with a formation aura
| 127| 127| 	this.width = 0;
| 128| 128| 	this.depth = 0;
| 129|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 129|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 130| 130| 	this.twinFormations = [];
| 131| 131| 	// distance from which two twin formations will merge into one.
| 132| 132| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 126| 126| 	this.formationMembersWithAura = []; // Members with a formation aura
| 127| 127| 	this.width = 0;
| 128| 128| 	this.depth = 0;
| 129|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 129|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 130| 130| 	this.twinFormations = [];
| 131| 131| 	// distance from which two twin formations will merge into one.
| 132| 132| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 144| 144| 
| 145| 145| Formation.prototype.GetSize = function()
| 146| 146| {
| 147|    |-	return {"width": this.width, "depth": this.depth};
|    | 147|+	return { "width": this.width, "depth": this.depth};
| 148| 148| };
| 149| 149| 
| 150| 150| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 144| 144| 
| 145| 145| Formation.prototype.GetSize = function()
| 146| 146| {
| 147|    |-	return {"width": this.width, "depth": this.depth};
|    | 147|+	return {"width": this.width, "depth": this.depth };
| 148| 148| };
| 149| 149| 
| 150| 150| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return { "width":1, "depth": 1};
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return {"width": 1, "depth": 1};
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 563| 563| 			footprints.push(cmpFootprint.GetShape());
| 564| 564| 	}
| 565| 565| 	if (!footprints.length)
| 566|    |-		return {"width":1, "depth": 1};
|    | 566|+		return {"width":1, "depth": 1 };
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 565| 565| 	if (!footprints.length)
| 566| 566| 		return {"width":1, "depth": 1};
| 567| 567| 
| 568|    |-	var r = {"width": 0, "depth": 0};
|    | 568|+	var r = { "width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
| 570| 570| 	{
| 571| 571| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 565| 565| 	if (!footprints.length)
| 566| 566| 		return {"width":1, "depth": 1};
| 567| 567| 
| 568|    |-	var r = {"width": 0, "depth": 0};
|    | 568|+	var r = {"width": 0, "depth": 0 };
| 569| 569| 	for (var shape of footprints)
| 570| 570| 	{
| 571| 571| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 567| 567| 
| 568| 568| 	var r = {"width": 0, "depth": 0};
| 569| 569| 	for (var shape of footprints)
| 570|    |-	{
|    | 570|+	
| 571| 571| 		if (shape.type == "circle")
| 572| 572| 		{
| 573| 573| 			r.width += shape.radius * 2;
| 578| 578| 			r.width += shape.width;
| 579| 579| 			r.depth += shape.depth;
| 580| 580| 		}
| 581|    |-	}
|    | 581|+	
| 582| 582| 	r.width /= footprints.length;
| 583| 583| 	r.depth /= footprints.length;
| 584| 584| 	return r;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 591| 591| 	separation.depth *= this.separationMultiplier.depth;
| 592| 592| 
| 593| 593| 	if (this.columnar)
| 594|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 594|+		var sortingClasses = ["Cavalry", "Infantry"];
| 595| 595| 	else
| 596| 596| 		var sortingClasses = this.sortingClasses.slice();
| 597| 597| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 608| 608| 		var classes = cmpIdentity.GetClassesList();
| 609| 609| 		var done = false;
| 610| 610| 		for (var c = 0; c < sortingClasses.length; ++c)
| 611|    |-		{
|    | 611|+		
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614| 614| 				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
| 618|    |-		}
|    | 618|+		
| 619| 619| 		if (!done)
| 620| 620| 			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
| 621| 621| 	}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 		{
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 614|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 		{
| 612| 612| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 613| 613| 			{
| 614|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 614|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 615| 615| 				done = true;
| 616| 616| 				break;
| 617| 617| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 617| 617| 			}
| 618| 618| 		}
| 619| 619| 		if (!done)
| 620|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 620|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 621| 621| 	}
| 622| 622| 
| 623| 623| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 635| 635| 	if (this.columnar)
| 636| 636| 	{
| 637| 637| 		shape = "square";
| 638|    |-		cols = Math.min(count,3);
|    | 638|+		cols = Math.min(count, 3);
| 639| 639| 		shiftRows = false;
| 640| 640| 		centerGap = 0;
| 641| 641| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 689| 689| 					n -= r%2;
| 690| 690| 			}
| 691| 691| 			else if (shape == "triangle")
| 692|    |-			{
|    | 692|+			
| 693| 693| 				if (shiftRows)
| 694| 694| 					var n = r + 1;
| 695| 695| 				else
| 696| 696| 					var n = r * 2 + 1;
| 697|    |-			}
|    | 697|+			
| 698| 698| 			if (!shiftRows && n > left)
| 699| 699| 				n = left;
| 700| 700| 			for (var c = 0; c < n && left > 0; ++c)
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 730| 730| 	// calculating offset distances without a zero average makes no sense, as the formation
| 731| 731| 	// will jump to a different position any time
| 732| 732| 	var avgoffset = Vector2D.average(offsets);
| 733|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 733|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 734| 734| 
| 735| 735| 	// sort the available places in certain ways
| 736| 736| 	// 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 '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 789| 789| 			closestOffsetId = i;
| 790| 790| 		}
| 791| 791| 	}
| 792|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 792|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 793| 793| 	return closestOffsetId;
| 794| 794| };
| 795| 795| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 799| 799| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 800| 800| {
| 801| 801| 	var offsetPositions = [];
| 802|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 802|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 803| 803| 	// calculate the world positions
| 804| 804| 	for (var o of offsets)
| 805| 805| 		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 '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 799| 799| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 800| 800| {
| 801| 801| 	var offsetPositions = [];
| 802|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 802|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 803| 803| 	// calculate the world positions
| 804| 804| 	for (var o of offsets)
| 805| 805| 		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 '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 816| 816| Formation.prototype.GetEstimatedOrientation = function(pos)
| 817| 817| {
| 818| 818| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 819|    |-	var r = {"sin": 0, "cos": 1};
|    | 819|+	var r = { "sin": 0, "cos": 1};
| 820| 820| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 821| 821| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 822| 822| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 816| 816| Formation.prototype.GetEstimatedOrientation = function(pos)
| 817| 817| {
| 818| 818| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 819|    |-	var r = {"sin": 0, "cos": 1};
|    | 819|+	var r = {"sin": 0, "cos": 1 };
| 820| 820| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 821| 821| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 822| 822| 	{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Formation.js
| 898| 898| 		cmpOtherFormation.RemoveMembers(otherMembers);
| 899| 899| 		this.AddMembers(otherMembers);
| 900| 900| 		Engine.DestroyEntity(this.twinFormations[i]);
| 901|    |-		this.twinFormations.splice(i,1);
|    | 901|+		this.twinFormations.splice(i, 1);
| 902| 902| 	}
| 903| 903| 	// Switch between column and box if necessary
| 904| 904| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 620| »   »   »   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
| 660| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 710| »   »   »   »   »   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
| 712| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 714| »   »   »   »   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
| 724| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 614| »   »   »   »   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
| 753| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

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

binaries/data/mods/public/simulation/components/Formation.js
| 860| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 410| 410| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 411| 411| 
| 412| 412| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 413|    |-			{
|    | 413|+			
| 414| 414| 				// For units, take the range in front of it, no spread. So angle = 0
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416|    |-			}
|    | 416|+			
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418| 418| 			{
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 416| 416| 			}
| 417| 417| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else
| 423| 423| 			{
| 424| 424| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 421| 421| 			}
| 422| 422| 			else
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// not in world, set a default?
| 425| 425| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 426|    |-			}
|    | 426|+			
| 427| 427| 		}
| 428| 428| 	}
| 429| 429| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 791| 791| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 792| 792| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 793| 793| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 794|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 794|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 795| 795| 	}
| 796| 796| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 797| 797| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1310|1310| 		}
|1311|1311| 	}
|1312|1312| 	else
|1313|    |-	{
|    |1313|+	
|1314|1314| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1315|1315| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1316|1316| 		// wall piece.
|1331|1331| 			"pos": start.pos,
|1332|1332| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1333|1333| 		});
|1334|    |-	}
|    |1334|+	
|1335|1335| 
|1336|1336| 	if (end.pos)
|1337|1337| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1334|1334| 	}
|1335|1335| 
|1336|1336| 	if (end.pos)
|1337|    |-	{
|    |1337|+	
|1338|1338| 		// Analogous to the starting side case above
|1339|1339| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1340|1340| 		{
|1372|1372| 				"pos": end.pos,
|1373|1373| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1374|1374| 			});
|1375|    |-	}
|    |1375|+	
|1376|1376| 
|1377|1377| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1378|1378| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1550|1550| 
|1551|1551| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1552|1552| 		if (cmpVisual)
|1553|    |-		{
|    |1553|+		
|1554|1554| 			if (!allPiecesValid || !canAfford)
|1555|1555| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1556|1556| 			else
|1557|1557| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1558|    |-		}
|    |1558|+		
|1559|1559| 
|1560|1560| 		++entPool.numUsed;
|1561|1561| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1624|1624| 			{
|1625|1625| 				minDist2 = dist2;
|1626|1626| 				minDistEntitySnapData = {
|1627|    |-						"x": pos.x,
|    |1627|+					"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1625|1625| 				minDist2 = dist2;
|1626|1626| 				minDistEntitySnapData = {
|1627|1627| 						"x": pos.x,
|1628|    |-						"z": pos.z,
|    |1628|+					"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|1631|1631| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1626|1626| 				minDistEntitySnapData = {
|1627|1627| 						"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|    |-						"angle": cmpPosition.GetRotation().y,
|    |1629|+					"angle": cmpPosition.GetRotation().y,
|1630|1630| 						"ent": ent
|1631|1631| 				};
|1632|1632| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1627|1627| 						"x": pos.x,
|1628|1628| 						"z": pos.z,
|1629|1629| 						"angle": cmpPosition.GetRotation().y,
|1630|    |-						"ent": ent
|    |1630|+					"ent": ent
|1631|1631| 				};
|1632|1632| 			}
|1633|1633| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1772|1772| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1773|1773| 	}
|1774|1774| 	else if (data.target === secondMarket)
|1775|    |-	{
|    |1775|+	
|1776|1776| 		result = {
|1777|1777| 			"type": "is second",
|1778|1778| 			"gain": cmpEntityTrader.GetGoods().amount,
|1779|1779| 		};
|1780|    |-	}
|    |1780|+	
|1781|1781| 	else if (!firstMarket)
|1782|1782| 	{
|1783|1783| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 		};
|1780|1780| 	}
|1781|1781| 	else if (!firstMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = { "type": "set first" };
|1784|    |-	}
|    |1784|+	
|1785|1785| 	else if (!secondMarket)
|1786|1786| 	{
|1787|1787| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1783|1783| 		result = { "type": "set first" };
|1784|1784| 	}
|1785|1785| 	else if (!secondMarket)
|1786|    |-	{
|    |1786|+	
|1787|1787| 		result = {
|1788|1788| 			"type": "set second",
|1789|1789| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1790|1790| 		};
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else
|1793|1793| 	{
|1794|1794| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		};
|1791|1791| 	}
|1792|1792| 	else
|1793|    |-	{
|    |1793|+	
|1794|1794| 		// Else both markets are not null and target is different from them
|1795|1795| 		result = { "type": "set first" };
|1796|    |-	}
|    |1796|+	
|1797|1797| 	return result;
|1798|1798| };
|1799|1799| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 228| 228| 		// Move a tile outside the building
| 229| 229| 		let range = 4;
| 230| 230| 		if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
| 231|    |-		{
|    | 231|+		
| 232| 232| 			// We've started walking to the given point
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234|    |-		}
|    | 234|+		
| 235| 235| 		else
| 236| 236| 		{
| 237| 237| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234| 234| 		}
| 235| 235| 		else
| 236|    |-		{
|    | 236|+		
| 237| 237| 			// We are already at the target, or can't move at all
| 238| 238| 			this.FinishOrder();
| 239|    |-		}
|    | 239|+		
| 240| 240| 	},
| 241| 241| 
| 242| 242| 	// Individual orders:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 335| 335| 
| 336| 336| 		var ok = this.MoveToTarget(this.order.data.target);
| 337| 337| 		if (ok)
| 338|    |-		{
|    | 338|+		
| 339| 339| 			// We've started walking to the given point
| 340| 340| 			if (this.IsAnimal())
| 341| 341| 				this.SetNextState("ANIMAL.WALKING");
| 342| 342| 			else
| 343| 343| 				this.SetNextState("INDIVIDUAL.WALKING");
| 344|    |-		}
|    | 344|+		
| 345| 345| 		else
| 346| 346| 		{
| 347| 347| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364| 364| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365| 365| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366|    |-		{
|    | 366|+		
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 369| 369| 				needToMove = false;
| 370|    |-		}
|    | 370|+		
| 371| 371| 
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
|    | [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/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 361| 361| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 362| 362| 		var needToMove = true;
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 364|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 365|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366| 366| 		{
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
| 374| 374| 		if (needToMove && this.MoveToTarget(this.order.data.target))
| 375|    |-		{
|    | 375|+		
| 376| 376| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
| 377|    |-		}
|    | 377|+		
| 378| 378| 		else
| 379| 379| 		{
| 380| 380| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 401| 401| 		var distance = DistanceBetweenEntities(this.entity, this.order.data.target) + (+this.template.FleeDistance);
| 402| 402| 		var cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
| 403| 403| 		if (cmpUnitMotion.MoveToTargetRange(this.order.data.target, distance, -1))
| 404|    |-		{
|    | 404|+		
| 405| 405| 			// We've started fleeing from the given target
| 406| 406| 			if (this.IsAnimal())
| 407| 407| 				this.SetNextState("ANIMAL.FLEEING");
| 408| 408| 			else
| 409| 409| 				this.SetNextState("INDIVIDUAL.FLEEING");
| 410|    |-		}
|    | 410|+		
| 411| 411| 		else
| 412| 412| 		{
| 413| 413| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 448| 448| 			}
| 449| 449| 
| 450| 450| 			if (this.order.data.attackType == this.oldAttackType)
| 451|    |-			{
|    | 451|+			
| 452| 452| 				if (this.IsAnimal())
| 453| 453| 					this.SetNextState("ANIMAL.COMBAT.ATTACKING");
| 454| 454| 				else
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456|    |-			}
|    | 456|+			
| 457| 457| 			else
| 458| 458| 			{
| 459| 459| 				if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 455| 455| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 456| 456| 			}
| 457| 457| 			else
| 458|    |-			{
|    | 458|+			
| 459| 459| 				if (this.IsAnimal())
| 460| 460| 					this.SetNextState("ANIMAL.COMBAT.ATTACKING");
| 461| 461| 				else
| 462| 462| 					this.SetNextState("INDIVIDUAL.COMBAT.ATTACKING");
| 463|    |-			}
|    | 463|+			
| 464| 464| 			return;
| 465| 465| 		}
| 466| 466| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 580| 580| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 581| 581| 				}
| 582| 582| 				else
| 583|    |-				{
|    | 583|+				
| 584| 584| 					// We couldn't move there, or the target moved away
| 585| 585| 					this.FinishOrder();
| 586|    |-				}
|    | 586|+				
| 587| 587| 				return;
| 588| 588| 			}
| 589| 589| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 593| 593| 
| 594| 594| 		// Try to move within range
| 595| 595| 		if (this.MoveToTargetRange(this.order.data.target, IID_ResourceGatherer))
| 596|    |-		{
|    | 596|+		
| 597| 597| 			// We've started walking to the given point
| 598| 598| 			this.SetNextState("INDIVIDUAL.GATHER.APPROACHING");
| 599|    |-		}
|    | 599|+		
| 600| 600| 		else
| 601| 601| 		{
| 602| 602| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace