Page MenuHomeWildfire Games

Make commutative behaviour in the IsInRange function family and migrate them to a better home
ClosedPublic

Authored by wraitii on Oct 24 2017, 6:39 PM.

Details

Reviewers
bb
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP22345: Move "IsInRange" family of functions to the Obstruction Manager and make the…
Summary

The IsInRange function family is currently placed in the UnitMotion component. Which is stupid since, why does a range check depend on being able to move? These function might (and will be in some of my WIP's) become useful for buildings and other non-unitMotion entities. So we need to move these function to a better place.

This patch is based on D13 (at least a split of it) with wraitii's approval. There and here the functions are moved to the ObstructionManager, since that is a system component and these functions use some of that. However if someone proposes something better, we can ship with that. (Do notice that "position" is not really an option due to the isPointinPointRange function, which doesn't require it to be units. And we use this for some cases in the other functions.)

What is changed based on D13:

  • remove IsPointInTarget range, since that is a duplicate of IsInPoint range,
  • Add support for square to square checks,
  • Better support for sphere-square minrange
  • rounding fix instead of navcell
Test Plan

build and run tests
Make sure the squares and sqrt's doesn't case OOS'es
Comment on the new location.
Comment on the proposed behaviour
Proof or let proof the used identities in geometry (and make the comments updated if they are unclear).
Test attacking, healing, garrisoning etc. with min and max ranges
Let some airplane fly
see there are no overflows even on a giant map

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 edited the test plan for this revision. (Show Details)Dec 9 2017, 8:56 PM

Remove the squares due to overflows, fix the minus u2, make the distance 0 for crossed squares

Vulcan added a comment.Dec 9 2017, 9:54 PM

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Vulcan added a comment.Dec 9 2017, 9:55 PM
Executing section Default...
Executing section Source...
Executing section JS...

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/tests/test_UnitAI.js
| 310| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 305| »   »   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
| 314| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.

binaries/data/mods/public/simulation/components/UnitAI.js
| 356| »   »   ····&&·(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
|1906| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2038| »   »   »   »   »   »   &&·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
|2122| »   »   »   »   »   »   »   »   ·&&·((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
|2123| »   »   »   »   »   »   »   »   ·||·(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
|2124| »   »   »   »   »   »   »   »   ·&&·(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
|2147| »   »   »   »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(oldType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2187| »   »   »   »   »   »   »   »   &&·((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
|2188| »   »   »   »   »   »   »   »   ||·(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
|2189| »   »   »   »   »   »   »   »   &&·(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
|2233| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NOR

This is definitely a gameplay decision, but I personally side with the "farthest" as I think it's more flexible.

Then again, perhaps we should change how we handle attack range. Max range should be "how far can this reach before it hits the ground", and thus closest edge here makes sense. Min Range should perhaps be removed in favour of a linear "minimal height at X meters for this unit to hit". But that's more complicated.

I don't like it, but I guess I'm outvoted.

So we have towers and siege units with attacking minimum range. Are these functions used elsewhere with a minimum range (does Petra use it?), and is the new definition okay in those places?

elexis added a subscriber: elexis.Dec 10 2017, 4:39 PM

Can someone retitle this to reflect the gamedesign change?

bb added a comment.Dec 11 2017, 1:36 PM
In D981#45615, @temple wrote:

So we have towers and siege units with attacking minimum range. Are these functions used elsewhere with a minimum range (does Petra use it?), and is the new definition okay in those places?

They are directly used for healing and garrisoning too (but I believe they don't have any set minranges)
But via unitmotion they are used for about any move.

Thus you might have a point in using the shortest distance regarding fleeing...

bb retitled this revision from Migrate IsInRange function family to a better home to Make commutative behaviour in the IsInRange function family and migrate them to a better home.Dec 11 2017, 1:37 PM
wraitii added a reviewer: Restricted Owners Package.Dec 17 2017, 1:41 PM
bb updated this revision to Diff 4899.Dec 23 2017, 12:33 AM

Split the distance calculations from the checks and add a opposite option, so we can still use this for fleeing.

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (308 tests)....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Executing section Default...
Executing section Source...
Executing section JS...

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

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 305| »   »   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
| 314| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.

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/UnitAI.js
| 356| »   »   ····&&·(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
|1908| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2040| »   »   »   »   »   »   &&·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
|2124| »   »   »   »   »   »   »   »   ·&&·((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
|2125| »   »   »   »   »   »   »   »   ·||·(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
|2126| »   »   »   »   »   »   »   »   ·&&·(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
|2149| »   »   »   »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(oldType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2189| »   »   »   »   »   »   »   »   &&·((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
|2190| »   »   »   »   »   »   »   »   ||·(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
|2191| »   »   »   »   »   »   »   »   &&·(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
|2235| »   »   »   »   »   »   »   ||·(type.specific·==·resourceType.specific
|    | [NOR
bb added a comment.Dec 23 2017, 2:39 PM

A bug I notice when testing is that units move closer to the building than is required by this check, that could be abused by players who order the units directly to the maxrange point and attack directly (units will attack from there). Fixing this needs to rewrite the unitmotion...

A bug I notice when testing is that units move closer to the building than is required by this check, that could be abused by players who order the units directly to the maxrange point and attack directly (units will attack from there). Fixing this needs to rewrite the unitmotion...

This is addressed in D13 by switching most cases of "MoveCompleted" to instances of Timer. Which I guess could be done easily for SVN too.

bb added a comment.Dec 23 2017, 4:07 PM

Don't know exactly what is done in D13, but the current problem is that unitmotion just goes to the "wrong" point, so fixing that with some unitAI hiding crap, looks even worse too me (nothing breaks, just some unit move more than they have to).

In D981#46964, @bb wrote:

Don't know exactly what is done in D13, but the current problem is that unitmotion just goes to the "wrong" point, so fixing that with some unitAI hiding crap, looks even worse too me (nothing breaks, just some unit move more than they have to).

The behaviour here is/ought to be unitAI driven. The unit tries to go towards the building, and unitAI stops when it thinks it's there. Thus how D13 handles it on a timer: check every few turns if we're there yet and if so do the action, don't rely on unitMotion (which shouldn't be concerned with this).

bb added a comment.Dec 23 2017, 4:23 PM

That might be what D13 unitmotion expects, but now the unitmotion triex to go to a point which is wrong, so I let this issue be handled by D13.

bb updated this revision to Diff 5230.Jan 11 2018, 8:05 PM
bb edited the summary of this revision. (Show Details)

Should have listened to @temple, the navcellfix is causing the bug noticed above, removing it doesn't seem to break (tested with small maxRanges and small differece between minRange and maxRange)

Do you mean that with current unitMotion the unit starts doing the thing right when they get in range (i.e. as fast as a player could do it?)

bb added a comment.Jan 12 2018, 5:55 PM

for maxrange: yes (minrange is a different story), or at least I didn't notice a difference

bb added a comment.Jan 12 2018, 6:48 PM

for maxrange: yes (minrange is a different story), or at least I didn't notice a difference

source/simulation2/helpers/Geometry.cpp
242–245 ↗(On Diff #5230)

indentation

bb updated this revision to Diff 5580.Jan 30 2018, 1:12 AM

rebase and years

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

Updating workspaces...
Build (release)...
Build (debug)...
Running release tests...
Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK!
Running debug tests...
Running cxxtest tests (309 tests).....................................................................................................................................................................................................................................................................................................................OK!
Checking XML files...
Executing section Default...
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPassabilityClass' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/phabricator_lint/binaries/data/mods/public/simulation/components/tests/test_UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/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
|  46| »   "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/phabricator_lint/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/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/phabricator_lint/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/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/phabricator_lint/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/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/phabricator_lint/binaries/data/mods/public/simulation/components/UnitMotionFlying.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/phabricator_lint/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| 1
wraitii requested changes to this revision.May 5 2018, 3:17 PM

@bb Add some tests and I'll approve this.

This revision now requires changes to proceed.May 5 2018, 3:17 PM

I think (haven't tested precisely as it's annoying) your DistanceBetweenShapes function is slightly (about fixed::Epsilon * 100) inconsistent with PathGoal::NearestPointOnGoal for non-AA square goals. This is a annoying, but it sounds difficult to fix.

The problem is that D13 requires the range checks to be at least as permissive as whatever MakeGoalReachable returns, and that uses PathGoal::NearestPointOnGoal.
I think it'd still be good to add a small buffer to IsInRange checks (maybe not the distance checks themselves), about 0.01.

Addendum: well while the above still seems true, another problem is that makeGoalReachable does not use a rounded rectangle but a flat one.

bb added a comment.Jun 28 2018, 5:03 PM
In D981#60827, @wraitii wrote:

Addendum: well while the above still seems true, another problem is that makeGoalReachable does not use a rounded rectangle but a flat one.

Don't see where is proposed code uses rounded rectangles.

In D981#60814, @wraitii wrote:

I think (haven't tested precisely as it's annoying) your DistanceBetweenShapes function is slightly (about fixed::Epsilon * 100) inconsistent with PathGoal::NearestPointOnGoal for non-AA square goals. This is a annoying, but it sounds difficult to fix.
The problem is that D13 requires the range checks to be at least as permissive as whatever MakeGoalReachable returns, and that uses PathGoal::NearestPointOnGoal.

One should be careful with such demands as obstructions can change during walking the path (buildings can be destroyed/build), but that is more a D13 concern.

I think it'd still be good to add a small buffer to IsInRange checks (maybe not the distance checks themselves), about 0.01.

As proven by the tests rounding errors can occur, so we indeed need a small buffer (only just smaller than proposed previously), absolutely disliking the magnicness of it

bb updated this revision to Diff 6792.Jun 28 2018, 5:03 PM
bb edited the summary of this revision. (Show Details)

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

Linter detected issues:
Executing section Default...
Executing section Source...
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
|  46| »   "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 (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
| 318| 318| 
| 319| 319| UnitMotionFlying.prototype.StopMoving = function()
| 320| 320| {
| 321|    |-	//Invert
|    | 321|+	// Invert
| 322| 322| 	if (!this.waterDeath)
| 323| 323| 		this.landing = !this.landing;
| 324| 324| 

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

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 306| »   »   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
| 315| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [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
|1805|1805| 				"MoveCompleted": function() {
|1806|1806| 
|1807|1807| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1808|    |-					{
|    |1808|+					
|1809|1809| 						// If the unit needs to unpack, do so
|1810|1810| 						if (this.CanUnpack())
|1811|1811| 						{
|1814|1814| 						}
|1815|1815| 						else
|1816|1816| 							this.SetNextState("ATTACKING");
|1817|    |-					}
|    |1817|+					
|1818|1818| 					else
|1819|1819| 					{
|1820|1820| 						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
|1812|1812| 							this.PushOrderFront("Unpack", { "force": true });
|1813|1813| 							return;
|1814|1814| 						}
|1815|    |-						else
|1816|    |-							this.SetNextState("ATTACKING");
|    |1815|+						this.SetNextState("ATTACKING");
|1817|1816| 					}
|1818|1817| 					else
|1819|1818| 					{
|    | [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
|1816|1816| 							this.SetNextState("ATTACKING");
|1817|1817| 					}
|1818|1818| 					else
|1819|    |-					{
|    |1819|+					
|1820|1820| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1821|1821| 						{
|1822|1822| 							this.SetNextState("APPROACHING");
|1826|1826| 							// Give up
|1827|1827| 							this.FinishOrder();
|1828|1828| 						}
|1829|    |-					}
|    |1829|+					
|1830|1830| 				},
|1831|1831| 			},
|1832|1832| 
|    | [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
|1818|1818| 					else
|1819|1819| 					{
|1820|1820| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1821|    |-						{
|    |1821|+						
|1822|1822| 							this.SetNextState("APPROACHING");
|1823|    |-						}
|    |1823|+						
|1824|1824| 						else
|1825|1825| 						{
|1826|1826| 							// 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
|1822|1822| 							this.SetNextState("APPROACHING");
|1823|1823| 						}
|1824|1824| 						else
|1825|    |-						{
|    |1825|+						
|1826|1826| 							// Give up
|1827|1827| 							this.FinishOrder();
|1828|    |-						}
|    |1828|+						
|1829|1829| 					}
|1830|1830| 				},
|1831|1831| 			},
|    | [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
|1843|1843| 					}
|1844|1844| 					// Check the target is still alive and attackable
|1845|1845| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1846|    |-					{
|    |1846|+					
|1847|1847| 						// Can't reach it - try to chase after it
|1848|1848| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1849|1849| 						{
|1858|1858| 								return;
|1859|1859| 							}
|1860|1860| 						}
|1861|    |-					}
|    |1861|+					
|1862|1862| 
|1863|1863| 					var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|1864|1864| 					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
|1889|1889| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1890|1890| 
|1891|1891| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1892|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1892|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1893|1893| 
|1894|1894| 					this.FaceTowardsTarget(this.order.data.target);
|1895|1895| 
|    | [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
|2018|2018| 
|2019|2019| 				"Attacked": function(msg) {
|2020|2020| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2021|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2022|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2021|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2022|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2023|2023| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2024|2024| 				},
|2025|2025| 			},
|    | [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
|2102|2102| 						// Also don't switch to a different type of huntable animal
|2103|2103| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2104|2104| 							return (
|2105|    |-								ent != oldTarget
|2106|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2105|+								ent != oldTarget &&
|    |2106|+								 ((type.generic == "treasure" && oldType.generic == "treasure")
|2107|2107| 								 || (type.specific == oldType.specific
|2108|2108| 								 && (type.specific != "meat" || oldTemplate == template)))
|2109|2109| 							);
|    | [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
|2103|2103| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2104|2104| 							return (
|2105|2105| 								ent != oldTarget
|2106|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2107|    |-								 || (type.specific == oldType.specific
|    |2106|+								 && ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2107|+								 (type.specific == oldType.specific
|2108|2108| 								 && (type.specific != "meat" || oldTemplate == template)))
|2109|2109| 							);
|2110|2110| 						}, 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
|2104|2104| 							return (
|2105|2105| 								ent != oldTarget
|2106|2106| 								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2107|    |-								 || (type.specific == oldType.specific
|2108|    |-								 && (type.specific != "meat" || oldTemplate == template)))
|    |2107|+								 || (type.specific == oldType.specific &&
|    |2108|+								 (type.specific != "meat" || oldTemplate == template)))
|2109|2109| 							);
|2110|2110| 						}, oldTarget);
|2111|2111| 						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
|2113|2113| 							this.PerformGather(nearby, false, false);
|2114|2114| 							return true;
|2115|2115| 						}
|2116|    |-						else
|2117|    |-						{
|    |2116|+						
|2118|2117| 							// It's probably better in this case, to avoid units getting stuck around a dropsite
|2119|2118| 							// in a "Target is far away, full, nearby are no good resources, return to dropsite" loop
|2120|2119| 							// to order it to GatherNear the resource position.
|2135|2134| 									return true;
|2136|2135| 								}
|2137|2136| 							}
|2138|    |-						}
|    |2137|+						
|2139|2138| 						return true;
|2140|2139| 					}
|2141|2140| 					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
|2125|2125| 								this.GatherNearPosition(pos.x, pos.z, oldType, oldTemplate);
|2126|2126| 								return true;
|2127|2127| 							}
|2128|    |-							else
|2129|    |-							{
|    |2128|+							
|2130|2129| 								// we're kind of stuck here. Return resource.
|2131|2130| 								var nearby = this.FindNearestDropsite(oldType.generic);
|2132|2131| 								if (nearby)
|2134|2133| 									this.PushOrderFront("ReturnResource", { "target": nearby, "force": false });
|2135|2134| 									return true;
|2136|2135| 								}
|2137|    |-							}
|    |2136|+							
|2138|2137| 						}
|2139|2138| 						return true;
|2140|2139| 					}
|    | [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
|2167|2167| 						// Also don't switch to a different type of huntable animal
|2168|2168| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2169|2169| 							return (
|2170|    |-								ent != oldTarget
|2171|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2170|+								ent != oldTarget &&
|    |2171|+								((type.generic == "treasure" && oldType.generic == "treasure")
|2172|2172| 								|| (type.specific == oldType.specific
|2173|2173| 								&& (type.specific != "meat" || oldTemplate == template)))
|2174|2174| 							);
|    | [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
|2168|2168| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2169|2169| 							return (
|2170|2170| 								ent != oldTarget
|2171|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2172|    |-								|| (type.specific == oldType.specific
|    |2171|+								&& ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2172|+								(type.specific == oldType.specific
|2173|2173| 								&& (type.specific != "meat" || oldTemplate == template)))
|2174|2174| 							);
|2175|2175| 						});
|    | [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
|2169|2169| 							return (
|2170|2170| 								ent != oldTarget
|2171|2171| 								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2172|    |-								|| (type.specific == oldType.specific
|2173|    |-								&& (type.specific != "meat" || oldTemplate == template)))
|    |2172|+								|| (type.specific == oldType.specific &&
|    |2173|+								(type.specific != "meat" || oldTemplate == template)))
|2174|2174| 							);
|2175|2175| 						});
|2176|2176| 						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
|2214|2214| 					// Also don't switch to a different type of huntable animal
|2215|2215| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2216|2216| 						return (
|2217|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2218|    |-							|| (type.specific == resourceType.specific
|    |2217|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2218|+							(type.specific == resourceType.specific
|2219|2219| 							&& (type.specific != "meat" || resourceTemplate == template))
|2220|2220| 						);
|2221|2221| 					});
|    | [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
|2215|2215| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2216|2216| 						return (
|2217|2217| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2218|    |-							|| (type.specific == resourceType.specific
|2219|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2218|+							|| (type.specific == resourceType.specific &&
|    |2219|+							(type.specific != "meat" || resourceTemplate == template))
|2220|2220| 						);
|2221|2221| 					});
|2222|2222| 
|    | [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
|2331|2331| 
|2332|2332| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2333|2333| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2334|    |-					{
|    |2334|+					
|2335|2335| 						// Check we can still reach and gather from the target
|2336|2336| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2337|2337| 						{
|2397|2397| 								return;
|2398|2398| 							}
|2399|2399| 						}
|2400|    |-					}
|    |2400|+					
|2401|2401| 
|2402|2402| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2403|2403| 
|    | [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
|2423|2423| 					// Also don't switch to a different type of huntable animal
|2424|2424| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2425|2425| 						return (
|2426|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2427|    |-							|| (type.specific == resourceType.specific
|    |2426|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2427|+							(type.specific == resourceType.specific
|2428|2428| 							&& (type.specific != "meat" || resourceTemplate == template))
|2429|2429| 						);
|2430|2430| 					});
|    | [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
|2424|2424| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2425|2425| 						return (
|2426|2426| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2427|    |-							|| (type.specific == resourceType.specific
|2428|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2427|+							|| (type.specific == resourceType.specific &&
|    |2428|+							(type.specific != "meat" || resourceTemplate == template))
|2429|2429| 						);
|2430|2430| 					});
|2431|2431| 					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
|2511|2511| 					this.StartTimer(prepare, this.healTimers.repeat);
|2512|2512| 
|2513|2513| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2514|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2514|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2515|2515| 
|2516|2516| 					this.FaceTowardsTarget(this.order.data.target);
|2517|2517| 				},
|    | [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
|2726|2726| 					{
|2727|2727| 						// The building was already finished/fully repaired before we arrived;
|2728|2728| 						// let the ConstructionFinished handler handle this.
|2729|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2729|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2730|2730| 						return true;
|2731|2731| 					}
|2732|2732| 
|    | [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
|2726|2726| 					{
|2727|2727| 						// The building was already finished/fully repaired before we arrived;
|2728|2728| 						// let the ConstructionFinished handler handle this.
|2729|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2729|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2730|2730| 						return true;
|2731|2731| 					}
|2732|2732| 
|    | [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
|2766|2766| 					if (this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2767|2767| 						this.SetNextState("APPROACHING");
|2768|2768| 					else if (!this.CheckTargetRange(this.repairTarget, IID_Builder))
|2769|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2769|+						this.FinishOrder(); // can't approach and isn't in reach
|2770|2770| 				},
|2771|2771| 			},
|2772|2772| 
|    | [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
|2853|2853| 
|2854|2854| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2855|2855| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2856|    |-				{
|    |2856|+				
|2857|2857| 					// We're already walking to the given point, so add this as a order.
|2858|2858| 					this.WalkToTarget(msg.data.newentity, true);
|2859|    |-				}
|    |2859|+				
|2860|2860| 			},
|2861|2861| 		},
|2862|2862| 
|    | [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
|2906|2906| 
|2907|2907| 					// Check that we can garrison here
|2908|2908| 					if (this.CanGarrison(target))
|2909|    |-					{
|    |2909|+					
|2910|2910| 						// Check that we're in range of the garrison target
|2911|2911| 						if (this.CheckGarrisonRange(target))
|2912|2912| 						{
|2982|2982| 								return false;
|2983|2983| 							}
|2984|2984| 						}
|2985|    |-					}
|    |2985|+					
|2986|2986| 					// Garrisoning failed for some reason, so finish the order
|2987|2987| 					this.FinishOrder();
|2988|2988| 					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
|3089|3089| 		"Attacked": function(msg) {
|3090|3090| 			if (this.template.NaturalBehaviour == "skittish" ||
|3091|3091| 			    this.template.NaturalBehaviour == "passive")
|3092|    |-			{
|    |3092|+			
|3093|3093| 				this.Flee(msg.data.attacker, false);
|3094|    |-			}
|    |3094|+			
|3095|3095| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3096|3096| 			{
|3097|3097| 				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
|3098|3098| 					this.Attack(msg.data.attacker, false);
|3099|3099| 			}
|3100|3100| 			else if (this.template.NaturalBehaviour == "domestic")
|3101|    |-			{
|    |3101|+			
|3102|3102| 				// Never flee, stop what we were doing
|3103|3103| 				this.SetNextState("IDLE");
|3104|    |-			}
|    |3104|+			
|3105|3105| 		},
|3106|3106| 
|3107|3107| 		"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
|3108|3108| 			// Move a tile outside the building
|3109|3109| 			var range = 4;
|3110|3110| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|3111|    |-			{
|    |3111|+			
|3112|3112| 				// We've started walking to the given point
|3113|3113| 				this.SetNextState("WALKING");
|3114|    |-			}
|    |3114|+			
|3115|3115| 			else
|3116|3116| 			{
|3117|3117| 				// 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
|3113|3113| 				this.SetNextState("WALKING");
|3114|3114| 			}
|3115|3115| 			else
|3116|    |-			{
|    |3116|+			
|3117|3117| 				// We are already at the target, or can't move at all
|3118|3118| 				this.FinishOrder();
|3119|    |-			}
|    |3119|+			
|3120|3120| 		},
|3121|3121| 
|3122|3122| 		"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
|3155|3155| 				}
|3156|3156| 				// Start attacking one of the newly-seen enemy (if any)
|3157|3157| 				else if (this.IsDangerousAnimal())
|3158|    |-				{
|    |3158|+				
|3159|3159| 					this.AttackVisibleEntity(msg.data.added);
|3160|    |-				}
|    |3160|+				
|3161|3161| 
|3162|3162| 				// TODO: if two units enter our range together, we'll attack the
|3163|3163| 				// 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
|3198|3198| 				}
|3199|3199| 				// Start attacking one of the newly-seen enemy (if any)
|3200|3200| 				else if (this.template.NaturalBehaviour == "violent")
|3201|    |-				{
|    |3201|+				
|3202|3202| 					this.AttackVisibleEntity(msg.data.added);
|3203|    |-				}
|    |3203|+				
|3204|3204| 			},
|3205|3205| 
|3206|3206| 			"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
|3215|3215| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3216|3216| 
|3217|3217| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3218|    |-							// only used for domestic animals
|    |3218|+		// only used for domestic animals
|3219|3219| 	},
|3220|3220| };
|3221|3221| 
|    | [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
|3272|3272| 
|3273|3273| UnitAI.prototype.IsAnimal = function()
|3274|3274| {
|3275|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3275|+	return (!!this.template.NaturalBehaviour);
|3276|3276| };
|3277|3277| 
|3278|3278| 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
|3310|3310| UnitAI.prototype.GetGarrisonHolder = function()
|3311|3311| {
|3312|3312| 	if (this.IsGarrisoned())
|3313|    |-	{
|    |3313|+	
|3314|3314| 		for (let order of this.orderQueue)
|3315|3315| 			if (order.type == "Garrison")
|3316|3316| 				return order.data.target;
|3317|    |-	}
|    |3317|+	
|3318|3318| 	return INVALID_ENTITY;
|3319|3319| };
|3320|3320| 
|    | [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
|3388|3388| 		{
|3389|3389| 			let index = this.GetCurrentState().indexOf(".");
|3390|3390| 			if (index != -1)
|3391|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3391|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3392|3392| 			this.Stop(false);
|3393|3393| 		}
|3394|3394| 
|    | [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
|3444|3444| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3445|3445| 			continue;
|3446|3446| 		if (i == 0)
|3447|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3447|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3448|3448| 		else
|3449|3449| 			this.orderQueue.splice(i, 1);
|3450|3450| 		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
|3444|3444| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3445|3445| 			continue;
|3446|3446| 		if (i == 0)
|3447|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3447|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3448|3448| 		else
|3449|3449| 			this.orderQueue.splice(i, 1);
|3450|3450| 		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
|3528|3528| };
|3529|3529| 
|3530|3530| 
|3531|    |-//// FSM linkage functions ////
|    |3531|+// // FSM linkage functions ////
|3532|3532| 
|3533|3533| UnitAI.prototype.SetNextState = function(state)
|3534|3534| {
|    | [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
|3702|3702| 				continue;
|3703|3703| 			if (this.orderQueue[i].type == type)
|3704|3704| 				continue;
|3705|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3705|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3706|3706| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3707|3707| 			return;
|3708|3708| 		}
|    | [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
|3702|3702| 				continue;
|3703|3703| 			if (this.orderQueue[i].type == type)
|3704|3704| 				continue;
|3705|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3705|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3706|3706| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3707|3707| 			return;
|3708|3708| 		}
|    | [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
|3716|3716| {
|3717|3717| 	// Remember the previous work orders to be able to go back to them later if required
|3718|3718| 	if (data && data.force)
|3719|    |-	{
|    |3719|+	
|3720|3720| 		if (this.IsFormationController())
|3721|3721| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3722|3722| 		else
|3723|3723| 			this.UpdateWorkOrders(type);
|3724|    |-	}
|    |3724|+	
|3725|3725| 
|3726|3726| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3727|3727| 
|    | [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
|3793|3793| 	{
|3794|3794| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3795|3795| 		if (cmpUnitAI)
|3796|    |-		{
|    |3796|+		
|3797|3797| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3798|3798| 			{
|3799|3799| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3802|3802| 					return;
|3803|3803| 				}
|3804|3804| 			}
|3805|    |-		}
|    |3805|+		
|3806|3806| 	}
|3807|3807| 
|3808|3808| 	// 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
|3795|3795| 		if (cmpUnitAI)
|3796|3796| 		{
|3797|3797| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3798|    |-			{
|    |3798|+			
|3799|3799| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3800|3800| 				{
|3801|3801| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3802|3802| 					return;
|3803|3803| 				}
|3804|    |-			}
|    |3804|+			
|3805|3805| 		}
|3806|3806| 	}
|3807|3807| 
|    | [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
|3807|3807| 
|3808|3808| 	// If nothing found, take the unit orders
|3809|3809| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3810|    |-	{
|    |3810|+	
|3811|3811| 		if (isWorkType(this.orderQueue[i].type))
|3812|3812| 		{
|3813|3813| 			this.workOrders = this.orderQueue.slice(i);
|3814|3814| 			return;
|3815|3815| 		}
|3816|    |-	}
|    |3816|+	
|3817|3817| };
|3818|3818| 
|3819|3819| 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
|3873|3873| 	if (data.timerRepeat === undefined)
|3874|3874| 		this.timer = undefined;
|3875|3875| 
|3876|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3876|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3877|3877| };
|3878|3878| 
|3879|3879| /**
|    | [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
|3873|3873| 	if (data.timerRepeat === undefined)
|3874|3874| 		this.timer = undefined;
|3875|3875| 
|3876|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3876|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3877|3877| };
|3878|3878| 
|3879|3879| /**
|    | [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
|3908|3908| 	this.timer = undefined;
|3909|3909| };
|3910|3910| 
|3911|    |-//// Message handlers /////
|    |3911|+// // Message handlers /////
|3912|3912| 
|3913|3913| UnitAI.prototype.OnMotionChanged = function(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
|3913|3913| UnitAI.prototype.OnMotionChanged = function(msg)
|3914|3914| {
|3915|3915| 	if (msg.starting && !msg.error)
|3916|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3916|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveStarted", "data": msg});
|3917|3917| 	else if (!msg.starting || msg.error)
|3918|3918| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3919|3919| };
|    | [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
|3913|3913| UnitAI.prototype.OnMotionChanged = function(msg)
|3914|3914| {
|3915|3915| 	if (msg.starting && !msg.error)
|3916|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3916|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg });
|3917|3917| 	else if (!msg.starting || msg.error)
|3918|3918| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3919|3919| };
|    | [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
|3915|3915| 	if (msg.starting && !msg.error)
|3916|3916| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3917|3917| 	else if (!msg.starting || msg.error)
|3918|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3918|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveCompleted", "data": msg});
|3919|3919| };
|3920|3920| 
|3921|3921| 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
|3915|3915| 	if (msg.starting && !msg.error)
|3916|3916| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3917|3917| 	else if (!msg.starting || msg.error)
|3918|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3918|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg });
|3919|3919| };
|3920|3920| 
|3921|3921| 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
|3923|3923| 	// TODO: This is a bit inefficient since every unit listens to every
|3924|3924| 	// construction message - ideally we could scope it to only the one we're building
|3925|3925| 
|3926|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3926|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3927|3927| };
|3928|3928| 
|3929|3929| 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
|3923|3923| 	// TODO: This is a bit inefficient since every unit listens to every
|3924|3924| 	// construction message - ideally we could scope it to only the one we're building
|3925|3925| 
|3926|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3926|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3927|3927| };
|3928|3928| 
|3929|3929| 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
|3948|3948| 
|3949|3949| UnitAI.prototype.OnAttacked = function(msg)
|3950|3950| {
|3951|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3951|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3952|3952| };
|3953|3953| 
|3954|3954| 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
|3948|3948| 
|3949|3949| UnitAI.prototype.OnAttacked = function(msg)
|3950|3950| {
|3951|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3951|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3952|3952| };
|3953|3953| 
|3954|3954| 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
|3953|3953| 
|3954|3954| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3955|3955| {
|3956|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3956|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3957|3957| };
|3958|3958| 
|3959|3959| 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
|3953|3953| 
|3954|3954| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3955|3955| {
|3956|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3956|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3957|3957| };
|3958|3958| 
|3959|3959| 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
|3958|3958| 
|3959|3959| UnitAI.prototype.OnHealthChanged = function(msg)
|3960|3960| {
|3961|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3961|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3962|3962| };
|3963|3963| 
|3964|3964| 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
|3958|3958| 
|3959|3959| UnitAI.prototype.OnHealthChanged = function(msg)
|3960|3960| {
|3961|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3961|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3962|3962| };
|3963|3963| 
|3964|3964| 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
|3964|3964| UnitAI.prototype.OnRangeUpdate = function(msg)
|3965|3965| {
|3966|3966| 	if (msg.tag == this.losRangeQuery)
|3967|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3967|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3968|3968| 	else if (msg.tag == this.losHealRangeQuery)
|3969|3969| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3970|3970| };
|    | [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
|3964|3964| UnitAI.prototype.OnRangeUpdate = function(msg)
|3965|3965| {
|3966|3966| 	if (msg.tag == this.losRangeQuery)
|3967|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3967|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3968|3968| 	else if (msg.tag == this.losHealRangeQuery)
|3969|3969| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3970|3970| };
|    | [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| 	if (msg.tag == this.losRangeQuery)
|3967|3967| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3968|3968| 	else if (msg.tag == this.losHealRangeQuery)
|3969|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3969|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3970|3970| };
|3971|3971| 
|3972|3972| 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
|3966|3966| 	if (msg.tag == this.losRangeQuery)
|3967|3967| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3968|3968| 	else if (msg.tag == this.losHealRangeQuery)
|3969|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3969|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3970|3970| };
|3971|3971| 
|3972|3972| 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
|3971|3971| 
|3972|3972| UnitAI.prototype.OnPackFinished = function(msg)
|3973|3973| {
|3974|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3974|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3975|3975| };
|3976|3976| 
|3977|3977| //// 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
|3971|3971| 
|3972|3972| UnitAI.prototype.OnPackFinished = function(msg)
|3973|3973| {
|3974|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3974|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3975|3975| };
|3976|3976| 
|3977|3977| //// 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
|3974|3974| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3975|3975| };
|3976|3976| 
|3977|    |-//// Helper functions to be called by the FSM ////
|    |3977|+// // Helper functions to be called by the FSM ////
|3978|3978| 
|3979|3979| UnitAI.prototype.GetWalkSpeed = function()
|3980|3980| {
|    | [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
|4078|4078| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4079|4079| 		return undefined;
|4080|4080| 
|4081|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4081|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4082|4082| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4083|4083| 		return undefined;
|4084|4084| 
|    | [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
|4163|4163| 			PlaySound(name, member);
|4164|4164| 	}
|4165|4165| 	else
|4166|    |-	{
|    |4166|+	
|4167|4167| 		// Otherwise use our own sounds
|4168|4168| 		PlaySound(name, this.entity);
|4169|    |-	}
|    |4169|+	
|4170|4170| };
|4171|4171| 
|4172|4172| /*
|    | [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
|4332|4332| 	else
|4333|4333| 		// return false? Or hope you come close enough?
|4334|4334| 		var parabolicMaxRange = 0;
|4335|    |-		//return false;
|    |4335|+		// return false;
|4336|4336| 
|4337|4337| 	// the parabole changes while walking, take something in the middle
|4338|4338| 	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
|4397|4397| 	if (this.IsFormationMember())
|4398|4398| 	{
|4399|4399| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4400|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4401|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4400|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4401|+			cmpFormationUnitAI.order.data.target == target)
|4402|4402| 			return true;
|4403|4403| 	}
|4404|4404| 
|    | [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
|4565|4565| UnitAI.prototype.AttackEntityInZone = function(ents)
|4566|4566| {
|4567|4567| 	var target = ents.find(target =>
|4568|    |-		this.CanAttack(target)
|4569|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4568|+		this.CanAttack(target) &&
|    |4569|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4570|4570| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4571|4571| 	);
|4572|4572| 	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
|4566|4566| {
|4567|4567| 	var target = ents.find(target =>
|4568|4568| 		this.CanAttack(target)
|4569|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4570|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4569|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4570|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4571|4571| 	);
|4572|4572| 	if (!target)
|4573|4573| 		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
|4630|4630| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4631|4631| 	if (this.isGuardOf)
|4632|4632| 	{
|4633|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4633|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4634|4634| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4635|4635| 		if (cmpUnitAI && cmpAttack &&
|4636|4636| 		    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
|4634|4634| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4635|4635| 		if (cmpUnitAI && cmpAttack &&
|4636|4636| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4637|    |-				return false;
|    |4637|+			return false;
|4638|4638| 	}
|4639|4639| 
|4640|4640| 	// 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
|4639|4639| 
|4640|4640| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4641|4641| 	if (this.GetStance().respondHoldGround)
|4642|    |-	{
|    |4642|+	
|4643|4643| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4644|4644| 			return true;
|4645|    |-	}
|    |4645|+	
|4646|4646| 
|4647|4647| 	// Stop if it's left our vision range, unless we're especially persistent
|4648|4648| 	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
|4646|4646| 
|4647|4647| 	// Stop if it's left our vision range, unless we're especially persistent
|4648|4648| 	if (!this.GetStance().respondChaseBeyondVision)
|4649|    |-	{
|    |4649|+	
|4650|4650| 		if (!this.CheckTargetIsInVisionRange(target))
|4651|4651| 			return true;
|4652|    |-	}
|    |4652|+	
|4653|4653| 
|4654|4654| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4655|4655| 	// 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
|4672|4672| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4673|4673| 	if (this.isGuardOf)
|4674|4674| 	{
|4675|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4675|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4676|4676| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4677|4677| 		if (cmpUnitAI && cmpAttack &&
|4678|4678| 		    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
|4685|4685| 	return false;
|4686|4686| };
|4687|4687| 
|4688|    |-//// External interface functions ////
|    |4688|+// // External interface functions ////
|4689|4689| 
|4690|4690| UnitAI.prototype.SetFormationController = function(ent)
|4691|4691| {
|    | [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
|4695|4695| 	// of our own formation (or ourself if not in formation)
|4696|4696| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4697|4697| 	if (cmpObstruction)
|4698|    |-	{
|    |4698|+	
|4699|4699| 		if (ent == INVALID_ENTITY)
|4700|4700| 			cmpObstruction.SetControlGroup(this.entity);
|4701|4701| 		else
|4702|4702| 			cmpObstruction.SetControlGroup(ent);
|4703|    |-	}
|    |4703|+	
|4704|4704| 
|4705|4705| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4706|4706| 	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
|4838|4838| 	// if we already had an old guard order, do nothing if the target is the same
|4839|4839| 	// and the order is running, otherwise remove the previous order
|4840|4840| 	if (this.isGuardOf)
|4841|    |-	{
|    |4841|+	
|4842|4842| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4843|4843| 			return;
|4844|4844| 		else
|4845|4845| 			this.RemoveGuard();
|4846|    |-	}
|    |4846|+	
|4847|4847| 
|4848|4848| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4849|4849| };
|    | [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
|4841|4841| 	{
|4842|4842| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4843|4843| 			return;
|4844|    |-		else
|4845|    |-			this.RemoveGuard();
|    |4844|+		this.RemoveGuard();
|4846|4845| 	}
|4847|4846| 
|4848|4847| 	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
|5012|5012| 			this.WalkToTarget(target, queued);
|5013|5013| 		return;
|5014|5014| 	}
|5015|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5015|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5016|5016| };
|5017|5017| 
|5018|5018| /**
|    | [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
|5161|5161| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5162|5162| 	{
|5163|5163| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5164|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5164|+		if (cmpTrader.HasBothMarkets() &&
|5165|5165| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5166|5166| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5167|5167| 		{
|    | [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
|5442|5442| 				{
|5443|5443| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5444|5444| 					var targetClasses = this.order.data.targetClasses;
|5445|    |-					if (targetClasses.attack && cmpIdentity
|5446|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5445|+					if (targetClasses.attack && cmpIdentity &&
|    |5446|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5447|5447| 						continue;
|5448|5448| 					if (targetClasses.avoid && cmpIdentity
|5449|5449| 						&& 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
|5445|5445| 					if (targetClasses.attack && cmpIdentity
|5446|5446| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5447|5447| 						continue;
|5448|    |-					if (targetClasses.avoid && cmpIdentity
|5449|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5448|+					if (targetClasses.avoid && cmpIdentity &&
|    |5449|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5450|5450| 						continue;
|5451|5451| 					// Only used by the AIs to prevent some choices of targets
|5452|5452| 					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
|5468|5468| 		{
|5469|5469| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5470|5470| 			var targetClasses = this.order.data.targetClasses;
|5471|    |-			if (cmpIdentity && targetClasses.attack
|5472|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5471|+			if (cmpIdentity && targetClasses.attack &&
|    |5472|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5473|5473| 				continue;
|5474|5474| 			if (cmpIdentity && targetClasses.avoid
|5475|5475| 				&& 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
|5471|5471| 			if (cmpIdentity && targetClasses.attack
|5472|5472| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5473|5473| 				continue;
|5474|    |-			if (cmpIdentity && targetClasses.avoid
|5475|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5474|+			if (cmpIdentity && targetClasses.avoid &&
|    |5475|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5476|5476| 				continue;
|5477|5477| 			// Only used by the AIs to prevent some choices of targets
|5478|5478| 			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
|5604|5604| 
|5605|5605| UnitAI.prototype.SetHeldPosition = function(x, z)
|5606|5606| {
|5607|    |-	this.heldPosition = {"x": x, "z": z};
|    |5607|+	this.heldPosition = { "x": x, "z": z};
|5608|5608| };
|5609|5609| 
|5610|5610| 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
|5604|5604| 
|5605|5605| UnitAI.prototype.SetHeldPosition = function(x, z)
|5606|5606| {
|5607|    |-	this.heldPosition = {"x": x, "z": z};
|    |5607|+	this.heldPosition = {"x": x, "z": z };
|5608|5608| };
|5609|5609| 
|5610|5610| 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
|5631|5631| 	return false;
|5632|5632| };
|5633|5633| 
|5634|    |-//// Helper functions ////
|    |5634|+// // Helper functions ////
|5635|5635| 
|5636|5636| UnitAI.prototype.CanAttack = function(target)
|5637|5637| {
|    | [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
|5835|5835| 	return cmpPack && cmpPack.IsPacking();
|5836|5836| };
|5837|5837| 
|5838|    |-//// Formation specific functions ////
|    |5838|+// // Formation specific functions ////
|5839|5839| 
|5840|5840| UnitAI.prototype.IsAttackingAsFormation = function()
|5841|5841| {
|    | [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
|5840|5840| UnitAI.prototype.IsAttackingAsFormation = function()
|5841|5841| {
|5842|5842| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5843|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5844|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5843|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5844|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5845|5845| };
|5846|5846| 
|5847|5847| //// 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
|5844|5844| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5845|5845| };
|5846|5846| 
|5847|    |-//// Animal specific functions ////
|    |5847|+// // Animal specific functions ////
|5848|5848| 
|5849|5849| UnitAI.prototype.MoveRandomly = function(distance)
|5850|5850| {

binaries/data/mods/public/simulation/components/UnitAI.js
|2413| »   »   »   »   »   »   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
|3778| »   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
|4552| »   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
|4567| »   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
|4613| »   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
|4636| »   »   ····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
|5092| »   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
|1881| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2022| »   »   »   »   »   »   &&·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
|2106| »   »   »   »   »   »   »   »   ·&&·((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
|2107| »   »   »   »   »   »   »   »   ·||·(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
|2108| »   »   »   »   »   »   »   »   ·&&·(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
|2131| »   »   »   »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(oldType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2171| »   »   »   »   »   »   »   »   &&·((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
|2172| »   »   »   »   »   »   »   »   ||·(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
|2173| »   »   »   »   »   »   »   »   &&·(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
|2218| »   »   »   »   »   »   »   ||·(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
|2219| »   »   »   »   »   »   »   &&·(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
|2235| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2427| »   »   »   »   »   »   »   ||·(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
|2428| »   »   »   »   »   »   »   &&·(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
|2448| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4345| »   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
|4401| »   »   »   &&·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
|4569| »   »   &&·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
|4570| »   »   &&·(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
|5092| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

binaries/data/mods/public/simulation/components/UnitAI.js
|5446| »   »   »   »   »   »   &&·!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
|5449| »   »   »   »   »   »   &&·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
|5462| »   var·targets·=·this.GetTargetsFromUnit();
|    | [NORMAL] JSHintBear:
|    | 'targets' is already defined.

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5472| »   »   »   »   &&·!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
|5475| »   »   »   »   &&·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
|5550| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [NORMAL] JSHintBear:
|    | 'cmpVision' is already defined.

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

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

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

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

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

@bb Does this still use farthest/farthest ?
I've re-read the above discussion and I'm changing my mind, I think closest-closest makes the most sense given our current game design. If we were to implement realistically what 'min-range' is supposed to be, we'd do a whole different thing.

In which case this can be committed.

wraitii requested changes to this revision.Jan 2 2019, 6:52 PM

This ends up crashing because it sends unitAI in an infinite loop... From example in commands:


In some cases (such as Formation Order.Attack), unitAI first does a range check using the obstructionManager, then asks to move in-range, but UnitMotion's MoveToTargetRange goes through its 'circle approximation' and the results between ObstructionManager and UnitMotion are contradictory, so unitAI doesn't know how to answer and this triggers an infinite recursion and the stack bails.

I think UnitAI is buggy in this case regardless since it expects CheckTargetAttackRange and MoveToTargetAttackRange to always return coherent results (which they don't - probably ought to but guaranteeing that is hard), but I'm asking for input.

This revision now requires changes to proceed.Jan 2 2019, 6:52 PM

I fix this issue in D13 by never having MoveToFooRange return 'false', since UnitAI never handles it correctly and it makes no sense anyways - if unitAI wants to do nothing when in range it should just do a range check (which it does anyways so really…).

wraitii accepted this revision.May 13 2019, 3:46 PM

I've reviewed the code and it looks good - though I would publicly expose "DistanceBetweenShapes" too.

However this requires D1865 before committing otherwise it sends unitAI in an infinite loop.

This revision is now accepted and ready to land.May 13 2019, 3:46 PM
wraitii commandeered this revision.May 28 2019, 1:40 PM
wraitii edited reviewers, added: bb; removed: wraitii.
This revision now requires review to proceed.May 28 2019, 1:40 PM
wraitii updated this revision to Diff 8184.May 28 2019, 1:41 PM

Commandeering: rebased on top of rP22313, add "DistanceBetweenShapes" to the interface.

Will commit soon enough

Stan added inline comments.May 28 2019, 1:53 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1646 ↗(On Diff #8184)

var → let.

4443 ↗(On Diff #8184)

var → let.

4449 ↗(On Diff #8184)

var → let.

4452 ↗(On Diff #8184)

var → let.

4454 ↗(On Diff #8184)

var → let.

4503 ↗(On Diff #8184)

var → let.

4509 ↗(On Diff #8184)

var → let.

4524 ↗(On Diff #8184)

var → let.

source/simulation2/components/CCmpObstructionManager.cpp
725 ↗(On Diff #8184)

Is GetSimContext() slow ? Maybe we could cache it ?

743 ↗(On Diff #8184)

Same here.

768 ↗(On Diff #8184)

Why check the square after the sphere ?

Ifs could be merged :) target.hh == fixed::Zero() is checked every time.

787 ↗(On Diff #8184)

Maybe the two functions could be unified somehow, it's basically the same code... with one function difference.

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

Linter detected issues:
Executing section Source...

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

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

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

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

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

source/simulation2/components/CCmpObstructionManager.cpp
|   1| /*·Copyright·(C)·2018·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2019" year instead of "2018"
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
| 299| 299| UnitMotionFlying.prototype.GetSpeedMultiplier = function()
| 300| 300| {
| 301| 301| 	return this.GetCurrentSpeed() / this.GetWalkSpeed();
| 302|    |-}
|    | 302|+};
| 303| 303| 
| 304| 304| UnitMotionFlying.prototype.GetPassabilityClassName = function()
| 305| 305| {
|    | [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
| 323| 323| 
| 324| 324| UnitMotionFlying.prototype.StopMoving = function()
| 325| 325| {
| 326|    |-	//Invert
|    | 326|+	// Invert
| 327| 327| 	if (!this.waterDeath)
| 328| 328| 		this.landing = !this.landing;
| 329| 329| 

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  47| »   »   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
| 223| »   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
| 315| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 310| »   »   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
| 319| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [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
| 356| 356| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 357| 357| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 358| 358| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 359|    |-		{
|    | 359|+		
| 360| 360| 			// we were already on the shoreline, and have not moved since
| 361| 361| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 362| 362| 				needToMove = false;
| 363|    |-		}
|    | 363|+		
| 364| 364| 
| 365| 365| 		if (needToMove)
| 366| 366| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
|    | [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
| 354| 354| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 355| 355| 		var needToMove = true;
| 356| 356| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 357|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 358|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 357|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 358|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 359| 359| 		{
| 360| 360| 			// we were already on the shoreline, and have not moved since
| 361| 361| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [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
| 519| 519| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 520| 520| 				}
| 521| 521| 				else
| 522|    |-				{
|    | 522|+				
| 523| 523| 					// We couldn't move there, or the target moved away
| 524| 524| 					this.FinishOrder();
| 525|    |-				}
|    | 525|+				
| 526| 526| 				return;
| 527| 527| 			}
| 528| 528| 
|    | [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
| 734| 734| 			}
| 735| 735| 			// Check if we are already in range, otherwise walk there
| 736| 736| 			if (!this.CheckGarrisonRange(msg.data.target))
| 737|    |-			{
|    | 737|+			
| 738| 738| 				if (!this.CheckTargetVisible(msg.data.target))
| 739| 739| 				{
| 740| 740| 					this.FinishOrder();
| 745| 745| 					this.SetNextState("GARRISON.APPROACHING");
| 746| 746| 					return;
| 747| 747| 				}
| 748|    |-			}
|    | 748|+			
| 749| 749| 
| 750| 750| 			this.SetNextState("GARRISON.GARRISONING");
| 751| 751| 		},
|    | [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
| 740| 740| 					this.FinishOrder();
| 741| 741| 					return;
| 742| 742| 				}
| 743|    |-				else
| 744|    |-				{
|    | 743|+				
| 745| 744| 					this.SetNextState("GARRISON.APPROACHING");
| 746| 745| 					return;
| 747|    |-				}
|    | 746|+				
| 748| 747| 			}
| 749| 748| 
| 750| 749| 			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
| 763| 763| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 764| 764| 					}
| 765| 765| 					else
| 766|    |-					{
|    | 766|+					
| 767| 767| 						// We couldn't move there, or the target moved away
| 768| 768| 						this.FinishOrder();
| 769|    |-					}
|    | 769|+					
| 770| 770| 					return;
| 771| 771| 				}
| 772| 772| 
|    | [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
|1011|1011| 			},
|1012|1012| 		},
|1013|1013| 
|1014|    |-		"GARRISON":{
|    |1014|+		"GARRISON": {
|1015|1015| 			"enter": function() {
|1016|1016| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1017|1017| 				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
|1231|1231| 			// If the controller handled an order but some members rejected it,
|1232|1232| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1233|1233| 			if (this.orderQueue.length)
|1234|    |-			{
|    |1234|+			
|1235|1235| 				// We're leaving the formation, so stop our FormationWalk order
|1236|1236| 				if (this.FinishOrder())
|1237|1237| 					return;
|1238|    |-			}
|    |1238|+			
|1239|1239| 
|1240|1240| 			// No orders left, we're an individual now
|1241|1241| 			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
|1259|1259| 			// Move a tile outside the building
|1260|1260| 			let range = 4;
|1261|1261| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1262|    |-			{
|    |1262|+			
|1263|1263| 				// We are already at the target, or can't move at all
|1264|1264| 				this.FinishOrder();
|1265|    |-			}
|    |1265|+			
|1266|1266| 			else
|1267|1267| 			{
|1268|1268| 				this.order.data.min = range;
|    | [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
|1474|1474| 
|1475|1475| 			"LosRangeUpdate": function(msg) {
|1476|1476| 				if (this.GetStance().targetVisibleEnemies)
|1477|    |-				{
|    |1477|+				
|1478|1478| 					// Start attacking one of the newly-seen enemy (if any)
|1479|1479| 					this.AttackEntitiesByPreference(msg.data.added);
|1480|    |-				}
|    |1480|+				
|1481|1481| 			},
|1482|1482| 
|1483|1483| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1511|1511| 				this.SelectAnimation("move");
|1512|1512| 			},
|1513|1513| 
|1514|    |-			"leave": function () {
|    |1514|+			"leave": function() {
|1515|1515| 				this.SelectAnimation("idle");
|1516|1516| 				this.StopMoving();
|1517|1517| 			},
|    | [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
|1688|1688| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1689|1689| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1690|1690| 						if (cmpHealth && cmpHealth.IsInjured())
|1691|    |-						{
|    |1691|+						
|1692|1692| 							if (this.CanHeal(this.isGuardOf))
|1693|1693| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1694|1694| 							else if (this.CanRepair(this.isGuardOf))
|1695|1695| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1696|    |-						}
|    |1696|+						
|1697|1697| 					}
|1698|1698| 				},
|1699|1699| 
|    | [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
|1791|1791| 				"MoveCompleted": function() {
|1792|1792| 
|1793|1793| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1794|    |-					{
|    |1794|+					
|1795|1795| 						// If the unit needs to unpack, do so
|1796|1796| 						if (this.CanUnpack())
|1797|1797| 						{
|1800|1800| 						}
|1801|1801| 						else
|1802|1802| 							this.SetNextState("ATTACKING");
|1803|    |-					}
|    |1803|+					
|1804|1804| 					else
|1805|1805| 					{
|1806|1806| 						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
|1798|1798| 							this.PushOrderFront("Unpack", { "force": true });
|1799|1799| 							return;
|1800|1800| 						}
|1801|    |-						else
|1802|    |-							this.SetNextState("ATTACKING");
|    |1801|+						this.SetNextState("ATTACKING");
|1803|1802| 					}
|1804|1803| 					else
|1805|1804| 					{
|    | [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
|1802|1802| 							this.SetNextState("ATTACKING");
|1803|1803| 					}
|1804|1804| 					else
|1805|    |-					{
|    |1805|+					
|1806|1806| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1807|1807| 						{
|1808|1808| 							this.SetNextState("APPROACHING");
|1812|1812| 							// Give up
|1813|1813| 							this.FinishOrder();
|1814|1814| 						}
|1815|    |-					}
|    |1815|+					
|1816|1816| 				},
|1817|1817| 			},
|1818|1818| 
|    | [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
|1804|1804| 					else
|1805|1805| 					{
|1806|1806| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1807|    |-						{
|    |1807|+						
|1808|1808| 							this.SetNextState("APPROACHING");
|1809|    |-						}
|    |1809|+						
|1810|1810| 						else
|1811|1811| 						{
|1812|1812| 							// 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
|1808|1808| 							this.SetNextState("APPROACHING");
|1809|1809| 						}
|1810|1810| 						else
|1811|    |-						{
|    |1811|+						
|1812|1812| 							// Give up
|1813|1813| 							this.FinishOrder();
|1814|    |-						}
|    |1814|+						
|1815|1815| 					}
|1816|1816| 				},
|1817|1817| 			},
|    | [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
|1829|1829| 					}
|1830|1830| 					// Check the target is still alive and attackable
|1831|1831| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1832|    |-					{
|    |1832|+					
|1833|1833| 						// Can't reach it - try to chase after it
|1834|1834| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1835|1835| 						{
|1844|1844| 								return;
|1845|1845| 							}
|1846|1846| 						}
|1847|    |-					}
|    |1847|+					
|1848|1848| 
|1849|1849| 					this.StopMoving();
|1850|1850| 
|    | [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
|1877|1877| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1878|1878| 
|1879|1879| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1880|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1880|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1881|1881| 
|1882|1882| 					this.FaceTowardsTarget(this.order.data.target);
|1883|1883| 
|    | [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
|2006|2006| 
|2007|2007| 				"Attacked": function(msg) {
|2008|2008| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2009|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2010|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2009|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2010|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2011|2011| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2012|2012| 				},
|2013|2013| 			},
|    | [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
|2026|2026| 					this.SelectAnimation("move");
|2027|2027| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2028|2028| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2029|    |-					{
|    |2029|+					
|2030|2030| 						// Run after a fleeing target
|2031|2031| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2032|    |-					}
|    |2032|+					
|2033|2033| 					this.StartTimer(1000, 1000);
|2034|2034| 				},
|2035|2035| 
|    | [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
|2085|2085| 						// Also don't switch to a different type of huntable animal
|2086|2086| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2087|2087| 							return (
|2088|    |-								ent != oldTarget
|2089|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2088|+								ent != oldTarget &&
|    |2089|+								 ((type.generic == "treasure" && oldType.generic == "treasure")
|2090|2090| 								 || (type.specific == oldType.specific
|2091|2091| 								 && (type.specific != "meat" || oldTemplate == template)))
|2092|2092| 							);
|    | [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
|2086|2086| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2087|2087| 							return (
|2088|2088| 								ent != oldTarget
|2089|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2090|    |-								 || (type.specific == oldType.specific
|    |2089|+								 && ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2090|+								 (type.specific == oldType.specific
|2091|2091| 								 && (type.specific != "meat" || oldTemplate == template)))
|2092|2092| 							);
|2093|2093| 						}, 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
|2087|2087| 							return (
|2088|2088| 								ent != oldTarget
|2089|2089| 								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2090|    |-								 || (type.specific == oldType.specific
|2091|    |-								 && (type.specific != "meat" || oldTemplate == template)))
|    |2090|+								 || (type.specific == oldType.specific &&
|    |2091|+								 (type.specific != "meat" || oldTemplate == template)))
|2092|2092| 							);
|2093|2093| 						}, oldTarget);
|2094|2094| 						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
|2096|2096| 							this.PerformGather(nearby, false, false);
|2097|2097| 							return true;
|2098|2098| 						}
|2099|    |-						else
|2100|    |-						{
|    |2099|+						
|2101|2100| 							// It's probably better in this case, to avoid units getting stuck around a dropsite
|2102|2101| 							// in a "Target is far away, full, nearby are no good resources, return to dropsite" loop
|2103|2102| 							// to order it to GatherNear the resource position.
|2118|2117| 									return true;
|2119|2118| 								}
|2120|2119| 							}
|2121|    |-						}
|    |2120|+						
|2122|2121| 						return true;
|2123|2122| 					}
|2124|2123| 
|    | [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.GatherNearPosition(pos.x, pos.z, oldType, oldTemplate);
|2109|2109| 								return true;
|2110|2110| 							}
|2111|    |-							else
|2112|    |-							{
|    |2111|+							
|2113|2112| 								// we're kind of stuck here. Return resource.
|2114|2113| 								var nearby = this.FindNearestDropsite(oldType.generic);
|2115|2114| 								if (nearby)
|2117|2116| 									this.PushOrderFront("ReturnResource", { "target": nearby, "force": false });
|2118|2117| 									return true;
|2119|2118| 								}
|2120|    |-							}
|    |2119|+							
|2121|2120| 						}
|2122|2121| 						return true;
|2123|2122| 					}
|    | [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
|2160|2160| 						// Also don't switch to a different type of huntable animal
|2161|2161| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2162|2162| 							return (
|2163|    |-								ent != oldTarget
|2164|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2163|+								ent != oldTarget &&
|    |2164|+								((type.generic == "treasure" && oldType.generic == "treasure")
|2165|2165| 								|| (type.specific == oldType.specific
|2166|2166| 								&& (type.specific != "meat" || oldTemplate == template)))
|2167|2167| 							);
|    | [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
|2161|2161| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2162|2162| 							return (
|2163|2163| 								ent != oldTarget
|2164|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2165|    |-								|| (type.specific == oldType.specific
|    |2164|+								&& ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2165|+								(type.specific == oldType.specific
|2166|2166| 								&& (type.specific != "meat" || oldTemplate == template)))
|2167|2167| 							);
|2168|2168| 						});
|    | [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| 							return (
|2163|2163| 								ent != oldTarget
|2164|2164| 								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2165|    |-								|| (type.specific == oldType.specific
|2166|    |-								&& (type.specific != "meat" || oldTemplate == template)))
|    |2165|+								|| (type.specific == oldType.specific &&
|    |2166|+								(type.specific != "meat" || oldTemplate == template)))
|2167|2167| 							);
|2168|2168| 						});
|2169|2169| 						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
|2220|2220| 					// Also don't switch to a different type of huntable animal
|2221|2221| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2222|2222| 						return (
|2223|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2224|    |-							|| (type.specific == resourceType.specific
|    |2223|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2224|+							(type.specific == resourceType.specific
|2225|2225| 							&& (type.specific != "meat" || resourceTemplate == template))
|2226|2226| 						);
|2227|2227| 					});
|    | [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
|2221|2221| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2222|2222| 						return (
|2223|2223| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2224|    |-							|| (type.specific == resourceType.specific
|2225|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2224|+							|| (type.specific == resourceType.specific &&
|    |2225|+							(type.specific != "meat" || resourceTemplate == template))
|2226|2226| 						);
|2227|2227| 					});
|2228|2228| 
|    | [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
|2338|2338| 
|2339|2339| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2340|2340| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2341|    |-					{
|    |2341|+					
|2342|2342| 						// Check we can still reach and gather from the target
|2343|2343| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2344|2344| 						{
|2403|2403| 								return;
|2404|2404| 							}
|2405|2405| 						}
|2406|    |-					}
|    |2406|+					
|2407|2407| 
|2408|2408| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2409|2409| 
|    | [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
|2429|2429| 					// Also don't switch to a different type of huntable animal
|2430|2430| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2431|2431| 						return (
|2432|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2433|    |-							|| (type.specific == resourceType.specific
|    |2432|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2433|+							(type.specific == resourceType.specific
|2434|2434| 							&& (type.specific != "meat" || resourceTemplate == template))
|2435|2435| 						);
|2436|2436| 					});
|    | [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
|2430|2430| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2431|2431| 						return (
|2432|2432| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2433|    |-							|| (type.specific == resourceType.specific
|2434|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2433|+							|| (type.specific == resourceType.specific &&
|    |2434|+							(type.specific != "meat" || resourceTemplate == template))
|2435|2435| 						);
|2436|2436| 					});
|2437|2437| 					if (nearby)
|    | [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
|2495|2495| 
|2496|2496| 				"Timer": function(msg) {
|2497|2497| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2498|    |-					{
|    |2498|+					
|2499|2499| 						// Return to our original position unless we have a better order.
|2500|2500| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2501|2501| 							this.WalkToHeldPosition();
|2502|    |-					}
|    |2502|+					
|2503|2503| 				},
|2504|2504| 
|2505|2505| 				"MoveCompleted": function() {
|    | [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
|2529|2529| 					this.StartTimer(prepare, this.healTimers.repeat);
|2530|2530| 
|2531|2531| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2532|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2532|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2533|2533| 
|2534|2534| 					this.FaceTowardsTarget(this.order.data.target);
|2535|2535| 				},
|    | [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
|2741|2741| 					{
|2742|2742| 						// The building was already finished/fully repaired before we arrived;
|2743|2743| 						// let the ConstructionFinished handler handle this.
|2744|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2744|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2745|2745| 						return true;
|2746|2746| 					}
|2747|2747| 
|    | [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
|2741|2741| 					{
|2742|2742| 						// The building was already finished/fully repaired before we arrived;
|2743|2743| 						// let the ConstructionFinished handler handle this.
|2744|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2744|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2745|2745| 						return true;
|2746|2746| 					}
|2747|2747| 
|    | [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
|2784|2784| 					if (!inRange && this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2785|2785| 						this.SetNextState("APPROACHING");
|2786|2786| 					else if (!inRange)
|2787|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2787|+						this.FinishOrder(); // can't approach and isn't in reach
|2788|2788| 				},
|2789|2789| 			},
|2790|2790| 
|    | [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
|2871|2871| 
|2872|2872| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2873|2873| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2874|    |-				{
|    |2874|+				
|2875|2875| 					// We're already walking to the given point, so add this as a order.
|2876|2876| 					this.WalkToTarget(msg.data.newentity, true);
|2877|    |-				}
|    |2877|+				
|2878|2878| 			},
|2879|2879| 		},
|2880|2880| 
|    | [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
|2933|2933| 
|2934|2934| 					// Check that we can garrison here
|2935|2935| 					if (this.CanGarrison(target))
|2936|    |-					{
|    |2936|+					
|2937|2937| 						// Check that we're in range of the garrison target
|2938|2938| 						if (this.CheckGarrisonRange(target))
|2939|2939| 						{
|3009|3009| 								return false;
|3010|3010| 							}
|3011|3011| 						}
|3012|    |-					}
|    |3012|+					
|3013|3013| 					// Garrisoning failed for some reason, so finish the order
|3014|3014| 					this.FinishOrder();
|3015|3015| 					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
|3130|3130| 		"Attacked": function(msg) {
|3131|3131| 			if (this.template.NaturalBehaviour == "skittish" ||
|3132|3132| 			    this.template.NaturalBehaviour == "passive")
|3133|    |-			{
|    |3133|+			
|3134|3134| 				this.Flee(msg.data.attacker, false);
|3135|    |-			}
|    |3135|+			
|3136|3136| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3137|3137| 			{
|3138|3138| 				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
|3139|3139| 					this.Attack(msg.data.attacker, false);
|3140|3140| 			}
|3141|3141| 			else if (this.template.NaturalBehaviour == "domestic")
|3142|    |-			{
|    |3142|+			
|3143|3143| 				// Never flee, stop what we were doing
|3144|3144| 				this.SetNextState("IDLE");
|3145|    |-			}
|    |3145|+			
|3146|3146| 		},
|3147|3147| 
|3148|3148| 		"Order.LeaveFoundation": function(msg) {
|    | [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
|3153|3153| 				this.FinishOrder();
|3154|3154| 				return;
|3155|3155| 			}
|3156|    |-			else
|3157|    |-			{
|    |3156|+			
|3158|3157| 				this.order.data.min = range;
|3159|3158| 				this.SetNextState("WALKING");
|3160|    |-			}
|    |3159|+			
|3161|3160| 		},
|3162|3161| 
|3163|3162| 		"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
|3197|3197| 				}
|3198|3198| 				// Start attacking one of the newly-seen enemy (if any)
|3199|3199| 				else if (this.IsDangerousAnimal())
|3200|    |-				{
|    |3200|+				
|3201|3201| 					this.AttackVisibleEntity(msg.data.added);
|3202|    |-				}
|    |3202|+				
|3203|3203| 
|3204|3204| 				// TODO: if two units enter our range together, we'll attack the
|3205|3205| 				// 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
|3240|3240| 				}
|3241|3241| 				// Start attacking one of the newly-seen enemy (if any)
|3242|3242| 				else if (this.template.NaturalBehaviour == "violent")
|3243|    |-				{
|    |3243|+				
|3244|3244| 					this.AttackVisibleEntity(msg.data.added);
|3245|    |-				}
|    |3245|+				
|3246|3246| 			},
|3247|3247| 
|3248|3248| 			"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
|3257|3257| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3258|3258| 
|3259|3259| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3260|    |-							// only used for domestic animals
|    |3260|+		// only used for domestic animals
|3261|3261| 	},
|3262|3262| };
|3263|3263| 
|    | [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
|3314|3314| 
|3315|3315| UnitAI.prototype.IsAnimal = function()
|3316|3316| {
|3317|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3317|+	return (!!this.template.NaturalBehaviour);
|3318|3318| };
|3319|3319| 
|3320|3320| 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
|3352|3352| UnitAI.prototype.GetGarrisonHolder = function()
|3353|3353| {
|3354|3354| 	if (this.IsGarrisoned())
|3355|    |-	{
|    |3355|+	
|3356|3356| 		for (let order of this.orderQueue)
|3357|3357| 			if (order.type == "Garrison")
|3358|3358| 				return order.data.target;
|3359|    |-	}
|    |3359|+	
|3360|3360| 	return INVALID_ENTITY;
|3361|3361| };
|3362|3362| 
|    | [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
|3430|3430| 		{
|3431|3431| 			let index = this.GetCurrentState().indexOf(".");
|3432|3432| 			if (index != -1)
|3433|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3433|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3434|3434| 			this.Stop(false);
|3435|3435| 		}
|3436|3436| 
|    | [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
|3486|3486| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3487|3487| 			continue;
|3488|3488| 		if (i == 0)
|3489|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3489|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3490|3490| 		else
|3491|3491| 			this.orderQueue.splice(i, 1);
|3492|3492| 		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
|3486|3486| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3487|3487| 			continue;
|3488|3488| 		if (i == 0)
|3489|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3489|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3490|3490| 		else
|3491|3491| 			this.orderQueue.splice(i, 1);
|3492|3492| 		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
|3570|3570| };
|3571|3571| 
|3572|3572| 
|3573|    |-//// FSM linkage functions ////
|    |3573|+// // FSM linkage functions ////
|3574|3574| 
|3575|3575| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3576|3576| 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
|3742|3742| 				continue;
|3743|3743| 			if (this.orderQueue[i].type == type)
|3744|3744| 				continue;
|3745|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3745|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3746|3746| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3747|3747| 			return;
|3748|3748| 		}
|    | [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
|3742|3742| 				continue;
|3743|3743| 			if (this.orderQueue[i].type == type)
|3744|3744| 				continue;
|3745|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3745|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3746|3746| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3747|3747| 			return;
|3748|3748| 		}
|    | [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
|3756|3756| {
|3757|3757| 	// Remember the previous work orders to be able to go back to them later if required
|3758|3758| 	if (data && data.force)
|3759|    |-	{
|    |3759|+	
|3760|3760| 		if (this.IsFormationController())
|3761|3761| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3762|3762| 		else
|3763|3763| 			this.UpdateWorkOrders(type);
|3764|    |-	}
|    |3764|+	
|3765|3765| 
|3766|3766| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3767|3767| 
|    | [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
|3833|3833| 	{
|3834|3834| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3835|3835| 		if (cmpUnitAI)
|3836|    |-		{
|    |3836|+		
|3837|3837| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3838|3838| 			{
|3839|3839| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3842|3842| 					return;
|3843|3843| 				}
|3844|3844| 			}
|3845|    |-		}
|    |3845|+		
|3846|3846| 	}
|3847|3847| 
|3848|3848| 	// 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
|3835|3835| 		if (cmpUnitAI)
|3836|3836| 		{
|3837|3837| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3838|    |-			{
|    |3838|+			
|3839|3839| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3840|3840| 				{
|3841|3841| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3842|3842| 					return;
|3843|3843| 				}
|3844|    |-			}
|    |3844|+			
|3845|3845| 		}
|3846|3846| 	}
|3847|3847| 
|    | [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
|3847|3847| 
|3848|3848| 	// If nothing found, take the unit orders
|3849|3849| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3850|    |-	{
|    |3850|+	
|3851|3851| 		if (isWorkType(this.orderQueue[i].type))
|3852|3852| 		{
|3853|3853| 			this.workOrders = this.orderQueue.slice(i);
|3854|3854| 			return;
|3855|3855| 		}
|3856|    |-	}
|    |3856|+	
|3857|3857| };
|3858|3858| 
|3859|3859| 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
|3913|3913| 	if (data.timerRepeat === undefined)
|3914|3914| 		this.timer = undefined;
|3915|3915| 
|3916|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3916|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3917|3917| };
|3918|3918| 
|3919|3919| /**
|    | [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
|3913|3913| 	if (data.timerRepeat === undefined)
|3914|3914| 		this.timer = undefined;
|3915|3915| 
|3916|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3916|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3917|3917| };
|3918|3918| 
|3919|3919| /**
|    | [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
|3948|3948| 	this.timer = undefined;
|3949|3949| };
|3950|3950| 
|3951|    |-//// Message handlers /////
|    |3951|+// // Message handlers /////
|3952|3952| 
|3953|3953| UnitAI.prototype.OnMotionChanged = function(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
|3953|3953| UnitAI.prototype.OnMotionChanged = function(msg)
|3954|3954| {
|3955|3955| 	if (msg.starting && !msg.error)
|3956|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3956|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveStarted", "data": msg});
|3957|3957| 	else if (!msg.starting || msg.error)
|3958|3958| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3959|3959| };
|    | [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| UnitAI.prototype.OnMotionChanged = function(msg)
|3954|3954| {
|3955|3955| 	if (msg.starting && !msg.error)
|3956|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3956|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg });
|3957|3957| 	else if (!msg.starting || msg.error)
|3958|3958| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3959|3959| };
|    | [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| 	if (msg.starting && !msg.error)
|3956|3956| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3957|3957| 	else if (!msg.starting || msg.error)
|3958|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3958|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveCompleted", "data": msg});
|3959|3959| };
|3960|3960| 
|3961|3961| 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
|3955|3955| 	if (msg.starting && !msg.error)
|3956|3956| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3957|3957| 	else if (!msg.starting || msg.error)
|3958|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3958|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg });
|3959|3959| };
|3960|3960| 
|3961|3961| 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
|3963|3963| 	// TODO: This is a bit inefficient since every unit listens to every
|3964|3964| 	// construction message - ideally we could scope it to only the one we're building
|3965|3965| 
|3966|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3966|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3967|3967| };
|3968|3968| 
|3969|3969| 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
|3963|3963| 	// TODO: This is a bit inefficient since every unit listens to every
|3964|3964| 	// construction message - ideally we could scope it to only the one we're building
|3965|3965| 
|3966|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3966|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3967|3967| };
|3968|3968| 
|3969|3969| 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
|3988|3988| 
|3989|3989| UnitAI.prototype.OnAttacked = function(msg)
|3990|3990| {
|3991|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3991|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3992|3992| };
|3993|3993| 
|3994|3994| 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
|3988|3988| 
|3989|3989| UnitAI.prototype.OnAttacked = function(msg)
|3990|3990| {
|3991|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3991|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3992|3992| };
|3993|3993| 
|3994|3994| 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
|3993|3993| 
|3994|3994| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3995|3995| {
|3996|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3996|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3997|3997| };
|3998|3998| 
|3999|3999| 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
|3993|3993| 
|3994|3994| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3995|3995| {
|3996|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3996|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3997|3997| };
|3998|3998| 
|3999|3999| 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
|3998|3998| 
|3999|3999| UnitAI.prototype.OnHealthChanged = function(msg)
|4000|4000| {
|4001|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4001|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4002|4002| };
|4003|4003| 
|4004|4004| 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
|3998|3998| 
|3999|3999| UnitAI.prototype.OnHealthChanged = function(msg)
|4000|4000| {
|4001|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4001|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4002|4002| };
|4003|4003| 
|4004|4004| 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
|4004|4004| UnitAI.prototype.OnRangeUpdate = function(msg)
|4005|4005| {
|4006|4006| 	if (msg.tag == this.losRangeQuery)
|4007|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4007|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4008|4008| 	else if (msg.tag == this.losHealRangeQuery)
|4009|4009| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4010|4010| };
|    | [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
|4004|4004| UnitAI.prototype.OnRangeUpdate = function(msg)
|4005|4005| {
|4006|4006| 	if (msg.tag == this.losRangeQuery)
|4007|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4007|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4008|4008| 	else if (msg.tag == this.losHealRangeQuery)
|4009|4009| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4010|4010| };
|    | [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
|4006|4006| 	if (msg.tag == this.losRangeQuery)
|4007|4007| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4008|4008| 	else if (msg.tag == this.losHealRangeQuery)
|4009|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4009|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4010|4010| };
|4011|4011| 
|4012|4012| 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
|4006|4006| 	if (msg.tag == this.losRangeQuery)
|4007|4007| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4008|4008| 	else if (msg.tag == this.losHealRangeQuery)
|4009|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4009|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4010|4010| };
|4011|4011| 
|4012|4012| 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
|4011|4011| 
|4012|4012| UnitAI.prototype.OnPackFinished = function(msg)
|4013|4013| {
|4014|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4014|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4015|4015| };
|4016|4016| 
|4017|4017| //// 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
|4011|4011| 
|4012|4012| UnitAI.prototype.OnPackFinished = function(msg)
|4013|4013| {
|4014|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4014|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4015|4015| };
|4016|4016| 
|4017|4017| //// 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
|4014|4014| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4015|4015| };
|4016|4016| 
|4017|    |-//// Helper functions to be called by the FSM ////
|    |4017|+// // Helper functions to be called by the FSM ////
|4018|4018| 
|4019|4019| UnitAI.prototype.GetWalkSpeed = function()
|4020|4020| {
|    | [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
|4116|4116| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4117|4117| 		return undefined;
|4118|4118| 
|4119|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4119|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4120|4120| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4121|4121| 		return undefined;
|4122|4122| 
|    | [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
|4201|4201| 			PlaySound(name, member);
|4202|4202| 	}
|4203|4203| 	else
|4204|    |-	{
|    |4204|+	
|4205|4205| 		// Otherwise use our own sounds
|4206|4206| 		PlaySound(name, this.entity);
|4207|    |-	}
|    |4207|+	
|4208|4208| };
|4209|4209| 
|4210|4210| /*
|    | [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
|4297|4297| UnitAI.prototype.MoveTo = function(data, iid, type)
|4298|4298| {
|4299|4299| 	if (data["target"])
|4300|    |-	{
|    |4300|+	
|4301|4301| 		if (data["min"] || data["max"])
|4302|4302| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4303|4303| 		else
|4307|4307| 			else
|4308|4308| 				return this.MoveToTargetRange(data.target, iid, type);
|4309|4309| 		}
|4310|    |-	}
|    |4310|+	
|4311|4311| 	else
|4312|4312| 	{
|4313|4313| 		if (data["min"] || data["max"])
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["target"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4296|4296|  */
|4297|4297| UnitAI.prototype.MoveTo = function(data, iid, type)
|4298|4298| {
|4299|    |-	if (data["target"])
|    |4299|+	if (data.target)
|4300|4300| 	{
|4301|4301| 		if (data["min"] || data["max"])
|4302|4302| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["min"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4298|4298| {
|4299|4299| 	if (data["target"])
|4300|4300| 	{
|4301|    |-		if (data["min"] || data["max"])
|    |4301|+		if (data.min || data["max"])
|4302|4302| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4303|4303| 		else
|4304|4304| 		{
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["max"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4298|4298| {
|4299|4299| 	if (data["target"])
|4300|4300| 	{
|4301|    |-		if (data["min"] || data["max"])
|    |4301|+		if (data["min"] || data.max)
|4302|4302| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4303|4303| 		else
|4304|4304| 		{
|    | [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
|4301|4301| 		if (data["min"] || data["max"])
|4302|4302| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4303|4303| 		else
|4304|    |-		{
|    |4304|+		
|4305|4305| 			if (!iid)
|4306|4306| 				return this.MoveToTarget(data.target);
|4307|4307| 			else
|4308|4308| 				return this.MoveToTargetRange(data.target, iid, type);
|4309|    |-		}
|    |4309|+		
|4310|4310| 	}
|4311|4311| 	else
|4312|4312| 	{
|    | [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
|4300|4300| 	{
|4301|4301| 		if (data["min"] || data["max"])
|4302|4302| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4303|    |-		else
|4304|    |-		{
|    |4303|+		
|4305|4304| 			if (!iid)
|4306|4305| 				return this.MoveToTarget(data.target);
|4307|4306| 			else
|4308|4307| 				return this.MoveToTargetRange(data.target, iid, type);
|4309|    |-		}
|    |4308|+		
|4310|4309| 	}
|4311|4310| 	else
|4312|4311| 	{
|    | [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
|4304|4304| 		{
|4305|4305| 			if (!iid)
|4306|4306| 				return this.MoveToTarget(data.target);
|4307|    |-			else
|4308|    |-				return this.MoveToTargetRange(data.target, iid, type);
|    |4307|+			return this.MoveToTargetRange(data.target, iid, type);
|4309|4308| 		}
|4310|4309| 	}
|4311|4310| 	else
|    | [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
|4309|4309| 		}
|4310|4310| 	}
|4311|4311| 	else
|4312|    |-	{
|    |4312|+	
|4313|4313| 		if (data["min"] || data["max"])
|4314|4314| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4315|4315| 		else
|4316|4316| 			return this.MoveToPoint(data.x, data.z);
|4317|    |-	}
|    |4317|+	
|4318|4318| }
|4319|4319| 
|4320|4320| UnitAI.prototype.MoveToPoint = function(x, z)
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["min"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4310|4310| 	}
|4311|4311| 	else
|4312|4312| 	{
|4313|    |-		if (data["min"] || data["max"])
|    |4313|+		if (data.min || data["max"])
|4314|4314| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4315|4315| 		else
|4316|4316| 			return this.MoveToPoint(data.x, data.z);
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["max"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4310|4310| 	}
|4311|4311| 	else
|4312|4312| 	{
|4313|    |-		if (data["min"] || data["max"])
|    |4313|+		if (data["min"] || data.max)
|4314|4314| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4315|4315| 		else
|4316|4316| 			return this.MoveToPoint(data.x, data.z);
|    | [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
|4312|4312| 	{
|4313|4313| 		if (data["min"] || data["max"])
|4314|4314| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4315|    |-		else
|4316|    |-			return this.MoveToPoint(data.x, data.z);
|    |4315|+		return this.MoveToPoint(data.x, data.z);
|4317|4316| 	}
|4318|4317| }
|4319|4318| 
|    | [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
|4315|4315| 		else
|4316|4316| 			return this.MoveToPoint(data.x, data.z);
|4317|4317| 	}
|4318|    |-}
|    |4318|+};
|4319|4319| 
|4320|4320| UnitAI.prototype.MoveToPoint = function(x, z)
|4321|4321| {
|    | [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
|4399|4399| 	else
|4400|4400| 		// return false? Or hope you come close enough?
|4401|4401| 		var parabolicMaxRange = 0;
|4402|    |-		//return false;
|    |4402|+		// return false;
|4403|4403| 
|4404|4404| 	// the parabole changes while walking, take something in the middle
|4405|4405| 	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
|4464|4464| 	if (this.IsFormationMember())
|4465|4465| 	{
|4466|4466| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4467|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4468|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4467|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4468|+			cmpFormationUnitAI.order.data.target == target)
|4469|4469| 			return true;
|4470|4470| 	}
|4471|4471| 
|    | [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
|4632|4632| UnitAI.prototype.AttackEntityInZone = function(ents)
|4633|4633| {
|4634|4634| 	var target = ents.find(target =>
|4635|    |-		this.CanAttack(target)
|4636|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4635|+		this.CanAttack(target) &&
|    |4636|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4637|4637| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4638|4638| 	);
|4639|4639| 	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
|4633|4633| {
|4634|4634| 	var target = ents.find(target =>
|4635|4635| 		this.CanAttack(target)
|4636|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4637|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4636|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4637|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4638|4638| 	);
|4639|4639| 	if (!target)
|4640|4640| 		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
|4697|4697| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4698|4698| 	if (this.isGuardOf)
|4699|4699| 	{
|4700|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4700|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4701|4701| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4702|4702| 		if (cmpUnitAI && cmpAttack &&
|4703|4703| 		    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
|4701|4701| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4702|4702| 		if (cmpUnitAI && cmpAttack &&
|4703|4703| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4704|    |-				return false;
|    |4704|+			return false;
|4705|4705| 	}
|4706|4706| 
|4707|4707| 	// 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
|4706|4706| 
|4707|4707| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4708|4708| 	if (this.GetStance().respondHoldGround)
|4709|    |-	{
|    |4709|+	
|4710|4710| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4711|4711| 			return true;
|4712|    |-	}
|    |4712|+	
|4713|4713| 
|4714|4714| 	// Stop if it's left our vision range, unless we're especially persistent
|4715|4715| 	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
|4713|4713| 
|4714|4714| 	// Stop if it's left our vision range, unless we're especially persistent
|4715|4715| 	if (!this.GetStance().respondChaseBeyondVision)
|4716|    |-	{
|    |4716|+	
|4717|4717| 		if (!this.CheckTargetIsInVisionRange(target))
|4718|4718| 			return true;
|4719|    |-	}
|    |4719|+	
|4720|4720| 
|4721|4721| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4722|4722| 	// 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
|4739|4739| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4740|4740| 	if (this.isGuardOf)
|4741|4741| 	{
|4742|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4742|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4743|4743| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4744|4744| 		if (cmpUnitAI && cmpAttack &&
|4745|4745| 		    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
|4752|4752| 	return false;
|4753|4753| };
|4754|4754| 
|4755|    |-//// External interface functions ////
|    |4755|+// // External interface functions ////
|4756|4756| 
|4757|4757| UnitAI.prototype.SetFormationController = function(ent)
|4758|4758| {
|    | [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
|4762|4762| 	// of our own formation (or ourself if not in formation)
|4763|4763| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4764|4764| 	if (cmpObstruction)
|4765|    |-	{
|    |4765|+	
|4766|4766| 		if (ent == INVALID_ENTITY)
|4767|4767| 			cmpObstruction.SetControlGroup(this.entity);
|4768|4768| 		else
|4769|4769| 			cmpObstruction.SetControlGroup(ent);
|4770|    |-	}
|    |4770|+	
|4771|4771| 
|4772|4772| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4773|4773| 	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
|4905|4905| 	// if we already had an old guard order, do nothing if the target is the same
|4906|4906| 	// and the order is running, otherwise remove the previous order
|4907|4907| 	if (this.isGuardOf)
|4908|    |-	{
|    |4908|+	
|4909|4909| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4910|4910| 			return;
|4911|4911| 		else
|4912|4912| 			this.RemoveGuard();
|4913|    |-	}
|    |4913|+	
|4914|4914| 
|4915|4915| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4916|4916| };
|    | [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
|4908|4908| 	{
|4909|4909| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4910|4910| 			return;
|4911|    |-		else
|4912|    |-			this.RemoveGuard();
|    |4911|+		this.RemoveGuard();
|4913|4912| 	}
|4914|4913| 
|4915|4914| 	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
|5079|5079| 			this.WalkToTarget(target, queued);
|5080|5080| 		return;
|5081|5081| 	}
|5082|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5082|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5083|5083| };
|5084|5084| 
|5085|5085| /**
|    | [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
|5228|5228| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5229|5229| 	{
|5230|5230| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5231|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5231|+		if (cmpTrader.HasBothMarkets() &&
|5232|5232| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5233|5233| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5234|5234| 		{
|    | [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
|5509|5509| 				{
|5510|5510| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5511|5511| 					var targetClasses = this.order.data.targetClasses;
|5512|    |-					if (targetClasses.attack && cmpIdentity
|5513|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5512|+					if (targetClasses.attack && cmpIdentity &&
|    |5513|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5514|5514| 						continue;
|5515|5515| 					if (targetClasses.avoid && cmpIdentity
|5516|5516| 						&& 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
|5512|5512| 					if (targetClasses.attack && cmpIdentity
|5513|5513| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5514|5514| 						continue;
|5515|    |-					if (targetClasses.avoid && cmpIdentity
|5516|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5515|+					if (targetClasses.avoid && cmpIdentity &&
|    |5516|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5517|5517| 						continue;
|5518|5518| 					// Only used by the AIs to prevent some choices of targets
|5519|5519| 					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
|5535|5535| 		{
|5536|5536| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5537|5537| 			var targetClasses = this.order.data.targetClasses;
|5538|    |-			if (cmpIdentity && targetClasses.attack
|5539|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5538|+			if (cmpIdentity && targetClasses.attack &&
|    |5539|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5540|5540| 				continue;
|5541|5541| 			if (cmpIdentity && targetClasses.avoid
|5542|5542| 				&& 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
|5538|5538| 			if (cmpIdentity && targetClasses.attack
|5539|5539| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5540|5540| 				continue;
|5541|    |-			if (cmpIdentity && targetClasses.avoid
|5542|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5541|+			if (cmpIdentity && targetClasses.avoid &&
|    |5542|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5543|5543| 				continue;
|5544|5544| 			// Only used by the AIs to prevent some choices of targets
|5545|5545| 			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
|5681|5681| 
|5682|5682| UnitAI.prototype.SetHeldPosition = function(x, z)
|5683|5683| {
|5684|    |-	this.heldPosition = {"x": x, "z": z};
|    |5684|+	this.heldPosition = { "x": x, "z": z};
|5685|5685| };
|5686|5686| 
|5687|5687| 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
|5681|5681| 
|5682|5682| UnitAI.prototype.SetHeldPosition = function(x, z)
|5683|5683| {
|5684|    |-	this.heldPosition = {"x": x, "z": z};
|    |5684|+	this.heldPosition = {"x": x, "z": z };
|5685|5685| };
|5686|5686| 
|5687|5687| 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
|5708|5708| 	return false;
|5709|5709| };
|5710|5710| 
|5711|    |-//// Helper functions ////
|    |5711|+// // Helper functions ////
|5712|5712| 
|5713|5713| UnitAI.prototype.CanAttack = function(target)
|5714|5714| {
|    | [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
|5912|5912| 	return cmpPack && cmpPack.IsPacking();
|5913|5913| };
|5914|5914| 
|5915|    |-//// Formation specific functions ////
|    |5915|+// // Formation specific functions ////
|5916|5916| 
|5917|5917| UnitAI.prototype.IsAttackingAsFormation = function()
|5918|5918| {
|    | [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
|5917|5917| UnitAI.prototype.IsAttackingAsFormation = function()
|5918|5918| {
|5919|5919| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5920|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5921|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5920|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5921|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5922|5922| };
|5923|5923| 
|5924|5924| //// 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
|5921|5921| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5922|5922| };
|5923|5923| 
|5924|    |-//// Animal specific functions ////
|    |5924|+// // Animal specific functions ////
|5925|5925| 
|5926|5926| UnitAI.prototype.MoveRandomly = function(distance)
|5927|5927| {

binaries/data/mods/public/simulation/components/UnitAI.js
| 331| »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'Order.WalkToTarget' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
| 895| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
| 920| »   »   »   "enter":·function(msg)·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
| 938| »   »   »   "leave":·function(msg)·{
|    | [NORMAL] ESLintBear (no-dupe-keys):
|    | Duplicate key 'leave'.

binaries/data/mods/public/simulation/components/UnitAI.js
| 973| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1036| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1074| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1107| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1320| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1616| »   »   »   »   »   return·false;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|2419| »   »   »   »   »   »   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
|2474| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2592| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2694| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2903| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|3086| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|3818| »   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
|4619| »   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
|4634| »   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
|4680| »   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
|4703| »   »   ····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
|5159| »   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
| 358| »   »   ····&&·(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
| 938| »   »   »   "leave":·function(msg)·{
|    | [NORMAL] JSHintBear:
|    | Duplicate key 'leave'.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2010| »   »   »   »   »   »   &&·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
|2089| »   »   »   »   »   »   »   »   ·&&·((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
|2090| »   »   »   »   »   »   »   »   ·||·(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
|2091| »   »   »   »   »   »   »   »   ·&&·(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
|2114| »   »   »   »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(oldType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

binaries/data/mods/public/simulation/components/UnitAI.js
|2164| »   »   »   »   »   »   »   »   &&·((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
|2165| »   »   »   »   »   »   »   »   ||·(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
|2166| »   »   »   »   »   »   »   »   &&·(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
|2224| »   »   »   »   »   »   »   ||·(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
|2225| »   »   »   »   »   »   »   &&·(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
|2241| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2433| »   »   »   »   »   »   »   ||·(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
|2434| »   »   »   »   »   »   »   &&·(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
|2454| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4299| »   if·(data["target"])
|    | [NORMAL] JSHintBear:
|    | ['target'] is better written in dot notation.

binaries/data/mods/public/simulation/components/UnitAI.js
|4301| »   »   if·(data["min"]·||·data["max"])
|    | [NORMAL] JSHintBear:
|    | ['min'] is better written in dot notation.

binaries/data/mods/public/simulation/components/UnitAI.js
|4301| »   »   if·(data["min"]·||·data["max"])
|    | [NORMAL] JSHintBear:
|    | ['max'] is better written in dot notation.

binaries/data/mods/public/simulation/components/UnitAI.js
|4313| »   »   if·(data["min"]·||·data["max"])
|    | [NORMAL] JSHintBear:
|    | ['min'] is better written in dot notation.

binaries/data/mods/public/simulation/components/UnitAI.js
|4313| »   »   if·(data["min"]·||·data["max"])
|    | [NORMAL] JSHintBear:
|    | ['max'] is better written in dot notation.

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4412| »   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
|4468| »   »   »   &&·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
|4636| »   »   &&·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
|4637| »   »   &&·(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
|5159| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

binaries/data/mods/public/simulation/components/UnitAI.js
|5513| »   »   »   »   »   »   &&·!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
|5516| »   »   »   »   »   »   &&·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
|5529| »   var·targets·=·this.GetTargetsFromUnit();
|    | [NORMAL] JSHintBear:
|    | 'targets' is already defined.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5530| »   for·(var·targ·of·targets)
|    | [MAJOR] JSHintBear:
|    | Too many errors. (91% scanned).
Executing section cli...

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

wraitii updated this revision to Diff 8348.Jun 6 2019, 9:04 PM
wraitii marked 12 inline comments as done.

stan's remarks + linter comments on affected paths.

wraitii added inline comments.Jun 6 2019, 9:10 PM
source/simulation2/components/CCmpObstructionManager.cpp
725 ↗(On Diff #8184)

irrelevant imo.

768 ↗(On Diff #8184)

wouldn't improve readability imo.

No particular reason on the order except that sphere sphere is faster/simpler.

787 ↗(On Diff #8184)

kind of annoying without if-constexpr.

Vulcan added a comment.Jun 6 2019, 9:34 PM

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

Linter detected issues:
Executing section Source...
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 (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
|  35|  35| 
|  36|  36| 
|  37|  37| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  38|    |-		SetInterval: function() { },
|    |  38|+		"SetInterval": function() { },
|  39|  39| 		SetTimeout: function() { },
|  40|  40| 	});
|  41|  41| 
|    | [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
|  36|  36| 
|  37|  37| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  38|  38| 		SetInterval: function() { },
|  39|    |-		SetTimeout: function() { },
|    |  39|+		"SetTimeout": function() { },
|  40|  40| 	});
|  41|  41| 
|  42|  42| 	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
|  40|  40| 	});
|  41|  41| 
|  42|  42| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|  43|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    |  43|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
|  44|  44| 			return 1;
|  45|  45| 		},
|  46|  46| 		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
|  43|  43| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|  44|  44| 			return 1;
|  45|  45| 		},
|  46|    |-		EnableActiveQuery: function(id) { },
|    |  46|+		"EnableActiveQuery": function(id) { },
|  47|  47| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  48|  48| 		DisableActiveQuery: function(id) { },
|  49|  49| 		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
|  44|  44| 			return 1;
|  45|  45| 		},
|  46|  46| 		EnableActiveQuery: function(id) { },
|  47|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  47|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
|  48|  48| 		DisableActiveQuery: function(id) { },
|  49|  49| 		GetEntityFlagMask: function(identifier) { },
|  50|  50| 	});
|    | [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
|  44|  44| 			return 1;
|  45|  45| 		},
|  46|  46| 		EnableActiveQuery: function(id) { },
|  47|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  47|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
|  48|  48| 		DisableActiveQuery: function(id) { },
|  49|  49| 		GetEntityFlagMask: function(identifier) { },
|  50|  50| 	});
|    | [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
|  45|  45| 		},
|  46|  46| 		EnableActiveQuery: function(id) { },
|  47|  47| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  48|    |-		DisableActiveQuery: function(id) { },
|    |  48|+		"DisableActiveQuery": function(id) { },
|  49|  49| 		GetEntityFlagMask: function(identifier) { },
|  50|  50| 	});
|  51|  51| 
|    | [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
|  46|  46| 		EnableActiveQuery: function(id) { },
|  47|  47| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  48|  48| 		DisableActiveQuery: function(id) { },
|  49|    |-		GetEntityFlagMask: function(identifier) { },
|    |  49|+		"GetEntityFlagMask": function(identifier) { },
|  50|  50| 	});
|  51|  51| 
|  52|  52| 	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
|  50|  50| 	});
|  51|  51| 
|  52|  52| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  53|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    |  53|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
|  54|  54| 	});
|  55|  55| 
|  56|  56| 	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
|  54|  54| 	});
|  55|  55| 
|  56|  56| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  57|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    |  57|+		"GetPlayerByID": function(id) { return playerEntity; },
|  58|  58| 		GetNumPlayers: function() { return 2; },
|  59|  59| 	});
|  60|  60| 
|    | [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
|  55|  55| 
|  56|  56| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  57|  57| 		GetPlayerByID: function(id) { return playerEntity; },
|  58|    |-		GetNumPlayers: function() { return 2; },
|    |  58|+		"GetNumPlayers": function() { return 2; },
|  59|  59| 	});
|  60|  60| 
|  61|  61| 	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
|  59|  59| 	});
|  60|  60| 
|  61|  61| 	AddMock(playerEntity, IID_Player, {
|  62|    |-		IsAlly: function() { return false; },
|    |  62|+		"IsAlly": function() { return false; },
|  63|  63| 		IsEnemy: function() { return true; },
|  64|  64| 		GetEnemies: function() { return []; },
|  65|  65| 	});
|    | [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
|  60|  60| 
|  61|  61| 	AddMock(playerEntity, IID_Player, {
|  62|  62| 		IsAlly: function() { return false; },
|  63|    |-		IsEnemy: function() { return true; },
|    |  63|+		"IsEnemy": function() { return true; },
|  64|  64| 		GetEnemies: function() { return []; },
|  65|  65| 	});
|  66|  66| 
|    | [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
|  61|  61| 	AddMock(playerEntity, IID_Player, {
|  62|  62| 		IsAlly: function() { return false; },
|  63|  63| 		IsEnemy: function() { return true; },
|  64|    |-		GetEnemies: function() { return []; },
|    |  64|+		"GetEnemies": function() { return []; },
|  65|  65| 	});
|  66|  66| 
|  67|  67| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [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
|  71|  71| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Identity, {
|  74|    |-		GetClassesList: function() { return []; },
|    |  74|+		"GetClassesList": function() { return []; },
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	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
|  75|  75| 	});
|  76|  76| 
|  77|  77| 	AddMock(unit, IID_Ownership, {
|  78|    |-		GetOwner: function() { return 1; },
|    |  78|+		"GetOwner": function() { return 1; },
|  79|  79| 	});
|  80|  80| 
|  81|  81| 	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
|  79|  79| 	});
|  80|  80| 
|  81|  81| 	AddMock(unit, IID_Position, {
|  82|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    |  82|+		"GetTurretParent": function() { return INVALID_ENTITY; },
|  83|  83| 		GetPosition: function() { return new Vector3D(); },
|  84|  84| 		GetPosition2D: function() { return new Vector2D(); },
|  85|  85| 		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
|  80|  80| 
|  81|  81| 	AddMock(unit, IID_Position, {
|  82|  82| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  83|    |-		GetPosition: function() { return new Vector3D(); },
|    |  83|+		"GetPosition": function() { return new Vector3D(); },
|  84|  84| 		GetPosition2D: function() { return new Vector2D(); },
|  85|  85| 		GetRotation: function() { return { "y": 0 }; },
|  86|  86| 		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
|  81|  81| 	AddMock(unit, IID_Position, {
|  82|  82| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  83|  83| 		GetPosition: function() { return new Vector3D(); },
|  84|    |-		GetPosition2D: function() { return new Vector2D(); },
|    |  84|+		"GetPosition2D": function() { return new Vector2D(); },
|  85|  85| 		GetRotation: function() { return { "y": 0 }; },
|  86|  86| 		IsInWorld: function() { return true; },
|  87|  87| 	});
|    | [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
|  82|  82| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  83|  83| 		GetPosition: function() { return new Vector3D(); },
|  84|  84| 		GetPosition2D: function() { return new Vector2D(); },
|  85|    |-		GetRotation: function() { return { "y": 0 }; },
|    |  85|+		"GetRotation": function() { return { "y": 0 }; },
|  86|  86| 		IsInWorld: function() { return true; },
|  87|  87| 	});
|  88|  88| 
|    | [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
|  83|  83| 		GetPosition: function() { return new Vector3D(); },
|  84|  84| 		GetPosition2D: function() { return new Vector2D(); },
|  85|  85| 		GetRotation: function() { return { "y": 0 }; },
|  86|    |-		IsInWorld: function() { return true; },
|    |  86|+		"IsInWorld": function() { return true; },
|  87|  87| 	});
|  88|  88| 
|  89|  89| 	AddMock(unit, IID_UnitMotion, {
|    | [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
|  95|  95| 	});
|  96|  96| 
|  97|  97| 	AddMock(unit, IID_Vision, {
|  98|    |-		GetRange: function() { return 10; },
|    |  98|+		"GetRange": function() { return 10; },
|  99|  99| 	});
| 100| 100| 
| 101| 101| 	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
|  99|  99| 	});
| 100| 100| 
| 101| 101| 	AddMock(unit, IID_Attack, {
| 102|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 102|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 103| 103| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 104| 104| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 105| 105| 		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
|  99|  99| 	});
| 100| 100| 
| 101| 101| 	AddMock(unit, IID_Attack, {
| 102|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 102|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 103| 103| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 104| 104| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 105| 105| 		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
| 100| 100| 
| 101| 101| 	AddMock(unit, IID_Attack, {
| 102| 102| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 103|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 103|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 104| 104| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 105| 105| 		GetPreference: function(t) { return 0; },
| 106| 106| 		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
| 100| 100| 
| 101| 101| 	AddMock(unit, IID_Attack, {
| 102| 102| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 103|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 103|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 104| 104| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 105| 105| 		GetPreference: function(t) { return 0; },
| 106| 106| 		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
| 101| 101| 	AddMock(unit, IID_Attack, {
| 102| 102| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 103| 103| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 104|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 104|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 105| 105| 		GetPreference: function(t) { return 0; },
| 106| 106| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 107| 107| 		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
| 102| 102| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 103| 103| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 104| 104| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 105|    |-		GetPreference: function(t) { return 0; },
|    | 105|+		"GetPreference": function(t) { return 0; },
| 106| 106| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 107| 107| 		CanAttack: function(v) { return true; },
| 108| 108| 		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
| 103| 103| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 104| 104| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 105| 105| 		GetPreference: function(t) { return 0; },
| 106|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 106|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 107| 107| 		CanAttack: function(v) { return true; },
| 108| 108| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 109| 109| 	});
|    | [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
| 104| 104| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 105| 105| 		GetPreference: function(t) { return 0; },
| 106| 106| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 107|    |-		CanAttack: function(v) { return true; },
|    | 107|+		"CanAttack": function(v) { return true; },
| 108| 108| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 109| 109| 	});
| 110| 110| 
|    | [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
| 105| 105| 		GetPreference: function(t) { return 0; },
| 106| 106| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 107| 107| 		CanAttack: function(v) { return true; },
| 108|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 108|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 109| 109| 	});
| 110| 110| 
| 111| 111| 	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
| 116| 116| 	if (mode == 1)
| 117| 117| 	{
| 118| 118| 		AddMock(enemy, IID_Health, {
| 119|    |-			GetHitpoints: function() { return 10; },
|    | 119|+			"GetHitpoints": function() { return 10; },
| 120| 120| 		});
| 121| 121| 		AddMock(enemy, IID_UnitAI, {
| 122| 122| 			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
| 119| 119| 			GetHitpoints: function() { return 10; },
| 120| 120| 		});
| 121| 121| 		AddMock(enemy, IID_UnitAI, {
| 122|    |-			IsAnimal: function() { return false; }
|    | 122|+			"IsAnimal": function() { return false; }
| 123| 123| 		});
| 124| 124| 	}
| 125| 125| 	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
| 124| 124| 	}
| 125| 125| 	else if (mode == 2)
| 126| 126| 		AddMock(enemy, IID_Health, {
| 127|    |-			GetHitpoints: function() { return 0; },
|    | 127|+			"GetHitpoints": function() { return 0; },
| 128| 128| 		});
| 129| 129| 
| 130| 130| 	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
| 127| 127| 			GetHitpoints: function() { return 0; },
| 128| 128| 		});
| 129| 129| 
| 130|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 130|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 131| 131| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 132| 132| 
| 133| 133| 	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
| 127| 127| 			GetHitpoints: function() { return 0; },
| 128| 128| 		});
| 129| 129| 
| 130|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 130|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 131| 131| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 132| 132| 
| 133| 133| 	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
| 131| 131| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 132| 132| 
| 133| 133| 	AddMock(controller, IID_Position, {
| 134|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 134|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 135| 135| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 136| 136| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 137| 137| 		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
| 132| 132| 
| 133| 133| 	AddMock(controller, IID_Position, {
| 134| 134| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 135|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 135|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 136| 136| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 137| 137| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 138| 138| 		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
| 133| 133| 	AddMock(controller, IID_Position, {
| 134| 134| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 135| 135| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 136|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 136|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 137| 137| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 138| 138| 		GetRotation: function() { return { "y": 0 }; },
| 139| 139| 		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
| 134| 134| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 135| 135| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 136| 136| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 137|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 137|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 138| 138| 		GetRotation: function() { return { "y": 0 }; },
| 139| 139| 		IsInWorld: function() { return true; },
| 140| 140| 	});
|    | [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
| 135| 135| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 136| 136| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 137| 137| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 138|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 138|+		"GetRotation": function() { return { "y": 0 }; },
| 139| 139| 		IsInWorld: function() { return true; },
| 140| 140| 	});
| 141| 141| 
|    | [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
| 136| 136| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 137| 137| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 138| 138| 		GetRotation: function() { return { "y": 0 }; },
| 139|    |-		IsInWorld: function() { return true; },
|    | 139|+		"IsInWorld": function() { return true; },
| 140| 140| 	});
| 141| 141| 
| 142| 142| 	AddMock(controller, IID_UnitMotion, {
|    | [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
| 185| 185| 	var unitAIs = [];
| 186| 186| 
| 187| 187| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 188|    |-		SetInterval: function() { },
|    | 188|+		"SetInterval": function() { },
| 189| 189| 		SetTimeout: function() { },
| 190| 190| 	});
| 191| 191| 
|    | [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
| 186| 186| 
| 187| 187| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 188| 188| 		SetInterval: function() { },
| 189|    |-		SetTimeout: function() { },
|    | 189|+		"SetTimeout": function() { },
| 190| 190| 	});
| 191| 191| 
| 192| 192| 
|    | [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
| 191| 191| 
| 192| 192| 
| 193| 193| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 194|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 194|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 195| 195| 			return 1;
| 196| 196| 		},
| 197| 197| 		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
| 194| 194| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 195| 195| 			return 1;
| 196| 196| 		},
| 197|    |-		EnableActiveQuery: function(id) { },
|    | 197|+		"EnableActiveQuery": function(id) { },
| 198| 198| 		ResetActiveQuery: function(id) { return [enemy]; },
| 199| 199| 		DisableActiveQuery: function(id) { },
| 200| 200| 		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
| 195| 195| 			return 1;
| 196| 196| 		},
| 197| 197| 		EnableActiveQuery: function(id) { },
| 198|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 198|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 199| 199| 		DisableActiveQuery: function(id) { },
| 200| 200| 		GetEntityFlagMask: function(identifier) { },
| 201| 201| 	});
|    | [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
| 196| 196| 		},
| 197| 197| 		EnableActiveQuery: function(id) { },
| 198| 198| 		ResetActiveQuery: function(id) { return [enemy]; },
| 199|    |-		DisableActiveQuery: function(id) { },
|    | 199|+		"DisableActiveQuery": function(id) { },
| 200| 200| 		GetEntityFlagMask: function(identifier) { },
| 201| 201| 	});
| 202| 202| 
|    | [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
| 197| 197| 		EnableActiveQuery: function(id) { },
| 198| 198| 		ResetActiveQuery: function(id) { return [enemy]; },
| 199| 199| 		DisableActiveQuery: function(id) { },
| 200|    |-		GetEntityFlagMask: function(identifier) { },
|    | 200|+		"GetEntityFlagMask": function(identifier) { },
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	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
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 204|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 204|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 205| 205| 	});
| 206| 206| 
| 207| 207| 	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
| 205| 205| 	});
| 206| 206| 
| 207| 207| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 208|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 208|+		"GetPlayerByID": function(id) { return playerEntity; },
| 209| 209| 		GetNumPlayers: function() { return 2; },
| 210| 210| 	});
| 211| 211| 
|    | [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
| 206| 206| 
| 207| 207| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 208| 208| 		GetPlayerByID: function(id) { return playerEntity; },
| 209|    |-		GetNumPlayers: function() { return 2; },
|    | 209|+		"GetNumPlayers": function() { return 2; },
| 210| 210| 	});
| 211| 211| 
| 212| 212| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [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
| 214| 214| 	});
| 215| 215| 
| 216| 216| 	AddMock(playerEntity, IID_Player, {
| 217|    |-		IsAlly: function() { return false; },
|    | 217|+		"IsAlly": function() { return false; },
| 218| 218| 		IsEnemy: function() { return true; },
| 219| 219| 		GetEnemies: function() { return []; },
| 220| 220| 	});
|    | [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
| 215| 215| 
| 216| 216| 	AddMock(playerEntity, IID_Player, {
| 217| 217| 		IsAlly: function() { return false; },
| 218|    |-		IsEnemy: function() { return true; },
|    | 218|+		"IsEnemy": function() { return true; },
| 219| 219| 		GetEnemies: function() { return []; },
| 220| 220| 	});
| 221| 221| 
|    | [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
| 216| 216| 	AddMock(playerEntity, IID_Player, {
| 217| 217| 		IsAlly: function() { return false; },
| 218| 218| 		IsEnemy: function() { return true; },
| 219|    |-		GetEnemies: function() { return []; },
|    | 219|+		"GetEnemies": function() { return []; },
| 220| 220| 	});
| 221| 221| 
| 222| 222| 	// 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
| 227| 227| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Identity, {
| 230|    |-			GetClassesList: function() { return []; },
|    | 230|+			"GetClassesList": function() { return []; },
| 231| 231| 		});
| 232| 232| 
| 233| 233| 		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
| 231| 231| 		});
| 232| 232| 
| 233| 233| 		AddMock(unit + i, IID_Ownership, {
| 234|    |-			GetOwner: function() { return 1; },
|    | 234|+			"GetOwner": function() { return 1; },
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		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
| 235| 235| 		});
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_Position, {
| 238|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 238|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 239| 239| 			GetPosition: function() { return new Vector3D(); },
| 240| 240| 			GetPosition2D: function() { return new Vector2D(); },
| 241| 241| 			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
| 236| 236| 
| 237| 237| 		AddMock(unit + i, IID_Position, {
| 238| 238| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 239|    |-			GetPosition: function() { return new Vector3D(); },
|    | 239|+			"GetPosition": function() { return new Vector3D(); },
| 240| 240| 			GetPosition2D: function() { return new Vector2D(); },
| 241| 241| 			GetRotation: function() { return { "y": 0 }; },
| 242| 242| 			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
| 237| 237| 		AddMock(unit + i, IID_Position, {
| 238| 238| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 239| 239| 			GetPosition: function() { return new Vector3D(); },
| 240|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 240|+			"GetPosition2D": function() { return new Vector2D(); },
| 241| 241| 			GetRotation: function() { return { "y": 0 }; },
| 242| 242| 			IsInWorld: function() { return true; },
| 243| 243| 		});
|    | [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
| 238| 238| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 239| 239| 			GetPosition: function() { return new Vector3D(); },
| 240| 240| 			GetPosition2D: function() { return new Vector2D(); },
| 241|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 241|+			"GetRotation": function() { return { "y": 0 }; },
| 242| 242| 			IsInWorld: function() { return true; },
| 243| 243| 		});
| 244| 244| 
|    | [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
| 239| 239| 			GetPosition: function() { return new Vector3D(); },
| 240| 240| 			GetPosition2D: function() { return new Vector2D(); },
| 241| 241| 			GetRotation: function() { return { "y": 0 }; },
| 242|    |-			IsInWorld: function() { return true; },
|    | 242|+			"IsInWorld": function() { return true; },
| 243| 243| 		});
| 244| 244| 
| 245| 245| 		AddMock(unit + i, IID_UnitMotion, {
|    | [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
| 251| 251| 		});
| 252| 252| 
| 253| 253| 		AddMock(unit + i, IID_Vision, {
| 254|    |-			GetRange: function() { return 10; },
|    | 254|+			"GetRange": function() { return 10; },
| 255| 255| 		});
| 256| 256| 
| 257| 257| 		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
| 255| 255| 		});
| 256| 256| 
| 257| 257| 		AddMock(unit + i, IID_Attack, {
| 258|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 258|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 259| 259| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261| 261| 			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
| 255| 255| 		});
| 256| 256| 
| 257| 257| 		AddMock(unit + i, IID_Attack, {
| 258|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 258|+			GetRange: function() { return { "max":10, "min": 0}; },
| 259| 259| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261| 261| 			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
| 255| 255| 		});
| 256| 256| 
| 257| 257| 		AddMock(unit + i, IID_Attack, {
| 258|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 258|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 259| 259| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261| 261| 			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
| 255| 255| 		});
| 256| 256| 
| 257| 257| 		AddMock(unit + i, IID_Attack, {
| 258|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 258|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 259| 259| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261| 261| 			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
| 256| 256| 
| 257| 257| 		AddMock(unit + i, IID_Attack, {
| 258| 258| 			GetRange: function() { return {"max":10, "min": 0}; },
| 259|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 259|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261| 261| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 262| 262| 			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
| 256| 256| 
| 257| 257| 		AddMock(unit + i, IID_Attack, {
| 258| 258| 			GetRange: function() { return {"max":10, "min": 0}; },
| 259|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 259|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261| 261| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 262| 262| 			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
| 257| 257| 		AddMock(unit + i, IID_Attack, {
| 258| 258| 			GetRange: function() { return {"max":10, "min": 0}; },
| 259| 259| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 260|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 260|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 261| 261| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 262| 262| 			CanAttack: function(v) { return true; },
| 263| 263| 			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
| 258| 258| 			GetRange: function() { return {"max":10, "min": 0}; },
| 259| 259| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 261|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 262| 262| 			CanAttack: function(v) { return true; },
| 263| 263| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 264| 264| 		});
|    | [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
| 259| 259| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261| 261| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 262|    |-			CanAttack: function(v) { return true; },
|    | 262|+			"CanAttack": function(v) { return true; },
| 263| 263| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 264| 264| 		});
| 265| 265| 
|    | [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
| 260| 260| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 261| 261| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 262| 262| 			CanAttack: function(v) { return true; },
| 263|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 263|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 264| 264| 		});
| 265| 265| 
| 266| 266| 		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
| 272| 272| 
| 273| 273| 	// create enemy
| 274| 274| 	AddMock(enemy, IID_Health, {
| 275|    |-		GetHitpoints: function() { return 40; },
|    | 275|+		"GetHitpoints": function() { return 40; },
| 276| 276| 	});
| 277| 277| 
| 278| 278| 	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
| 275| 275| 		GetHitpoints: function() { return 40; },
| 276| 276| 	});
| 277| 277| 
| 278|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 278|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 279| 279| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 280| 280| 
| 281| 281| 	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
| 275| 275| 		GetHitpoints: function() { return 40; },
| 276| 276| 	});
| 277| 277| 
| 278|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 278|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 279| 279| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 280| 280| 
| 281| 281| 	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
| 279| 279| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 280| 280| 
| 281| 281| 	AddMock(controller, IID_Position, {
| 282|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 282|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 283| 283| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 284| 284| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 285| 285| 		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
| 280| 280| 
| 281| 281| 	AddMock(controller, IID_Position, {
| 282| 282| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 283|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 283|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 284| 284| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 285| 285| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 286| 286| 		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
| 281| 281| 	AddMock(controller, IID_Position, {
| 282| 282| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 283| 283| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 284|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 284|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 285| 285| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 286| 286| 		GetRotation: function() { return { "y": 0 }; },
| 287| 287| 		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
| 282| 282| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 283| 283| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 284| 284| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 285|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 285|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 286| 286| 		GetRotation: function() { return { "y": 0 }; },
| 287| 287| 		IsInWorld: function() { return true; },
| 288| 288| 	});
|    | [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
| 283| 283| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 284| 284| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 285| 285| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 286|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 286|+		"GetRotation": function() { return { "y": 0 }; },
| 287| 287| 		IsInWorld: function() { return true; },
| 288| 288| 	});
| 289| 289| 
|    | [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
| 284| 284| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 285| 285| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 286| 286| 		GetRotation: function() { return { "y": 0 }; },
| 287|    |-		IsInWorld: function() { return true; },
|    | 287|+		"IsInWorld": function() { return true; },
| 288| 288| 	});
| 289| 289| 
| 290| 290| 	AddMock(controller, IID_UnitMotion, {
|    | [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
| 296| 296| 	});
| 297| 297| 
| 298| 298| 	AddMock(controller, IID_Attack, {
| 299|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 299|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 300| 300| 		CanAttackAsFormation: function() { return false; },
| 301| 301| 	});
| 302| 302| 
|    | [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
| 296| 296| 	});
| 297| 297| 
| 298| 298| 	AddMock(controller, IID_Attack, {
| 299|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 299|+		GetRange: function() { return { "max":10, "min": 0}; },
| 300| 300| 		CanAttackAsFormation: function() { return false; },
| 301| 301| 	});
| 302| 302| 
|    | [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
| 296| 296| 	});
| 297| 297| 
| 298| 298| 	AddMock(controller, IID_Attack, {
| 299|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 299|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 300| 300| 		CanAttackAsFormation: function() { return false; },
| 301| 301| 	});
| 302| 302| 
|    | [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
| 296| 296| 	});
| 297| 297| 
| 298| 298| 	AddMock(controller, IID_Attack, {
| 299|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 299|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 300| 300| 		CanAttackAsFormation: function() { return false; },
| 301| 301| 	});
| 302| 302| 
|    | [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
| 297| 297| 
| 298| 298| 	AddMock(controller, IID_Attack, {
| 299| 299| 		GetRange: function() { return {"max":10, "min": 0}; },
| 300|    |-		CanAttackAsFormation: function() { return false; },
|    | 300|+		"CanAttackAsFormation": function() { return false; },
| 301| 301| 	});
| 302| 302| 
| 303| 303| 	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
| 309| 309| 	for (var ent of unitAIs)
| 310| 310| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 311| 311| 
| 312|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 312|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 313| 313| 
| 314| 314| 	// let all units be in position
| 315| 315| 	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
| 309| 309| 	for (var ent of unitAIs)
| 310| 310| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 311| 311| 
| 312|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 312|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 313| 313| 
| 314| 314| 	// let all units be in position
| 315| 315| 	for (var ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  47| »   »   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
| 223| »   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
| 315| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 310| »   »   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
| 319| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [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
| 299| 299| UnitMotionFlying.prototype.GetSpeedMultiplier = function()
| 300| 300| {
| 301| 301| 	return this.GetCurrentSpeed() / this.GetWalkSpeed();
| 302|    |-}
|    | 302|+};
| 303| 303| 
| 304| 304| UnitMotionFlying.prototype.GetPassabilityClassName = function()
| 305| 305| {
|    | [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
| 323| 323| 
| 324| 324| UnitMotionFlying.prototype.StopMoving = function()
| 325| 325| {
| 326|    |-	//Invert
|    | 326|+	// Invert
| 327| 327| 	if (!this.waterDeath)
| 328| 328| 		this.landing = !this.landing;
| 329| 329| 

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
| 302| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [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
| 356| 356| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 357| 357| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 358| 358| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 359|    |-		{
|    | 359|+		
| 360| 360| 			// we were already on the shoreline, and have not moved since
| 361| 361| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 362| 362| 				needToMove = false;
| 363|    |-		}
|    | 363|+		
| 364| 364| 
| 365| 365| 		if (needToMove)
| 366| 366| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
|    | [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
| 354| 354| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 355| 355| 		var needToMove = true;
| 356| 356| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 357|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 358|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 357|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 358|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 359| 359| 		{
| 360| 360| 			// we were already on the shoreline, and have not moved since
| 361| 361| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [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
| 519| 519| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 520| 520| 				}
| 521| 521| 				else
| 522|    |-				{
|    | 522|+				
| 523| 523| 					// We couldn't move there, or the target moved away
| 524| 524| 					this.FinishOrder();
| 525|    |-				}
|    | 525|+				
| 526| 526| 				return;
| 527| 527| 			}
| 528| 528| 
|    | [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
| 734| 734| 			}
| 735| 735| 			// Check if we are already in range, otherwise walk there
| 736| 736| 			if (!this.CheckGarrisonRange(msg.data.target))
| 737|    |-			{
|    | 737|+			
| 738| 738| 				if (!this.CheckTargetVisible(msg.data.target))
| 739| 739| 				{
| 740| 740| 					this.FinishOrder();
| 745| 745| 					this.SetNextState("GARRISON.APPROACHING");
| 746| 746| 					return;
| 747| 747| 				}
| 748|    |-			}
|    | 748|+			
| 749| 749| 
| 750| 750| 			this.SetNextState("GARRISON.GARRISONING");
| 751| 751| 		},
|    | [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
| 740| 740| 					this.FinishOrder();
| 741| 741| 					return;
| 742| 742| 				}
| 743|    |-				else
| 744|    |-				{
|    | 743|+				
| 745| 744| 					this.SetNextState("GARRISON.APPROACHING");
| 746| 745| 					return;
| 747|    |-				}
|    | 746|+				
| 748| 747| 			}
| 749| 748| 
| 750| 749| 			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
| 763| 763| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 764| 764| 					}
| 765| 765| 					else
| 766|    |-					{
|    | 766|+					
| 767| 767| 						// We couldn't move there, or the target moved away
| 768| 768| 						this.FinishOrder();
| 769|    |-					}
|    | 769|+					
| 770| 770| 					return;
| 771| 771| 				}
| 772| 772| 
|    | [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
|1011|1011| 			},
|1012|1012| 		},
|1013|1013| 
|1014|    |-		"GARRISON":{
|    |1014|+		"GARRISON": {
|1015|1015| 			"enter": function() {
|1016|1016| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1017|1017| 				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
|1231|1231| 			// If the controller handled an order but some members rejected it,
|1232|1232| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1233|1233| 			if (this.orderQueue.length)
|1234|    |-			{
|    |1234|+			
|1235|1235| 				// We're leaving the formation, so stop our FormationWalk order
|1236|1236| 				if (this.FinishOrder())
|1237|1237| 					return;
|1238|    |-			}
|    |1238|+			
|1239|1239| 
|1240|1240| 			// No orders left, we're an individual now
|1241|1241| 			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
|1259|1259| 			// Move a tile outside the building
|1260|1260| 			let range = 4;
|1261|1261| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1262|    |-			{
|    |1262|+			
|1263|1263| 				// We are already at the target, or can't move at all
|1264|1264| 				this.FinishOrder();
|1265|    |-			}
|    |1265|+			
|1266|1266| 			else
|1267|1267| 			{
|1268|1268| 				this.order.data.min = range;
|    | [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
|1474|1474| 
|1475|1475| 			"LosRangeUpdate": function(msg) {
|1476|1476| 				if (this.GetStance().targetVisibleEnemies)
|1477|    |-				{
|    |1477|+				
|1478|1478| 					// Start attacking one of the newly-seen enemy (if any)
|1479|1479| 					this.AttackEntitiesByPreference(msg.data.added);
|1480|    |-				}
|    |1480|+				
|1481|1481| 			},
|1482|1482| 
|1483|1483| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1511|1511| 				this.SelectAnimation("move");
|1512|1512| 			},
|1513|1513| 
|1514|    |-			"leave": function () {
|    |1514|+			"leave": function() {
|1515|1515| 				this.SelectAnimation("idle");
|1516|1516| 				this.StopMoving();
|1517|1517| 			},
|    | [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
|1688|1688| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1689|1689| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1690|1690| 						if (cmpHealth && cmpHealth.IsInjured())
|1691|    |-						{
|    |1691|+						
|1692|1692| 							if (this.CanHeal(this.isGuardOf))
|1693|1693| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1694|1694| 							else if (this.CanRepair(this.isGuardOf))
|1695|1695| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1696|    |-						}
|    |1696|+						
|1697|1697| 					}
|1698|1698| 				},
|1699|1699| 
|    | [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
|1791|1791| 				"MoveCompleted": function() {
|1792|1792| 
|1793|1793| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1794|    |-					{
|    |1794|+					
|1795|1795| 						// If the unit needs to unpack, do so
|1796|1796| 						if (this.CanUnpack())
|1797|1797| 						{
|1800|1800| 						}
|1801|1801| 						else
|1802|1802| 							this.SetNextState("ATTACKING");
|1803|    |-					}
|    |1803|+					
|1804|1804| 					else
|1805|1805| 					{
|1806|1806| 						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
|1798|1798| 							this.PushOrderFront("Unpack", { "force": true });
|1799|1799| 							return;
|1800|1800| 						}
|1801|    |-						else
|1802|    |-							this.SetNextState("ATTACKING");
|    |1801|+						this.SetNextState("ATTACKING");
|1803|1802| 					}
|1804|1803| 					else
|1805|1804| 					{
|    | [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
|1802|1802| 							this.SetNextState("ATTACKING");
|1803|1803| 					}
|1804|1804| 					else
|1805|    |-					{
|    |1805|+					
|1806|1806| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1807|1807| 						{
|1808|1808| 							this.SetNextState("APPROACHING");
|1812|1812| 							// Give up
|1813|1813| 							this.FinishOrder();
|1814|1814| 						}
|1815|    |-					}
|    |1815|+					
|1816|1816| 				},
|1817|1817| 			},
|1818|1818| 
|    | [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
|1804|1804| 					else
|1805|1805| 					{
|1806|1806| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1807|    |-						{
|    |1807|+						
|1808|1808| 							this.SetNextState("APPROACHING");
|1809|    |-						}
|    |1809|+						
|1810|1810| 						else
|1811|1811| 						{
|1812|1812| 							// 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
|1808|1808| 							this.SetNextState("APPROACHING");
|1809|1809| 						}
|1810|1810| 						else
|1811|    |-						{
|    |1811|+						
|1812|1812| 							// Give up
|1813|1813| 							this.FinishOrder();
|1814|    |-						}
|    |1814|+						
|1815|1815| 					}
|1816|1816| 				},
|1817|1817| 			},
|    | [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
|1829|1829| 					}
|1830|1830| 					// Check the target is still alive and attackable
|1831|1831| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1832|    |-					{
|    |1832|+					
|1833|1833| 						// Can't reach it - try to chase after it
|1834|1834| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1835|1835| 						{
|1844|1844| 								return true;
|1845|1845| 							}
|1846|1846| 						}
|1847|    |-					}
|    |1847|+					
|1848|1848| 
|1849|1849| 					this.StopMoving();
|1850|1850| 
|    | [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
|1877|1877| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1878|1878| 
|1879|1879| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1880|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1880|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1881|1881| 
|1882|1882| 					this.FaceTowardsTarget(this.order.data.target);
|1883|1883| 
|    | [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
|2006|2006| 
|2007|2007| 				"Attacked": function(msg) {
|2008|2008| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2009|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2010|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2009|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2010|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2011|2011| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2012|2012| 				},
|2013|2013| 			},
|    | [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
|2026|2026| 					this.SelectAnimation("move");
|2027|2027| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2028|2028| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2029|    |-					{
|    |2029|+					
|2030|2030| 						// Run after a fleeing target
|2031|2031| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2032|    |-					}
|    |2032|+					
|2033|2033| 					this.StartTimer(1000, 1000);
|2034|2034| 				},
|2035|2035| 
|    | [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
|2209|2209| 
|2210|2210| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2211|2211| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2212|    |-					{
|    |2212|+					
|2213|2213| 						// Check we can still reach and gather from the target
|2214|2214| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2215|2215| 						{
|2274|2274| 								return;
|2275|2275| 							}
|2276|2276| 						}
|2277|    |-					}
|    |2277|+					
|2278|2278| 
|2279|2279| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2280|2280| 
|    | [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
|2300|2300| 					// Also don't switch to a different type of huntable animal
|2301|2301| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2302|2302| 						return (
|2303|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2304|    |-							|| (type.specific == resourceType.specific
|    |2303|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2304|+							(type.specific == resourceType.specific
|2305|2305| 							&& (type.specific != "meat" || resourceTemplate == template))
|2306|2306| 						);
|2307|2307| 					});
|    | [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
|2301|2301| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2302|2302| 						return (
|2303|2303| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2304|    |-							|| (type.specific == resourceType.specific
|2305|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2304|+							|| (type.specific == resourceType.specific &&
|    |2305|+							(type.specific != "meat" || resourceTemplate == template))
|2306|2306| 						);
|2307|2307| 					});
|2308|2308| 					if (nearby)
|    | [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
|2366|2366| 
|2367|2367| 				"Timer": function(msg) {
|2368|2368| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2369|    |-					{
|    |2369|+					
|2370|2370| 						// Return to our original position unless we have a better order.
|2371|2371| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2372|2372| 							this.WalkToHeldPosition();
|2373|    |-					}
|    |2373|+					
|2374|2374| 				},
|2375|2375| 
|2376|2376| 				"MoveCompleted": function() {
|    | [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
|2400|2400| 					this.StartTimer(prepare, this.healTimers.repeat);
|2401|2401| 
|2402|2402| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2403|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2403|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2404|2404| 
|2405|2405| 					this.FaceTowardsTarget(this.order.data.target);
|2406|2406| 				},
|    | [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
|2612|2612| 					{
|2613|2613| 						// The building was already finished/fully repaired before we arrived;
|2614|2614| 						// let the ConstructionFinished handler handle this.
|2615|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2615|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2616|2616| 						return true;
|2617|2617| 					}
|2618|2618| 
|    | [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
|2612|2612| 					{
|2613|2613| 						// The building was already finished/fully repaired before we arrived;
|2614|2614| 						// let the ConstructionFinished handler handle this.
|2615|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2615|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2616|2616| 						return true;
|2617|2617| 					}
|2618|2618| 
|    | [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
|2655|2655| 					if (!inRange && this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2656|2656| 						this.SetNextState("APPROACHING");
|2657|2657| 					else if (!inRange)
|2658|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2658|+						this.FinishOrder(); // can't approach and isn't in reach
|2659|2659| 				},
|2660|2660| 			},
|2661|2661| 
|    | [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
|2742|2742| 
|2743|2743| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2744|2744| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2745|    |-				{
|    |2745|+				
|2746|2746| 					// We're already walking to the given point, so add this as a order.
|2747|2747| 					this.WalkToTarget(msg.data.newentity, true);
|2748|    |-				}
|    |2748|+				
|2749|2749| 			},
|2750|2750| 		},
|2751|2751| 
|    | [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
|2804|2804| 
|2805|2805| 					// Check that we can garrison here
|2806|2806| 					if (this.CanGarrison(target))
|2807|    |-					{
|    |2807|+					
|2808|2808| 						// Check that we're in range of the garrison target
|2809|2809| 						if (this.CheckGarrisonRange(target))
|2810|2810| 						{
|2880|2880| 								return false;
|2881|2881| 							}
|2882|2882| 						}
|2883|    |-					}
|    |2883|+					
|2884|2884| 					// Garrisoning failed for some reason, so finish the order
|2885|2885| 					this.FinishOrder();
|2886|2886| 					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
|3001|3001| 		"Attacked": function(msg) {
|3002|3002| 			if (this.template.NaturalBehaviour == "skittish" ||
|3003|3003| 			    this.template.NaturalBehaviour == "passive")
|3004|    |-			{
|    |3004|+			
|3005|3005| 				this.Flee(msg.data.attacker, false);
|3006|    |-			}
|    |3006|+			
|3007|3007| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3008|3008| 			{
|3009|3009| 				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
|3010|3010| 					this.Attack(msg.data.attacker, false);
|3011|3011| 			}
|3012|3012| 			else if (this.template.NaturalBehaviour == "domestic")
|3013|    |-			{
|    |3013|+			
|3014|3014| 				// Never flee, stop what we were doing
|3015|3015| 				this.SetNextState("IDLE");
|3016|    |-			}
|    |3016|+			
|3017|3017| 		},
|3018|3018| 
|3019|3019| 		"Order.LeaveFoundation": function(msg) {
|    | [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
|3024|3024| 				this.FinishOrder();
|3025|3025| 				return;
|3026|3026| 			}
|3027|    |-			else
|3028|    |-			{
|    |3027|+			
|3029|3028| 				this.order.data.min = range;
|3030|3029| 				this.SetNextState("WALKING");
|3031|    |-			}
|    |3030|+			
|3032|3031| 		},
|3033|3032| 
|3034|3033| 		"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
|3068|3068| 				}
|3069|3069| 				// Start attacking one of the newly-seen enemy (if any)
|3070|3070| 				else if (this.IsDangerousAnimal())
|3071|    |-				{
|    |3071|+				
|3072|3072| 					this.AttackVisibleEntity(msg.data.added);
|3073|    |-				}
|    |3073|+				
|3074|3074| 
|3075|3075| 				// TODO: if two units enter our range together, we'll attack the
|3076|3076| 				// 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
|3111|3111| 				}
|3112|3112| 				// Start attacking one of the newly-seen enemy (if any)
|3113|3113| 				else if (this.template.NaturalBehaviour == "violent")
|3114|    |-				{
|    |3114|+				
|3115|3115| 					this.AttackVisibleEntity(msg.data.added);
|3116|    |-				}
|    |3116|+				
|3117|3117| 			},
|3118|3118| 
|3119|3119| 			"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
|3128|3128| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3129|3129| 
|3130|3130| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3131|    |-							// only used for domestic animals
|    |3131|+		// only used for domestic animals
|3132|3132| 	},
|3133|3133| };
|3134|3134| 
|    | [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
|3185|3185| 
|3186|3186| UnitAI.prototype.IsAnimal = function()
|3187|3187| {
|3188|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3188|+	return (!!this.template.NaturalBehaviour);
|3189|3189| };
|3190|3190| 
|3191|3191| 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
|3223|3223| UnitAI.prototype.GetGarrisonHolder = function()
|3224|3224| {
|3225|3225| 	if (this.IsGarrisoned())
|3226|    |-	{
|    |3226|+	
|3227|3227| 		for (let order of this.orderQueue)
|3228|3228| 			if (order.type == "Garrison")
|3229|3229| 				return order.data.target;
|3230|    |-	}
|    |3230|+	
|3231|3231| 	return INVALID_ENTITY;
|3232|3232| };
|3233|3233| 
|    | [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
|3301|3301| 		{
|3302|3302| 			let index = this.GetCurrentState().indexOf(".");
|3303|3303| 			if (index != -1)
|3304|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3304|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3305|3305| 			this.Stop(false);
|3306|3306| 		}
|3307|3307| 
|    | [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
|3357|3357| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3358|3358| 			continue;
|3359|3359| 		if (i == 0)
|3360|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3360|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3361|3361| 		else
|3362|3362| 			this.orderQueue.splice(i, 1);
|3363|3363| 		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
|3357|3357| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3358|3358| 			continue;
|3359|3359| 		if (i == 0)
|3360|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3360|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3361|3361| 		else
|3362|3362| 			this.orderQueue.splice(i, 1);
|3363|3363| 		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
|3441|3441| };
|3442|3442| 
|3443|3443| 
|3444|    |-//// FSM linkage functions ////
|    |3444|+// // FSM linkage functions ////
|3445|3445| 
|3446|3446| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3447|3447| 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
|3613|3613| 				continue;
|3614|3614| 			if (this.orderQueue[i].type == type)
|3615|3615| 				continue;
|3616|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3616|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3617|3617| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3618|3618| 			return;
|3619|3619| 		}
|    | [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
|3613|3613| 				continue;
|3614|3614| 			if (this.orderQueue[i].type == type)
|3615|3615| 				continue;
|3616|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3616|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3617|3617| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3618|3618| 			return;
|3619|3619| 		}
|    | [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
|3627|3627| {
|3628|3628| 	// Remember the previous work orders to be able to go back to them later if required
|3629|3629| 	if (data && data.force)
|3630|    |-	{
|    |3630|+	
|3631|3631| 		if (this.IsFormationController())
|3632|3632| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3633|3633| 		else
|3634|3634| 			this.UpdateWorkOrders(type);
|3635|    |-	}
|    |3635|+	
|3636|3636| 
|3637|3637| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3638|3638| 
|    | [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
|3704|3704| 	{
|3705|3705| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3706|3706| 		if (cmpUnitAI)
|3707|    |-		{
|    |3707|+		
|3708|3708| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3709|3709| 			{
|3710|3710| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3713|3713| 					return;
|3714|3714| 				}
|3715|3715| 			}
|3716|    |-		}
|    |3716|+		
|3717|3717| 	}
|3718|3718| 
|3719|3719| 	// 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
|3706|3706| 		if (cmpUnitAI)
|3707|3707| 		{
|3708|3708| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3709|    |-			{
|    |3709|+			
|3710|3710| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3711|3711| 				{
|3712|3712| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3713|3713| 					return;
|3714|3714| 				}
|3715|    |-			}
|    |3715|+			
|3716|3716| 		}
|3717|3717| 	}
|3718|3718| 
|    | [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
|3718|3718| 
|3719|3719| 	// If nothing found, take the unit orders
|3720|3720| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3721|    |-	{
|    |3721|+	
|3722|3722| 		if (isWorkType(this.orderQueue[i].type))
|3723|3723| 		{
|3724|3724| 			this.workOrders = this.orderQueue.slice(i);
|3725|3725| 			return;
|3726|3726| 		}
|3727|    |-	}
|    |3727|+	
|3728|3728| };
|3729|3729| 
|3730|3730| 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
|3784|3784| 	if (data.timerRepeat === undefined)
|3785|3785| 		this.timer = undefined;
|3786|3786| 
|3787|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3787|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3788|3788| };
|3789|3789| 
|3790|3790| /**
|    | [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
|3784|3784| 	if (data.timerRepeat === undefined)
|3785|3785| 		this.timer = undefined;
|3786|3786| 
|3787|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3787|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3788|3788| };
|3789|3789| 
|3790|3790| /**
|    | [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
|3819|3819| 	this.timer = undefined;
|3820|3820| };
|3821|3821| 
|3822|    |-//// Message handlers /////
|    |3822|+// // Message handlers /////
|3823|3823| 
|3824|3824| UnitAI.prototype.OnMotionChanged = function(msg)
|3825|3825| {
|    | [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
|3824|3824| UnitAI.prototype.OnMotionChanged = function(msg)
|3825|3825| {
|3826|3826| 	if (msg.starting && !msg.error)
|3827|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3827|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveStarted", "data": msg});
|3828|3828| 	else if (!msg.starting || msg.error)
|3829|3829| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3830|3830| };
|    | [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
|3824|3824| UnitAI.prototype.OnMotionChanged = function(msg)
|3825|3825| {
|3826|3826| 	if (msg.starting && !msg.error)
|3827|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3827|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg });
|3828|3828| 	else if (!msg.starting || msg.error)
|3829|3829| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3830|3830| };
|    | [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
|3826|3826| 	if (msg.starting && !msg.error)
|3827|3827| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3828|3828| 	else if (!msg.starting || msg.error)
|3829|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3829|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveCompleted", "data": msg});
|3830|3830| };
|3831|3831| 
|3832|3832| 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
|3826|3826| 	if (msg.starting && !msg.error)
|3827|3827| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3828|3828| 	else if (!msg.starting || msg.error)
|3829|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3829|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg });
|3830|3830| };
|3831|3831| 
|3832|3832| 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
|3834|3834| 	// TODO: This is a bit inefficient since every unit listens to every
|3835|3835| 	// construction message - ideally we could scope it to only the one we're building
|3836|3836| 
|3837|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3837|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3838|3838| };
|3839|3839| 
|3840|3840| 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
|3834|3834| 	// TODO: This is a bit inefficient since every unit listens to every
|3835|3835| 	// construction message - ideally we could scope it to only the one we're building
|3836|3836| 
|3837|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3837|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3838|3838| };
|3839|3839| 
|3840|3840| 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
|3859|3859| 
|3860|3860| UnitAI.prototype.OnAttacked = function(msg)
|3861|3861| {
|3862|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3862|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3863|3863| };
|3864|3864| 
|3865|3865| 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
|3859|3859| 
|3860|3860| UnitAI.prototype.OnAttacked = function(msg)
|3861|3861| {
|3862|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3862|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3863|3863| };
|3864|3864| 
|3865|3865| 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
|3864|3864| 
|3865|3865| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3866|3866| {
|3867|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3867|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3868|3868| };
|3869|3869| 
|3870|3870| 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
|3864|3864| 
|3865|3865| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3866|3866| {
|3867|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3867|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3868|3868| };
|3869|3869| 
|3870|3870| 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
|3869|3869| 
|3870|3870| UnitAI.prototype.OnHealthChanged = function(msg)
|3871|3871| {
|3872|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3872|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3873|3873| };
|3874|3874| 
|3875|3875| 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
|3869|3869| 
|3870|3870| UnitAI.prototype.OnHealthChanged = function(msg)
|3871|3871| {
|3872|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3872|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3873|3873| };
|3874|3874| 
|3875|3875| 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
|3875|3875| UnitAI.prototype.OnRangeUpdate = function(msg)
|3876|3876| {
|3877|3877| 	if (msg.tag == this.losRangeQuery)
|3878|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3878|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3879|3879| 	else if (msg.tag == this.losHealRangeQuery)
|3880|3880| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3881|3881| };
|    | [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
|3875|3875| UnitAI.prototype.OnRangeUpdate = function(msg)
|3876|3876| {
|3877|3877| 	if (msg.tag == this.losRangeQuery)
|3878|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3878|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3879|3879| 	else if (msg.tag == this.losHealRangeQuery)
|3880|3880| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3881|3881| };
|    | [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
|3877|3877| 	if (msg.tag == this.losRangeQuery)
|3878|3878| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3879|3879| 	else if (msg.tag == this.losHealRangeQuery)
|3880|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3880|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3881|3881| };
|3882|3882| 
|3883|3883| 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
|3877|3877| 	if (msg.tag == this.losRangeQuery)
|3878|3878| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3879|3879| 	else if (msg.tag == this.losHealRangeQuery)
|3880|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3880|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3881|3881| };
|3882|3882| 
|3883|3883| 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
|3882|3882| 
|3883|3883| UnitAI.prototype.OnPackFinished = function(msg)
|3884|3884| {
|3885|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3885|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3886|3886| };
|3887|3887| 
|3888|3888| //// 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
|3882|3882| 
|3883|3883| UnitAI.prototype.OnPackFinished = function(msg)
|3884|3884| {
|3885|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3885|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3886|3886| };
|3887|3887| 
|3888|3888| //// 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
|3885|3885| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3886|3886| };
|3887|3887| 
|3888|    |-//// Helper functions to be called by the FSM ////
|    |3888|+// // Helper functions to be called by the FSM ////
|3889|3889| 
|3890|3890| UnitAI.prototype.GetWalkSpeed = function()
|3891|3891| {
|    | [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
|3987|3987| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|3988|3988| 		return undefined;
|3989|3989| 
|3990|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |3990|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|3991|3991| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|3992|3992| 		return undefined;
|3993|3993| 
|    | [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
|4072|4072| 			PlaySound(name, member);
|4073|4073| 	}
|4074|4074| 	else
|4075|    |-	{
|    |4075|+	
|4076|4076| 		// Otherwise use our own sounds
|4077|4077| 		PlaySound(name, this.entity);
|4078|    |-	}
|    |4078|+	
|4079|4079| };
|4080|4080| 
|4081|4081| /*
|    | [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
|4168|4168| UnitAI.prototype.MoveTo = function(data, iid, type)
|4169|4169| {
|4170|4170| 	if (data["target"])
|4171|    |-	{
|    |4171|+	
|4172|4172| 		if (data["min"] || data["max"])
|4173|4173| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4174|4174| 		else
|4178|4178| 			else
|4179|4179| 				return this.MoveToTargetRange(data.target, iid, type);
|4180|4180| 		}
|4181|    |-	}
|    |4181|+	
|4182|4182| 	else
|4183|4183| 	{
|4184|4184| 		if (data["min"] || data["max"])
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["target"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4167|4167|  */
|4168|4168| UnitAI.prototype.MoveTo = function(data, iid, type)
|4169|4169| {
|4170|    |-	if (data["target"])
|    |4170|+	if (data.target)
|4171|4171| 	{
|4172|4172| 		if (data["min"] || data["max"])
|4173|4173| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["min"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4169|4169| {
|4170|4170| 	if (data["target"])
|4171|4171| 	{
|4172|    |-		if (data["min"] || data["max"])
|    |4172|+		if (data.min || data["max"])
|4173|4173| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4174|4174| 		else
|4175|4175| 		{
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["max"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4169|4169| {
|4170|4170| 	if (data["target"])
|4171|4171| 	{
|4172|    |-		if (data["min"] || data["max"])
|    |4172|+		if (data["min"] || data.max)
|4173|4173| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4174|4174| 		else
|4175|4175| 		{
|    | [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
|4172|4172| 		if (data["min"] || data["max"])
|4173|4173| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4174|4174| 		else
|4175|    |-		{
|    |4175|+		
|4176|4176| 			if (!iid)
|4177|4177| 				return this.MoveToTarget(data.target);
|4178|4178| 			else
|4179|4179| 				return this.MoveToTargetRange(data.target, iid, type);
|4180|    |-		}
|    |4180|+		
|4181|4181| 	}
|4182|4182| 	else
|4183|4183| 	{
|    | [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
|4171|4171| 	{
|4172|4172| 		if (data["min"] || data["max"])
|4173|4173| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4174|    |-		else
|4175|    |-		{
|    |4174|+		
|4176|4175| 			if (!iid)
|4177|4176| 				return this.MoveToTarget(data.target);
|4178|4177| 			else
|4179|4178| 				return this.MoveToTargetRange(data.target, iid, type);
|4180|    |-		}
|    |4179|+		
|4181|4180| 	}
|4182|4181| 	else
|4183|4182| 	{
|    | [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
|4175|4175| 		{
|4176|4176| 			if (!iid)
|4177|4177| 				return this.MoveToTarget(data.target);
|4178|    |-			else
|4179|    |-				return this.MoveToTargetRange(data.target, iid, type);
|    |4178|+			return this.MoveToTargetRange(data.target, iid, type);
|4180|4179| 		}
|4181|4180| 	}
|4182|4181| 	else
|    | [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
|4180|4180| 		}
|4181|4181| 	}
|4182|4182| 	else
|4183|    |-	{
|    |4183|+	
|4184|4184| 		if (data["min"] || data["max"])
|4185|4185| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4186|4186| 		else
|4187|4187| 			return this.MoveToPoint(data.x, data.z);
|4188|    |-	}
|    |4188|+	
|4189|4189| }
|4190|4190| 
|4191|4191| UnitAI.prototype.MoveToPoint = function(x, z)
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["min"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4181|4181| 	}
|4182|4182| 	else
|4183|4183| 	{
|4184|    |-		if (data["min"] || data["max"])
|    |4184|+		if (data.min || data["max"])
|4185|4185| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4186|4186| 		else
|4187|4187| 			return this.MoveToPoint(data.x, data.z);
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["max"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4181|4181| 	}
|4182|4182| 	else
|4183|4183| 	{
|4184|    |-		if (data["min"] || data["max"])
|    |4184|+		if (data["min"] || data.max)
|4185|4185| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4186|4186| 		else
|4187|4187| 			return this.MoveToPoint(data.x, data.z);
|    | [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
|4183|4183| 	{
|4184|4184| 		if (data["min"] || data["max"])
|4185|4185| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4186|    |-		else
|4187|    |-			return this.MoveToPoint(data.x, data.z);
|    |4186|+		return this.MoveToPoint(data.x, data.z);
|4188|4187| 	}
|4189|4188| }
|4190|4189| 
|    | [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
|4186|4186| 		else
|4187|4187| 			return this.MoveToPoint(data.x, data.z);
|4188|4188| 	}
|4189|    |-}
|    |4189|+};
|4190|4190| 
|4191|4191| UnitAI.prototype.MoveToPoint = function(x, z)
|4192|4192| {
|    | [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
|4270|4270| 	else
|4271|4271| 		// return false? Or hope you come close enough?
|4272|4272| 		var parabolicMaxRange = 0;
|4273|    |-		//return false;
|    |4273|+		// return false;
|4274|4274| 
|4275|4275| 	// the parabole changes while walking, take something in the middle
|4276|4276| 	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
|4335|4335| 	if (this.IsFormationMember())
|4336|4336| 	{
|4337|4337| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4338|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4339|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4338|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4339|+			cmpFormationUnitAI.order.data.target == target)
|4340|4340| 			return true;
|4341|4341| 	}
|4342|4342| 
|    | [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
|4503|4503| UnitAI.prototype.AttackEntityInZone = function(ents)
|4504|4504| {
|4505|4505| 	var target = ents.find(target =>
|4506|    |-		this.CanAttack(target)
|4507|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4506|+		this.CanAttack(target) &&
|    |4507|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4508|4508| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4509|4509| 	);
|4510|4510| 	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
|4504|4504| {
|4505|4505| 	var target = ents.find(target =>
|4506|4506| 		this.CanAttack(target)
|4507|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4508|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4507|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4508|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4509|4509| 	);
|4510|4510| 	if (!target)
|4511|4511| 		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
|4568|4568| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4569|4569| 	if (this.isGuardOf)
|4570|4570| 	{
|4571|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4571|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4572|4572| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4573|4573| 		if (cmpUnitAI && cmpAttack &&
|4574|4574| 		    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
|4572|4572| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4573|4573| 		if (cmpUnitAI && cmpAttack &&
|4574|4574| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4575|    |-				return false;
|    |4575|+			return false;
|4576|4576| 	}
|4577|4577| 
|4578|4578| 	// 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
|4577|4577| 
|4578|4578| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4579|4579| 	if (this.GetStance().respondHoldGround)
|4580|    |-	{
|    |4580|+	
|4581|4581| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4582|4582| 			return true;
|4583|    |-	}
|    |4583|+	
|4584|4584| 
|4585|4585| 	// Stop if it's left our vision range, unless we're especially persistent
|4586|4586| 	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
|4584|4584| 
|4585|4585| 	// Stop if it's left our vision range, unless we're especially persistent
|4586|4586| 	if (!this.GetStance().respondChaseBeyondVision)
|4587|    |-	{
|    |4587|+	
|4588|4588| 		if (!this.CheckTargetIsInVisionRange(target))
|4589|4589| 			return true;
|4590|    |-	}
|    |4590|+	
|4591|4591| 
|4592|4592| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4593|4593| 	// 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
|4610|4610| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4611|4611| 	if (this.isGuardOf)
|4612|4612| 	{
|4613|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4613|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4614|4614| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4615|4615| 		if (cmpUnitAI && cmpAttack &&
|4616|4616| 		    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
|4623|4623| 	return false;
|4624|4624| };
|4625|4625| 
|4626|    |-//// External interface functions ////
|    |4626|+// // External interface functions ////
|4627|4627| 
|4628|4628| UnitAI.prototype.SetFormationController = function(ent)
|4629|4629| {
|    | [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
|4633|4633| 	// of our own formation (or ourself if not in formation)
|4634|4634| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4635|4635| 	if (cmpObstruction)
|4636|    |-	{
|    |4636|+	
|4637|4637| 		if (ent == INVALID_ENTITY)
|4638|4638| 			cmpObstruction.SetControlGroup(this.entity);
|4639|4639| 		else
|4640|4640| 			cmpObstruction.SetControlGroup(ent);
|4641|    |-	}
|    |4641|+	
|4642|4642| 
|4643|4643| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4644|4644| 	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
|4776|4776| 	// if we already had an old guard order, do nothing if the target is the same
|4777|4777| 	// and the order is running, otherwise remove the previous order
|4778|4778| 	if (this.isGuardOf)
|4779|    |-	{
|    |4779|+	
|4780|4780| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4781|4781| 			return;
|4782|4782| 		else
|4783|4783| 			this.RemoveGuard();
|4784|    |-	}
|    |4784|+	
|4785|4785| 
|4786|4786| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4787|4787| };
|    | [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
|4779|4779| 	{
|4780|4780| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4781|4781| 			return;
|4782|    |-		else
|4783|    |-			this.RemoveGuard();
|    |4782|+		this.RemoveGuard();
|4784|4783| 	}
|4785|4784| 
|4786|4785| 	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
|4950|4950| 			this.WalkToTarget(target, queued);
|4951|4951| 		return;
|4952|4952| 	}
|4953|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |4953|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|4954|4954| };
|4955|4955| 
|4956|4956| /**
|    | [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
|5099|5099| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5100|5100| 	{
|5101|5101| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5102|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5102|+		if (cmpTrader.HasBothMarkets() &&
|5103|5103| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5104|5104| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5105|5105| 		{
|    | [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
|5380|5380| 				{
|5381|5381| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5382|5382| 					var targetClasses = this.order.data.targetClasses;
|5383|    |-					if (targetClasses.attack && cmpIdentity
|5384|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5383|+					if (targetClasses.attack && cmpIdentity &&
|    |5384|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5385|5385| 						continue;
|5386|5386| 					if (targetClasses.avoid && cmpIdentity
|5387|5387| 						&& 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
|5383|5383| 					if (targetClasses.attack && cmpIdentity
|5384|5384| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5385|5385| 						continue;
|5386|    |-					if (targetClasses.avoid && cmpIdentity
|5387|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5386|+					if (targetClasses.avoid && cmpIdentity &&
|    |5387|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5388|5388| 						continue;
|5389|5389| 					// Only used by the AIs to prevent some choices of targets
|5390|5390| 					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
|5406|5406| 		{
|5407|5407| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5408|5408| 			var targetClasses = this.order.data.targetClasses;
|5409|    |-			if (cmpIdentity && targetClasses.attack
|5410|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5409|+			if (cmpIdentity && targetClasses.attack &&
|    |5410|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5411|5411| 				continue;
|5412|5412| 			if (cmpIdentity && targetClasses.avoid
|5413|5413| 				&& 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
|5409|5409| 			if (cmpIdentity && targetClasses.attack
|5410|5410| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5411|5411| 				continue;
|5412|    |-			if (cmpIdentity && targetClasses.avoid
|5413|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5412|+			if (cmpIdentity && targetClasses.avoid &&
|    |5413|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5414|5414| 				continue;
|5415|5415| 			// Only used by the AIs to prevent some choices of targets
|5416|5416| 			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
|5552|5552| 
|5553|5553| UnitAI.prototype.SetHeldPosition = function(x, z)
|5554|5554| {
|5555|    |-	this.heldPosition = {"x": x, "z": z};
|    |5555|+	this.heldPosition = { "x": x, "z": z};
|5556|5556| };
|5557|5557| 
|5558|5558| 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
|5552|5552| 
|5553|5553| UnitAI.prototype.SetHeldPosition = function(x, z)
|5554|5554| {
|5555|    |-	this.heldPosition = {"x": x, "z": z};
|    |5555|+	this.heldPosition = {"x": x, "z": z };
|5556|5556| };
|5557|5557| 
|5558|5558| 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
|5579|5579| 	return false;
|5580|5580| };
|5581|5581| 
|5582|    |-//// Helper functions ////
|    |5582|+// // Helper functions ////
|5583|5583| 
|5584|5584| UnitAI.prototype.CanAttack = function(target)
|5585|5585| {
|    | [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
|5783|5783| 	return cmpPack && cmpPack.IsPacking();
|5784|5784| };
|5785|5785| 
|5786|    |-//// Formation specific functions ////
|    |5786|+// // Formation specific functions ////
|5787|5787| 
|5788|5788| UnitAI.prototype.IsAttackingAsFormation = function()
|5789|5789| {
|    | [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
|5788|5788| UnitAI.prototype.IsAttackingAsFormation = function()
|5789|5789| {
|5790|5790| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5791|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5792|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5791|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5792|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5793|5793| };
|5794|5794| 
|5795|5795| //// 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
|5792|5792| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5793|5793| };
|5794|5794| 
|5795|    |-//// Animal specific functions ////
|    |5795|+// // Animal specific functions ////
|5796|5796| 
|5797|5797| UnitAI.prototype.MoveRandomly = function(distance)
|5798|5798| {

binaries/data/mods/public/simulation/components/UnitAI.js
| 331| »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'Order.WalkToTarget' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
| 895| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
| 920| »   »   »   "enter":·function(msg)·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
| 938| »   »   »   "leave":·function(msg)·{
|    | [NORMAL] ESLintBear (no-dupe-keys):
|    | Duplicate key 'leave'.

binaries/data/mods/public/simulation/components/UnitAI.js
| 973| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1036| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1074| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1107| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1320| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1505| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1525| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1554| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1708| »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1758| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|1844| »   »   »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|2016| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2107| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2290| »   »   »   »   »   »   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
|2345| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2463| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2528| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2565| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2774| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|2957| »   »   »   »   "enter":·function()·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Expected to return a value at the end of method 'enter'.

binaries/data/mods/public/simulation/components/UnitAI.js
|3689| »   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
|4490| »   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
|4505| »   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
|4551| »   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
|4574| »   »   ····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
|5030| »   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
| 358| »   »   ····&&·(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
| 938| »   »   »   "leave":·function(msg)·{
|    | [NORMAL] JSHintBear:
|    | Duplicate key 'leave'.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2010| »   »   »   »   »   »   &&·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
|2285| »   »   »   »   »   var·cmpResourceGatherer·=·Engine.QueryInterface(this.entity,·IID_ResourceGatherer);
|    | [NORMAL] JSHintBear:
|    | 'cmpResourceGatherer' is already defined.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2304| »   »   »   »   »   »   »   ||·(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
|2305| »   »   »   »   »   »   »   &&·(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
|2325| »   »   »   »   »   var·nearby·=·this.FindNearestDropsite(resourceType.generic);
|    | [NORMAL] JSHintBear:
|    | 'nearby' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4170| »   if·(data["target"])
|    | [NORMAL] JSHintBear:
|    | ['target'] is better written in dot notation.

binaries/data/mods/public/simulation/components/UnitAI.js
|4172| »   »   if·(data["min"]·||·data["max"])
|    | [NORMAL] JSHintBear:
|    | ['min'] is better written in dot notation.

binaries/data/mods/public/simulation/components/UnitAI.js
|4172| »   »   if·(data["min"]·||·data["max"])
|    | [NORMAL] JSHintBear:
|    | ['max'] is better written in dot notation.

binaries/data/mods/public/simulation/components/UnitAI.js
|4184| »   »   if·(data["min"]·||·data["max"])
|    | [NORMAL] JSHintBear:
|    | ['min'] is better written in dot notation.

binaries/data/mods/public/simulation/components/UnitAI.js
|4184| »   »   if·(data["min"]·||·data["max"])
|    | [NORMAL] JSHintBear:
|    | ['max'] is better written in dot notation.

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4283| »   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
|4339| »   »   »   &&·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
|4507| »   »   &&·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
|4508| »   »   &&·(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
|5030| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

binaries/data/mods/public/simulation/components/UnitAI.js
|5384| »   »   »   »   »   »   &&·!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
|5387| »   »   »   »   »   »   &&·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
|5400| »   var·targets·=·this.GetTargetsFromUnit();
|    | [NORMAL] JSHintBear:
|    | 'targets' is already defined.

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5410| »   »   »   »   &&·!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
|5413| »   »   »   »   &&·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
|5488| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [NORMAL] JSHintBear:
|    | 'cmpVision' is already defined.

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5510| »   »   var·cmpVision·=·Engine.QueryInterface(this.entity,·IID_Vision);
|    | [MAJOR] JSHintBear:
|    | Too many errors. (93% scanned).
Executing section cli...

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

This revision was not accepted when it landed; it landed in state Needs Review.Jun 6 2019, 9:37 PM
This revision was automatically updated to reflect the committed changes.