Page MenuHomeWildfire Games

Support attack-ground for ranged units.
Needs ReviewPublic

Authored by Freagarach on Tue, Jun 11, 10:05 PM.

Details

Reviewers
wraitii
Krinkle
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#1777
Summary

This patch aims at giving ranged units the ability to attack-ground.
ToDo:

  • Allow buildings to attack-ground as well (Probably wait for D1958).
  • Assign a hotkey?
  • Let someone create an icon (and cursor) for this.
  • Give visual feedback on the increase/decrease of the bombard radius.
  • Set the defaults somewhere, and be able to change them in the menu?
  • UnitTests.
Test Plan

Select a ranged unit and click the placeholder button (two swords), next click on a location. Note that when an enemy passes that location it gets damaged.

Diff Detail

Repository
rP 0 A.D. Public Repository
Branch
/ps/trunk
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 8064
Build 13126: Vulcan BuildJenkins
Build 13125: arc lint + arc unit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
wraitii added inline comments.Thu, Jun 20, 7:47 PM
binaries/data/mods/public/simulation/components/FormationAttack.js
44

I would suggest just letting GetBestAttackAgainst handle Vector position, and return the one with the best DPS and range or something.

binaries/data/mods/public/simulation/components/UnitAI.js
449

Don't hard-code this. What are you trying to do here / need this for? If it's just for GetRange, see above.

1820

Comment is outdated, but yes.

1925

I think it would be better to move this earlier - also not sure it's needed?

2018

Why did you need to add this? Seems unrelated.

4758

I'm assuming this is why you need the "approaching" above...
I think this function doesn't do what it's named to do. Namely, it happens in Timers in multiple orders and makes the unit try and approach the target again - presumably because it went away, but it's quite possible that we actually were never in range.

It's probably not for this diff, but I think it should be removed / renamed and it's behaviour changed in general.

In the meantime, I would actually return true here because it's more consistent with what unitAI should do.

Freagarach marked an inline comment as done.Thu, Jun 20, 8:36 PM

I think you should be able to make the regular attack work with formations too... Maybe a bit more work.

I'm trying, I'm trying ;)

A general remark: it looks to me like most of the code inside if (!attackground) is the same: perhaps you should just add a "GetTargetPosition" function to abstract away the target being an entity ID or a vector3D. It's kind of ugly in the high-level functions.

Yep, good one.

Also: I would add this ability only to siege.

For now, this is just easy testing because it is a starting unit ;)

binaries/data/mods/public/simulation/components/FormationAttack.js
44

Yep, was using that today ;)

binaries/data/mods/public/simulation/components/UnitAI.js
1925

It is still needed, but on my ToDo list ;)

2018

If attack ground is asked, and for some reason the unit is not yet in range of the target location we should move again. Not sure if it is needed indeed.

4758

Agreed, but that sends the entity into a "CHASING"-state, meaning it would run to its target, which is weird ;)

Stan added inline comments.Thu, Jun 20, 9:11 PM
binaries/data/mods/public/simulation/components/Attack.js
530

Nah I don't I like clean objects :) and consistency :) But yeah that's probably asking for trouble :)

binaries/data/mods/public/simulation/components/UnitAI.js
4579

Make sure that the two functions do the same thing :) The one in unit ai is bit more complex maybe it was patched.

Freagarach updated this revision to Diff 8570.Thu, Jun 20, 10:22 PM
Freagarach marked 9 inline comments as done.
  • Some testing on formations.
  • Created "GetTargetPosition" in "UnitAI.js".
  • Removed height-check in "Attack.js".
  • Removed hard-coding of "Ranged"-type in "AttackGround"-order.
  • ...
Freagarach marked an inline comment as done.Thu, Jun 20, 10:25 PM
Freagarach added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
4827

JSDOC.

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-warn("FormationAttack.js; GetRange init: " + uneval(target));
|    |  26|+	warn("FormationAttack.js; GetRange init: " + uneval(target));
|  27|  27| 	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": 0};
|  28|  28| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  29|  29| 	if (!cmpFormation)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|  26| warn("FormationAttack.js; GetRange init: " + uneval(target));
|  27|    |-	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": 0};
|    |  27|+	let result = { "min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": 0};
|  28|  28| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  29|  29| 	if (!cmpFormation)
|  30|  30| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|  26| warn("FormationAttack.js; GetRange init: " + uneval(target));
|  27|    |-	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": 0};
|    |  27|+	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": 0 };
|  28|  28| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  29|  29| 	if (!cmpFormation)
|  30|  30| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  52|  52| 				result.max = range.max;
|  53|  53| 		}
|  54|  54| 		else
|  55|    |-		{
|    |  55|+		
|  56|  56| 			if (range.max > result.max || range.max < 0)
|  57|  57| 				result.max = range.max;
|  58|    |-		}
|    |  58|+		
|  59|  59| 		if (range.min < result.min)
|  60|  60| 			result.min = range.min;
|  61|  61| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  64|  64| 
|  65|  65| 	if (result.max >= 0)
|  66|  66| 		result.max += extraRange;
|  67|    |-warn("FormationAttack.js; GetRange: End");
|    |  67|+	warn("FormationAttack.js; GetRange: End");
|  68|  68| 	return result;
|  69|  69| };
|  70|  70| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  23|  23| 	let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|    |-			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|    |  26|+		(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|    |-			0,
|    |  27|+		0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|    |-			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|    |  28|+		(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|  31|  31| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 114| 114| 
| 115| 115| 	// Do this first in case the direct hit kills the target
| 116| 116| 	if (data.isSplash)
| 117|    |-	{
|    | 117|+	
| 118| 118| 		this.CauseSplashDamage({
| 119| 119| 			"attacker": data.attacker,
| 120| 120| 			"origin": Vector2D.from3D(data.position),
| 127| 127| 			"type": data.type,
| 128| 128| 			"attackerOwner": data.attackerOwner
| 129| 129| 		});
| 130|    |-	}
|    | 130|+	
| 131| 131| 
| 132| 132| 	let cmpProjectileManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ProjectileManager);
| 133| 133| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 225| 225| 				damageMultiplier = 0;
| 226| 226| 		}
| 227| 227| 		else // In case someone calls this function with an invalid shape.
| 228|    |-		{
|    | 228|+		
| 229| 229| 			warn("The " + data.shape + " splash damage shape is not implemented!");
| 230|    |-		}
|    | 230|+		
| 231| 231| 
| 232| 232| 		if (data.splashBonus)
| 233| 233| 			damageMultiplier *= GetDamageBonus(data.attacker, ent, data.type, data.splashBonus);

binaries/data/mods/public/gui/session/unit_actions.js
| 590| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 416| 416| 
| 417| 417| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For units, take the range in front of it, no spread. So angle = 0
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423| 423| 			{
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421| 421| 			}
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426|    |-			}
|    | 426|+			
| 427| 427| 			else
| 428| 428| 			{
| 429| 429| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426| 426| 			}
| 427| 427| 			else
| 428|    |-			{
|    | 428|+			
| 429| 429| 				// not in world, set a default?
| 430| 430| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 431|    |-			}
|    | 431|+			
| 432| 432| 		}
| 433| 433| 
| 434| 434| 		ret.attack.attackGround = cmpAttack.CanAttackGround();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 798| 798| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 799| 799| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 800| 800| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 801|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 801|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 802| 802| 	}
| 803| 803| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 804| 804| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1317|1317| 		}
|1318|1318| 	}
|1319|1319| 	else
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1322|1322| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1323|1323| 		// wall piece.
|1338|1338| 			"pos": start.pos,
|1339|1339| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1340|1340| 		});
|1341|    |-	}
|    |1341|+	
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|1344| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1341|1341| 	}
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|    |-	{
|    |1344|+	
|1345|1345| 		// Analogous to the starting side case above
|1346|1346| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1347|1347| 		{
|1379|1379| 				"pos": end.pos,
|1380|1380| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1381|1381| 			});
|1382|    |-	}
|    |1382|+	
|1383|1383| 
|1384|1384| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1385|1385| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1557|1557| 
|1558|1558| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1559|1559| 		if (cmpVisual)
|1560|    |-		{
|    |1560|+		
|1561|1561| 			if (!allPiecesValid || !canAfford)
|1562|1562| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1563|1563| 			else
|1564|1564| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1565|    |-		}
|    |1565|+		
|1566|1566| 
|1567|1567| 		++entPool.numUsed;
|1568|1568| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1631|1631| 			{
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|    |-						"x": pos.x,
|    |1634|+					"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|    |-						"z": pos.z,
|    |1635|+					"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|    |-						"angle": cmpPosition.GetRotation().y,
|    |1636|+					"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|    |-						"ent": ent
|    |1637|+					"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|1640|1640| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1780|1780| 	}
|1781|1781| 	else if (data.target === secondMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = {
|1784|1784| 			"type": "is second",
|1785|1785| 			"gain": cmpEntityTrader.GetGoods().amount,
|1786|1786| 		};
|1787|    |-	}
|    |1787|+	
|1788|1788| 	else if (!firstMarket)
|1789|1789| 	{
|1790|1790| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1786|1786| 		};
|1787|1787| 	}
|1788|1788| 	else if (!firstMarket)
|1789|    |-	{
|    |1789|+	
|1790|1790| 		result = { "type": "set first" };
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else if (!secondMarket)
|1793|1793| 	{
|1794|1794| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		result = { "type": "set first" };
|1791|1791| 	}
|1792|1792| 	else if (!secondMarket)
|1793|    |-	{
|    |1793|+	
|1794|1794| 		result = {
|1795|1795| 			"type": "set second",
|1796|1796| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1797|1797| 		};
|1798|    |-	}
|    |1798|+	
|1799|1799| 	else
|1800|1800| 	{
|1801|1801| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1797|1797| 		};
|1798|1798| 	}
|1799|1799| 	else
|1800|    |-	{
|    |1800|+	
|1801|1801| 		// Else both markets are not null and target is different from them
|1802|1802| 		result = { "type": "set first" };
|1803|    |-	}
|    |1803|+	
|1804|1804| 	return result;
|1805|1805| };
|1806|1806| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 394| 394| function getRepairTimeTooltip(entState)
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397|    |-			"label": headerFont(translate("Number of repairers:")),
|    | 397|+		"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398|    |-			"details": entState.repairable.numBuilders
|    | 398|+		"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399|    |-		}) + "\n" + (entState.repairable.numBuilders ?
|    | 399|+	}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
| 402| 402| 			"Add another worker to speed up the repairs by %(second)s seconds.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 416| 416| function getBuildTimeTooltip(entState)
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419|    |-			"label": headerFont(translate("Number of builders:")),
|    | 419|+		"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420|    |-			"details": entState.foundation.numBuilders
|    | 420|+		"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421|    |-		}) + "\n" + (entState.foundation.numBuilders ?
|    | 421|+	}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
| 424| 424| 			"Add another worker to speed up the construction by %(second)s seconds.",
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 205| 205| 	"attack-ground": function(player, cmd, data)
| 206| 206| 	{
| 207| 207| 		let entities = [];
| 208|    |-		let target = new Vector3D(cmd.target.x, cmd.target.y, cmd.target.z)
|    | 208|+		let target = new Vector3D(cmd.target.x, cmd.target.y, cmd.target.z);
| 209| 209| 		for (let ent of data.entities)
| 210| 210| 		{
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 209| 209| 		for (let ent of data.entities)
| 210| 210| 		{
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
| 212|    |-			if (cmpAttack && cmpAttack.CanAttackGround()){
|    | 212|+			if (cmpAttack && cmpAttack.CanAttackGround())
| 213| 213| 				entities.push(ent);
| 214| 214| //				cmpUnitAI.AttackGround(target, cmd.queued);
| 215|    |-			}
|    | 215|+			
| 216| 216| 		}
| 217| 217| 		GetFormationUnitAIs(entities, player).forEach(cmpUnitAI => {
| 218| 218| 			cmpUnitAI.AttackGround(target, cmd.queued);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
| 212| 212| 			if (cmpAttack && cmpAttack.CanAttackGround()){
| 213| 213| 				entities.push(ent);
| 214|    |-//				cmpUnitAI.AttackGround(target, cmd.queued);
|    | 214|+				//				cmpUnitAI.AttackGround(target, cmd.queued);
| 215| 215| 			}
| 216| 216| 		}
| 217| 217| 		GetFormationUnitAIs(entities, player).forEach(cmpUnitAI => {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 347| 347| 			{
| 348| 348| 				var list = queue.GetEntitiesList();
| 349| 349| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 350|    |-				{
|    | 350|+				
| 351| 351| 					for (var promoted of cmd.promoted)
| 352| 352| 					{
| 353| 353| 						if (list.indexOf(promoted) === -1)
| 355| 355| 						cmd.template = promoted;
| 356| 356| 						break;
| 357| 357| 					}
| 358|    |-				}
|    | 358|+				
| 359| 359| 			}
| 360| 360| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 361| 361| 				if ("metadata" in cmd)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 554| 554| 			if (cmpGarrisonHolder)
| 555| 555| 			{
| 556| 556| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 557|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 558|    |-				    && player != +cmd.owner)
|    | 557|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 558|+				    player != +cmd.owner)
| 559| 559| 						continue;
| 560| 560| 
| 561| 561| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 556| 556| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 557| 557| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 558| 558| 				    && player != +cmd.owner)
| 559|    |-						continue;
|    | 559|+					continue;
| 560| 560| 
| 561| 561| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 562| 562| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 966| 966| 		{
| 967| 967| 			var count = 0;
| 968| 968| 			for (let j = 0; j < length - 1; ++j)
| 969|    |-			{
|    | 969|+			
| 970| 970| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 971| 971| 					++count;
| 972| 972| 				else
| 973| 973| 					break;
| 974|    |-			}
|    | 974|+			
| 975| 975| 			consec[i] = count;
| 976| 976| 		}
| 977| 977| 		var start = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 977| 977| 		var start = 0;
| 978| 978| 		var count = 0;
| 979| 979| 		for (var c in consec)
| 980|    |-		{
|    | 980|+		
| 981| 981| 			if (consec[c] > count)
| 982| 982| 			{
| 983| 983| 				start = c;
| 984| 984| 				count = consec[c];
| 985| 985| 			}
| 986|    |-		}
|    | 986|+		
| 987| 987| 
| 988| 988| 		// If we've found a shoreline, stop searching
| 989| 989| 		if (count != numPoints-1)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1160|1160| 
|1161|1161| 	// send Metadata info if any
|1162|1162| 	if (cmd.metadata)
|1163|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1163|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1164|1164| 
|1165|1165| 	// Tell the units to start building this new entity
|1166|1166| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1160|1160| 
|1161|1161| 	// send Metadata info if any
|1162|1162| 	if (cmd.metadata)
|1163|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1163|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1164|1164| 
|1165|1165| 	// Tell the units to start building this new entity
|1166|1166| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1160|1160| 
|1161|1161| 	// send Metadata info if any
|1162|1162| 	if (cmd.metadata)
|1163|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1163|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1164|1164| 
|1165|1165| 	// Tell the units to start building this new entity
|1166|1166| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1164|1164| 
|1165|1165| 	// Tell the units to start building this new entity
|1166|1166| 	if (cmd.autorepair)
|1167|    |-	{
|    |1167|+	
|1168|1168| 		ProcessCommand(player, {
|1169|1169| 			"type": "repair",
|1170|1170| 			"entities": entities,
|1172|1172| 			"autocontinue": cmd.autocontinue,
|1173|1173| 			"queued": cmd.queued
|1174|1174| 		});
|1175|    |-	}
|    |1175|+	
|1176|1176| 
|1177|1177| 	return ent;
|1178|1178| }
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1268|1268| 		}
|1269|1269| 
|1270|1270| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1271|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1271|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1272|1272| 	}
|1273|1273| 
|1274|1274| 	var i = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1285|1285| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1286|1286| 		// start position snapping (implying that the first entity we build must be a tower)
|1287|1287| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1288|    |-		{
|    |1288|+		
|1289|1289| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1290|1290| 			{
|1291|1291|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1292|1292|     			break;
|1293|1293| 			}
|1294|    |-		}
|    |1294|+		
|1295|1295| 
|1296|1296| 		var constructPieceCmd = {
|1297|1297| 			"type": "construct",
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1332|1332| 
|1333|1333| 				if (i > 0)
|1334|1334| 				{
|1335|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1335|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1336|1336| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1337|1337| 					// TODO: ensure that cmpPreviousObstruction exists
|1338|1338| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1390|1390| 		}
|1391|1391| 
|1392|1392| 		if (piece.template == cmd.wallSet.templates.tower)
|1393|    |-		{
|    |1393|+		
|1394|1394| 			// encountered a tower entity, update the last tower control group
|1395|1395| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1396|    |-		}
|    |1396|+		
|1397|1397| 		else
|1398|1398| 		{
|1399|1399| 			// Encountered a non-tower entity, update its secondary control group to 'lastTowerControlGroup'.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1404|1404| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1405|1405| 			{
|1406|1406| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1407|    |-				{
|    |1407|+				
|1408|1408| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1409|    |-				}
|    |1409|+				
|1410|1410| 			}
|1411|1411| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1412|1412| 			{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1479|1479| 	}
|1480|1480| 
|1481|1481| 	if (formedEnts.length == 0)
|1482|    |-	{
|    |1482|+	
|1483|1483| 		// No units support the formation - return all the others
|1484|1484| 		return nonformedUnitAIs;
|1485|    |-	}
|    |1485|+	
|1486|1486| 
|1487|1487| 	// Find what formations the formationable selected entities are currently in
|1488|1488| 	var formation = ExtractFormations(formedEnts);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1495|1495| 		// Check that all its members are selected
|1496|1496| 		var fid = formationIds[0];
|1497|1497| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1498|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1499|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1498|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1499|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1500|1500| 		{
|1501|1501| 			cmpFormation.DeleteTwinFormations();
|1502|1502| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1527|1527| 					{
|1528|1528| 						var template = cmpUnitAI.GetFormationTemplate();
|1529|1529| 						if (lastFormationTemplate === undefined)
|1530|    |-						{
|    |1530|+						
|1531|1531| 							lastFormationTemplate = template;
|1532|    |-						}
|    |1532|+						
|1533|1533| 						else if (lastFormationTemplate != template)
|1534|1534| 						{
|1535|1535| 							lastFormationTemplate = undefined;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1603|1603| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1604|1604| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1605|1605| 				if (matrix[i][j] < distSq)
|1606|    |-					closeClusters = [i,j];
|    |1606|+					closeClusters = [i, j];
|1607|1607| 
|1608|1608| 		// if no more close clusters found, just return all found clusters so far
|1609|1609| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		}
|1626|1626| 		// remove the rows and columns in the matrix for the merged clusters,
|1627|1627| 		// and the clusters themselves from the cluster list
|1628|    |-		clusters.splice(closeClusters[0],1);
|    |1628|+		clusters.splice(closeClusters[0], 1);
|1629|1629| 		clusters.splice(closeClusters[1],1);
|1630|1630| 		matrix.splice(closeClusters[0],1);
|1631|1631| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1626|1626| 		// remove the rows and columns in the matrix for the merged clusters,
|1627|1627| 		// and the clusters themselves from the cluster list
|1628|1628| 		clusters.splice(closeClusters[0],1);
|1629|    |-		clusters.splice(closeClusters[1],1);
|    |1629|+		clusters.splice(closeClusters[1], 1);
|1630|1630| 		matrix.splice(closeClusters[0],1);
|1631|1631| 		matrix.splice(closeClusters[1],1);
|1632|1632| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1627|1627| 		// and the clusters themselves from the cluster list
|1628|1628| 		clusters.splice(closeClusters[0],1);
|1629|1629| 		clusters.splice(closeClusters[1],1);
|1630|    |-		matrix.splice(closeClusters[0],1);
|    |1630|+		matrix.splice(closeClusters[0], 1);
|1631|1631| 		matrix.splice(closeClusters[1],1);
|1632|1632| 		for (let i = 0; i < matrix.length; ++i)
|1633|1633| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1628|1628| 		clusters.splice(closeClusters[0],1);
|1629|1629| 		clusters.splice(closeClusters[1],1);
|1630|1630| 		matrix.splice(closeClusters[0],1);
|1631|    |-		matrix.splice(closeClusters[1],1);
|    |1631|+		matrix.splice(closeClusters[1], 1);
|1632|1632| 		for (let i = 0; i < matrix.length; ++i)
|1633|1633| 		{
|1634|1634| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1632|1632| 		for (let i = 0; i < matrix.length; ++i)
|1633|1633| 		{
|1634|1634| 			if (matrix[i].length > closeClusters[0])
|1635|    |-				matrix[i].splice(closeClusters[0],1);
|    |1635|+				matrix[i].splice(closeClusters[0], 1);
|1636|1636| 			if (matrix[i].length > closeClusters[1])
|1637|1637| 				matrix[i].splice(closeClusters[1],1);
|1638|1638| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1634|1634| 			if (matrix[i].length > closeClusters[0])
|1635|1635| 				matrix[i].splice(closeClusters[0],1);
|1636|1636| 			if (matrix[i].length > closeClusters[1])
|1637|    |-				matrix[i].splice(closeClusters[1],1);
|    |1637|+				matrix[i].splice(closeClusters[1], 1);
|1638|1638| 		}
|1639|1639| 		// add a new row of distances to the matrix and the new cluster
|1640|1640| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
|  43| »   if·(g_Commands[cmd.type])
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|  47| »   »   g_Commands[cmd.type](player,·cmd,·data);
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 212| »   »   »   if·(cmpAttack·&&·cmpAttack.CanAttackGround()){
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/helpers/Commands.js
| 806| »   »   let·ent·=·pickRandom(cmpRangeManager.GetEntitiesByPlayer(cmd.player).filter(ent·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Commands.js
|1291| ····»   »   »   error("[TryConstructWall]·Expected·last·tower·control·group·to·be·available,·none·found·(1st·pass,·iteration·"·+·i·+·")");
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1292| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|  53| var·g_Commands·=·{
|    | [NORMAL] JSHintBear:
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 208| »   »   let·target·=·new·Vector3D(cmd.target.x,·cmd.target.y,·cmd.target.z)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/Commands.js
| 558| »   »   »   »   ····&&·player·!=·+cmd.owner)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
| 746| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
| 978| »   »   var·count·=·0;
|    | [NORMAL] JSHintBear:
|    | 'count' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1125| »   »   var·cmpGuiInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGuiInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1377| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1499| »   »   »   &&·cmpFormation.GetMemberCount()·==·formation.entities.length)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1558| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 182| 182| 		}
| 183| 183| 	}
| 184| 184| 	else if (placementSupport.mode === "wall")
| 185|    |-	{
|    | 185|+	
| 186| 186| 		if (placementSupport.wallSet && placementSupport.position)
| 187| 187| 		{
| 188| 188| 			// Fetch an updated list of snapping candidate entities
| 200| 200| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 201| 201| 			});
| 202| 202| 		}
| 203|    |-	}
|    | 203|+	
| 204| 204| 
| 205| 205| 	return false;
| 206| 206| }
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 289| 289| 	}
| 290| 290| 
| 291| 291| 	if (!updateBuildingPlacementPreview())
| 292|    |-	{
|    | 292|+	
| 293| 293| 		// invalid location - don't build it
| 294| 294| 		// TODO: play a sound?
| 295| 295| 		return false;
| 296|    |-	}
|    | 296|+	
| 297| 297| 
| 298| 298| 	var selection = g_Selection.toList();
| 299| 299| 
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 328| 328| 	}
| 329| 329| 
| 330| 330| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 331|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 331|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 332| 332| 	{
| 333| 333| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 334| 334| 		return false;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 355| 355| 	// (this is somewhat non-ideal and hardcode-ish)
| 356| 356| 	var hasWallSegment = false;
| 357| 357| 	for (let piece of cmd.pieces)
| 358|    |-	{
|    | 358|+	
| 359| 359| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 360| 360| 		{
| 361| 361| 			hasWallSegment = true;
| 362| 362| 			break;
| 363| 363| 		}
| 364|    |-	}
|    | 364|+	
| 365| 365| 
| 366| 366| 	if (hasWallSegment)
| 367| 367| 	{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 478| 478| 	mouseIsOverObject = (hoveredObject != null);
| 479| 479| 
| 480| 480| 	// Close the menu when interacting with the game world
| 481|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 482|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 481|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 482|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 483| 483| 		closeMenu();
| 484| 484| 
| 485| 485| 	// State-machine processing:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 519| 519| 
| 520| 520| 				// Update the list of selected units
| 521| 521| 				if (Engine.HotkeyIsPressed("selection.add"))
| 522|    |-				{
|    | 522|+				
| 523| 523| 					g_Selection.addList(ents);
| 524|    |-				}
|    | 524|+				
| 525| 525| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 526| 526| 				{
| 527| 527| 					g_Selection.removeList(ents);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 523| 523| 					g_Selection.addList(ents);
| 524| 524| 				}
| 525| 525| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 526|    |-				{
|    | 526|+				
| 527| 527| 					g_Selection.removeList(ents);
| 528|    |-				}
|    | 528|+				
| 529| 529| 				else
| 530| 530| 				{
| 531| 531| 					g_Selection.reset();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 579| 579| 				// If shift is down, let the player continue placing another of the same building
| 580| 580| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 581| 581| 				if (tryPlaceBuilding(queued))
| 582|    |-				{
|    | 582|+				
| 583| 583| 					if (queued)
| 584| 584| 						inputState = INPUT_BUILDING_PLACEMENT;
| 585| 585| 					else
| 586| 586| 						inputState = INPUT_NORMAL;
| 587|    |-				}
|    | 587|+				
| 588| 588| 				else
| 589| 589| 				{
| 590| 590| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 586| 586| 						inputState = INPUT_NORMAL;
| 587| 587| 				}
| 588| 588| 				else
| 589|    |-				{
|    | 589|+				
| 590| 590| 					inputState = INPUT_BUILDING_PLACEMENT;
| 591|    |-				}
|    | 591|+				
| 592| 592| 				return true;
| 593| 593| 			}
| 594| 594| 			break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 639| 639| 		// user to continue building walls.
| 640| 640| 		switch (ev.type)
| 641| 641| 		{
| 642|    |-			case "mousemotion":
|    | 642|+		case "mousemotion":
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 640| 640| 		switch (ev.type)
| 641| 641| 		{
| 642| 642| 			case "mousemotion":
| 643|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 643|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 642| 642| 			case "mousemotion":
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 645|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646|    |-				// the ending point and the starting point to snap to.
|    | 646|+			// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647|    |-				//
|    | 647|+			//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 648|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 649|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 650|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 651|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 652|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653|    |-				// points.
|    | 653|+			// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
| 655|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 655|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 653| 653| 				// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 656|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658|    |-				if (result && result.cost)
|    | 658|+			if (result && result.cost)
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659|    |-				{
|    | 659|+			{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
| 660|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 660|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661|    |-					placementSupport.tooltipMessage = [
|    | 661|+				placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662|    |-						getEntityCostTooltip(result),
|    | 662|+					getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663|    |-						getNeededResourcesTooltip(neededResources)
|    | 663|+					getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664|    |-					].filter(tip => tip).join("\n");
|    | 664|+				].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
| 667| 667| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665|    |-				}
|    | 665|+			}
| 666| 666| 
| 667| 667| 				break;
| 668| 668| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
| 667|    |-				break;
|    | 667|+			break;
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				break;
| 668| 668| 
| 669|    |-			case "mousebuttondown":
|    | 669|+		case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				break;
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 670|+			if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671|    |-				{
|    | 671|+			{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 672|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673|    |-					if (tryPlaceWall(queued))
|    | 673|+				if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676| 676| 						{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674|    |-					{
|    | 674|+					
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688|    |-					}
|    | 688|+					
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674|    |-					{
|    | 674|+				{
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675|    |-						if (queued)
|    | 675|+					if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676|    |-						{
|    | 676|+					{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677|    |-							// continue building, just set a new starting position where we left off
|    | 677|+						// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 678|+						placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679|    |-							placementSupport.wallEndPosition = undefined;
|    | 679|+						placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 681|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683| 683| 						else
| 684| 684| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682|    |-						}
|    | 682|+					}
| 683| 683| 						else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683|    |-						else
|    | 683|+					else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683| 683| 						else
| 684|    |-						{
|    | 684|+					{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						}
| 683| 683| 						else
| 684| 684| 						{
| 685|    |-							placementSupport.Reset();
|    | 685|+						placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 683| 683| 						else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686|    |-							inputState = INPUT_NORMAL;
|    | 686|+						inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
| 689| 689| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687|    |-						}
|    | 687|+					}
| 688| 688| 					}
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688|    |-					}
|    | 688|+				}
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
| 689|    |-					else
|    | 689|+				else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 687| 687| 						}
| 688| 688| 					}
| 689| 689| 					else
| 690|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 690|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692|    |-					updateBuildingPlacementPreview();
|    | 692|+				updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693|    |-					return true;
|    | 693|+				return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694|    |-				}
|    | 694|+			}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694| 694| 				}
| 695|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 695|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 693| 693| 					return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696|    |-				{
|    | 696|+			{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697|    |-					// reset to normal input mode
|    | 697|+				// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698|    |-					placementSupport.Reset();
|    | 698|+				placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699|    |-					updateBuildingPlacementPreview();
|    | 699|+				updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701|    |-					inputState = INPUT_NORMAL;
|    | 701|+				inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				break;
| 705| 705| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				break;
| 705| 705| 		}
| 706| 706| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				break;
|    | 704|+			break;
| 705| 705| 		}
| 706| 706| 		break;
| 707| 707| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 711| 711| 		case "mousemotion":
| 712| 712| 			let maxDragDelta = 16;
| 713| 713| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 714|    |-			{
|    | 714|+			
| 715| 715| 				// Rotate in the direction of the mouse
| 716| 716| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 717|    |-			}
|    | 717|+			
| 718| 718| 			else
| 719| 719| 			{
| 720| 720| 				// If the mouse is near the center, snap back to the default orientation
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 716| 716| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 717| 717| 			}
| 718| 718| 			else
| 719|    |-			{
|    | 719|+			
| 720| 720| 				// If the mouse is near the center, snap back to the default orientation
| 721| 721| 				placementSupport.SetDefaultAngle();
| 722|    |-			}
|    | 722|+			
| 723| 723| 
| 724| 724| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 725| 725| 				"template": placementSupport.template,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 742| 742| 				// If shift is down, let the player continue placing another of the same building
| 743| 743| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 744| 744| 				if (tryPlaceBuilding(queued))
| 745|    |-				{
|    | 745|+				
| 746| 746| 					if (queued)
| 747| 747| 						inputState = INPUT_BUILDING_PLACEMENT;
| 748| 748| 					else
| 749| 749| 						inputState = INPUT_NORMAL;
| 750|    |-				}
|    | 750|+				
| 751| 751| 				else
| 752| 752| 				{
| 753| 753| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 749| 749| 						inputState = INPUT_NORMAL;
| 750| 750| 				}
| 751| 751| 				else
| 752|    |-				{
|    | 752|+				
| 753| 753| 					inputState = INPUT_BUILDING_PLACEMENT;
| 754|    |-				}
|    | 754|+				
| 755| 755| 				return true;
| 756| 756| 			}
| 757| 757| 			break;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 798| 798| 
| 799| 799| 	// Handle the time-warp testing features, restricted to single-player
| 800| 800| 	if (!g_IsNetworked && g_DeveloperOverlay.isTimeWarpEnabled())
| 801|    |-	{
|    | 801|+	
| 802| 802| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 803| 803| 			Engine.SetSimRate(20.0);
| 804| 804| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 805| 805| 			Engine.SetSimRate(1.0);
| 806| 806| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 807| 807| 			Engine.RewindTimeWarp();
| 808|    |-	}
|    | 808|+	
| 809| 809| 
| 810| 810| 	if (ev.hotkey == "session.highlightguarding")
| 811| 811| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 857| 857| 			break;
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 860|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861|    |-				{
|    | 861|+			{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862|    |-					let now = Date.now();
|    | 862|+				let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 863|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 865|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866|    |-						{
|    | 866|+					{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867|    |-							var sptr = ev.hotkey.split(".");
|    | 867|+						var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868|    |-							performGroup("snap", sptr[3]);
|    | 868|+						performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869|    |-						}
|    | 869|+					}
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870|    |-					}
|    | 870|+				}
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871|    |-					else
|    | 871|+				else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
| 872|    |-					{
|    | 872|+				{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
| 873|    |-						var sptr = ev.hotkey.split(".");
|    | 873|+					var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874|    |-						performGroup(sptr[2], sptr[3]);
|    | 874|+					performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876|    |-						doublePressTimer = now;
|    | 876|+					doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877|    |-						prevHotkey = ev.hotkey;
|    | 877|+					prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880| 880| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878|    |-					}
|    | 878|+				}
| 879| 879| 				}
| 880| 880| 				break;
| 881| 881| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879|    |-				}
|    | 879|+			}
| 880| 880| 				break;
| 881| 881| 		}
| 882| 882| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880|    |-				break;
|    | 880|+			break;
| 881| 881| 		}
| 882| 882| 		break;
| 883| 883| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1045|1045| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1046|1046| 
|1047|1047| 			if (placementSupport.mode === "wall")
|1048|    |-			{
|    |1048|+			
|1049|1049| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1050|1050| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1051|1051| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1052|1052| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1053|    |-			}
|    |1053|+			
|1054|1054| 			else
|1055|1055| 			{
|1056|1056| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1317|1317| 	if (templateData.attack &&
|1318|1318| 		templateData.attack.Ranged &&
|1319|1319| 		templateData.attack.Ranged.maxRange)
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// add attack information to display a good tooltip
|1322|1322| 		placementSupport.attack = templateData.attack;
|1323|    |-	}
|    |1323|+	
|1324|1324| }
|1325|1325| 
|1326|1326| // Batch training:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1405|1405| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1406|1406| 	{
|1407|1407| 		if (inputState == INPUT_BATCHTRAINING)
|1408|    |-		{
|    |1408|+		
|1409|1409| 			// Check if we are training in the same building(s) as the last batch
|1410|1410| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1411|1411| 			// If the order changed, we have a new selection and we should create a new batch.
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|1440| 				// fall through to create the new batch
|1441|    |-		}
|    |1441|+		
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|1444|1444| 		if (decrement || Engine.GuiInterfaceCall("GetNeededResources", { "cost":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1437|1437| 			// Otherwise start a new one
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|    |-				// fall through to create the new batch
|    |1440|+			// fall through to create the new batch
|1441|1441| 		}
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1515|1515| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1516|1516| 	{
|1517|1517| 		// Train as many full batches as we can
|1518|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1518|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1519|1519| 		Engine.PostNetworkCommand({
|1520|1520| 			"type": "train",
|1521|1521| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1594|1594| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1595|1595| 
|1596|1596| 	// Reset the last idle unit, etc., if the selection type has changed.
|1597|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1597|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1598|1598| 		resetIdleUnit();
|1599|1599| 	lastIdleClasses = classes;
|1600|1600| 

binaries/data/mods/public/gui/session/input.js
| 229| »   »   var·entState·=·GetEntityState(ent);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'entState' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
| 236| »   var·target·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'target' to undefined.

binaries/data/mods/public/gui/session/input.js
| 250| »   var·actionInfo·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'actionInfo' to undefined.

binaries/data/mods/public/gui/session/input.js
| 467| »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 494| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 498| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 553| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 563| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 611| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 640| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 709| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 826| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 829| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 929| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1018| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1032| »   »   »   »   let·action·=·determineAction(ev.x,·ev.y);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'action' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
|1041| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1110| »   »   »   switch·(ev.hotkey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1545| »   switch·(action)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 236| »   var·target·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'target' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 250| »   var·actionInfo·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'actionInfo' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 264| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 267| »   »   »   var·r·=·g_UnitActions[action].hotkeyActionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 272| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 275| »   »   »   var·r·=·g_UnitActions[action].actionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 482| »   »   &&·(ev.button·==·SDL_BUTTON_LEFT·||·ev.button·==·SDL_BUTTON_RIGHT))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/gui/session/input.js
| 512| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 515| »   »   »   »   var·ents·=·getPreferredEntities(Engine.PickPlayerEntitiesInRect(rect[0],·rect[1],·rect[2],·rect[3],·g_ViewedPlayer));
|    | [NORMAL] JSHintBear:
|    | 'ents' is already defined.

binaries/data/mods/public/gui/session/input.js
| 672| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 712| »   »   »   let·maxDragDelta·=·16;
|    | [MAJOR] JSHintBear:
|    | 'maxDragDelta' has already been declared.

binaries/data/mods/public/gui/session/input.js
| 743| »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 873| »   »   »   »   »   »   var·sptr·=·ev.hotkey.split(".");
|    | [NORMAL] JSHintBear:
|    | 'sptr' is already defined.

binaries/data/mods/public/gui/session/input.js
| 889| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/gui/session/input.js
| 915| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'default'.

binaries/data/mods/public/gui/session/input.js
| 939| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 271| 271| 		return "AttackGround" in this.template[attackType];
| 272| 272| 
| 273| 273| 	return this.GetAttackTypes().some(type => "AttackGround" in this.template[type]);
| 274|    |-}
|    | 274|+};
| 275| 275| 
| 276| 276| Attack.prototype.GetPreferredClasses = function(type)
| 277| 277| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 546| 546| 
| 547| 547| 		let horizSpeed = +this.template[type].Projectile.Speed;
| 548| 548| 		let gravity = +this.template[type].Projectile.Gravity;
| 549|    |-		//horizSpeed /= 2; gravity /= 2; // slow it down for testing
|    | 549|+		// horizSpeed /= 2; gravity /= 2; // slow it down for testing
| 550| 550| 
| 551| 551| 		let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 552| 552| 		if (!cmpPosition || !cmpPosition.IsInWorld())
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 604| 604| 		// TODO: Use unit rotation to implement x/z offsets.
| 605| 605| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 606| 606| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 607|    |-		
|    | 607|+
| 608| 608| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 609| 609| 		if (cmpVisual)
| 610| 610| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 676| 676| 			});
| 677| 677| 	}
| 678| 678| 	else
| 679|    |-	{
|    | 679|+	
| 680| 680| 		// Melee attack - hurt the target immediately
| 681| 681| 		cmpDamage.CauseDamage({
| 682| 682| 			"strengths": this.GetAttackStrengths(type),
| 686| 686| 			"type": type,
| 687| 687| 			"attackerOwner": attackerOwner
| 688| 688| 		});
| 689|    |-	}
|    | 689|+	
| 690| 690| };
| 691| 691| 
| 692| 692| /**

binaries/data/mods/public/simulation/components/Attack.js
| 536| ·»   let·cmpDamage·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_Damage);
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

binaries/data/mods/public/simulation/components/Attack.js
| 651| »   »   cmpTimer.SetTimeout(SYSTEM_ENTITY,·IID_Damage,·"MissileHit",·timeToTarget·*·1000·+·+this.template[type].Delay,·data);
|    | [NORMAL] JSHintBear:
|    | Confusing plusses.
|    | [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
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353| 353| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354| 354| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355|    |-		{
|    | 355|+		
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 358| 358| 				needToMove = false;
| 359|    |-		}
|    | 359|+		
| 360| 360| 
| 361| 361| 		if (needToMove)
| 362| 362| 			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
| 350| 350| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 351| 351| 		var needToMove = true;
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 353|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 354|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355| 355| 		{
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			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
| 511| 511| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 512| 512| 				}
| 513| 513| 				else
| 514|    |-				{
|    | 514|+				
| 515| 515| 					// We couldn't move there, or the target moved away
| 516| 516| 					this.FinishOrder();
| 517|    |-				}
|    | 517|+				
| 518| 518| 				return;
| 519| 519| 			}
| 520| 520| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 719| 719| 		},
| 720| 720| 
| 721| 721| 		"Order.AttackGround": function(msg) {
| 722|    |-warn("UnitAI.js; Order.AttackGround init: " + uneval(msg));
|    | 722|+			warn("UnitAI.js; Order.AttackGround init: " + uneval(msg));
| 723| 723| 			// In the current system, we can only attack-ground with "Ranged" attacks.
| 724| 724| 			this.order.data.attackType = "Ranged";
| 725| 725| 			let target = msg.data.target;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 726| 726| 
| 727| 727| 			let cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
| 728| 728| 			// Check if we are already in range, otherwise walk there
| 729|    |-//			if (!this.CheckTargetAttackRange(target, this.order.data.attackType))
|    | 729|+			//			if (!this.CheckTargetAttackRange(target, this.order.data.attackType))
| 730| 730| 			if (!this.CheckTargetAttackRange(target, target))
| 731| 731| 			{
| 732| 732| warn("UnitAI.js; Order.AttackGround need to move: " + uneval(target));
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 729| 729| //			if (!this.CheckTargetAttackRange(target, this.order.data.attackType))
| 730| 730| 			if (!this.CheckTargetAttackRange(target, target))
| 731| 731| 			{
| 732|    |-warn("UnitAI.js; Order.AttackGround need to move: " + uneval(target));
|    | 732|+				warn("UnitAI.js; Order.AttackGround need to move: " + uneval(target));
| 733| 733| 				this.SetNextState("ATTACKGROUND.APPROACHING");
| 734| 734| 				return;
| 735| 735| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 733| 733| 				this.SetNextState("ATTACKGROUND.APPROACHING");
| 734| 734| 				return;
| 735| 735| 			}
| 736|    |-warn("UnitAI.js; Order.AttackGround no need to move: " + uneval(this.order));
|    | 736|+			warn("UnitAI.js; Order.AttackGround no need to move: " + uneval(this.order));
| 737| 737| 			this.CallMemberFunction("AttackGround", [target, false]);
| 738| 738| warn("UnitAI.js; Order.AttackGround no need to move: " + uneval(target));
| 739| 739| 			if (cmpAttack.CanAttackAsFormation())
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 735| 735| 			}
| 736| 736| warn("UnitAI.js; Order.AttackGround no need to move: " + uneval(this.order));
| 737| 737| 			this.CallMemberFunction("AttackGround", [target, false]);
| 738|    |-warn("UnitAI.js; Order.AttackGround no need to move: " + uneval(target));
|    | 738|+			warn("UnitAI.js; Order.AttackGround no need to move: " + uneval(target));
| 739| 739| 			if (cmpAttack.CanAttackAsFormation())
| 740| 740| 				this.SetNextState("ATTACKGROUND.ATTACKING");
| 741| 741| 			else
|    | [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
| 750| 750| 			}
| 751| 751| 			// Check if we are already in range, otherwise walk there
| 752| 752| 			if (!this.CheckGarrisonRange(msg.data.target))
| 753|    |-			{
|    | 753|+			
| 754| 754| 				if (!this.CheckTargetVisible(msg.data.target))
| 755| 755| 				{
| 756| 756| 					this.FinishOrder();
| 761| 761| 					this.SetNextState("GARRISON.APPROACHING");
| 762| 762| 					return;
| 763| 763| 				}
| 764|    |-			}
|    | 764|+			
| 765| 765| 
| 766| 766| 			this.SetNextState("GARRISON.GARRISONING");
| 767| 767| 		},
|    | [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
| 756| 756| 					this.FinishOrder();
| 757| 757| 					return;
| 758| 758| 				}
| 759|    |-				else
| 760|    |-				{
|    | 759|+				
| 761| 760| 					this.SetNextState("GARRISON.APPROACHING");
| 762| 761| 					return;
| 763|    |-				}
|    | 762|+				
| 764| 763| 			}
| 765| 764| 
| 766| 765| 			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
| 779| 779| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 780| 780| 					}
| 781| 781| 					else
| 782|    |-					{
|    | 782|+					
| 783| 783| 						// We couldn't move there, or the target moved away
| 784| 784| 						this.FinishOrder();
| 785|    |-					}
|    | 785|+					
| 786| 786| 					return;
| 787| 787| 				}
| 788| 788| 
|    | [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
|1012|1012| 			},
|1013|1013| 		},
|1014|1014| 
|1015|    |-		"GARRISON":{
|    |1015|+		"GARRISON": {
|1016|1016| 			"enter": function() {
|1017|1017| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1018|1018| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1181|1181| 		"ATTACKGROUND": {
|1182|1182| 			"APPROACHING": {
|1183|1183| 				"enter": function() {
|1184|    |-warn("UnitAI.js; FormationAttackGroundApproaching-state entered: " + uneval(this.order));
|    |1184|+					warn("UnitAI.js; FormationAttackGroundApproaching-state entered: " + uneval(this.order));
|1185|1185| 					if (!this.MoveToTargetAttackRange(this.order.data.target, this.order.data.target))
|1186|1186| 					{
|1187|1187| 						this.FinishOrder();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1197|1197| 				},
|1198|1198| 
|1199|1199| 				"MovementUpdate": function(msg) {
|1200|    |-warn("UnitAI.js; FormationAttackGroundApproaching-state: " + uneval(this.order));
|    |1200|+					warn("UnitAI.js; FormationAttackGroundApproaching-state: " + uneval(this.order));
|1201|1201| 					let cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|1202|1202| 					this.CallMemberFunction("AttackGround", [this.order.data.target, false]);
|1203|1203| 					if (cmpAttack.CanAttackAsFormation())
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1210|1210| 			"ATTACKING": {
|1211|1211| 				// Wait for individual members to finish
|1212|1212| 				"enter": function(msg) {
|1213|    |-warn("UnitAI.js; FormationAttackGroundAttacking-state: " + uneval(this.order));
|    |1213|+					warn("UnitAI.js; FormationAttackGroundAttacking-state: " + uneval(this.order));
|1214|1214| 					let target = this.order.data.target;
|1215|1215| 					// Check if we are already in range, otherwise walk there
|1216|1216| 					if (!this.CheckTargetAttackRange(target, this.order.data.attackType))
|    | [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
|1295|1295| 			// If the controller handled an order but some members rejected it,
|1296|1296| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1297|1297| 			if (this.orderQueue.length)
|1298|    |-			{
|    |1298|+			
|1299|1299| 				// We're leaving the formation, so stop our FormationWalk order
|1300|1300| 				if (this.FinishOrder())
|1301|1301| 					return;
|1302|    |-			}
|    |1302|+			
|1303|1303| 
|1304|1304| 			// No orders left, we're an individual now
|1305|1305| 			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
|1323|1323| 			// Move a tile outside the building
|1324|1324| 			let range = 4;
|1325|1325| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1326|    |-			{
|    |1326|+			
|1327|1327| 				// We are already at the target, or can't move at all
|1328|1328| 				this.FinishOrder();
|1329|    |-			}
|    |1329|+			
|1330|1330| 			else
|1331|1331| 			{
|1332|1332| 				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
|1544|1544| 
|1545|1545| 			"LosRangeUpdate": function(msg) {
|1546|1546| 				if (this.GetStance().targetVisibleEnemies)
|1547|    |-				{
|    |1547|+				
|1548|1548| 					// Start attacking one of the newly-seen enemy (if any)
|1549|1549| 					this.AttackEntitiesByPreference(msg.data.added);
|1550|    |-				}
|    |1550|+				
|1551|1551| 			},
|1552|1552| 
|1553|1553| 			"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
|1577|1577| 				this.SelectAnimation("move");
|1578|1578| 			},
|1579|1579| 
|1580|    |-			"leave": function () {
|    |1580|+			"leave": function() {
|1581|1581| 				this.SelectAnimation("idle");
|1582|1582| 				this.StopMoving();
|1583|1583| 			},
|    | [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
|1757|1757| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1758|1758| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1759|1759| 						if (cmpHealth && cmpHealth.IsInjured())
|1760|    |-						{
|    |1760|+						
|1761|1761| 							if (this.CanHeal(this.isGuardOf))
|1762|1762| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1763|1763| 							else if (this.CanRepair(this.isGuardOf))
|1764|1764| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1765|    |-						}
|    |1765|+						
|1766|1766| 					}
|1767|1767| 				},
|1768|1768| 
|    | [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
|1979|1979| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1980|1980| 
|1981|1981| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1982|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1982|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1983|1983| 
|1984|1984| 					this.FaceTowardsTarget(this.order.data.target);
|1985|1985| 
|    | [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
|2121|2121| 
|2122|2122| 				"Attacked": function(msg) {
|2123|2123| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2124|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2125|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2124|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2125|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2126|2126| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2127|2127| 				},
|2128|2128| 			},
|    | [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
|2141|2141| 					this.SelectAnimation("move");
|2142|2142| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2143|2143| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2144|    |-					{
|    |2144|+					
|2145|2145| 						// Run after a fleeing target
|2146|2146| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2147|    |-					}
|    |2147|+					
|2148|2148| 					this.StartTimer(1000, 1000);
|2149|2149| 				},
|2150|2150| 
|    | [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
|2323|2323| 
|2324|2324| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2325|2325| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2326|    |-					{
|    |2326|+					
|2327|2327| 						// Check we can still reach and gather from the target
|2328|2328| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2329|2329| 						{
|2374|2374| 								return;
|2375|2375| 							}
|2376|2376| 						}
|2377|    |-					}
|    |2377|+					
|2378|2378| 
|2379|2379| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2380|2380| 
|    | [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
|2366|2366| 								return;
|2367|2367| 						}
|2368|2368| 						else
|2369|    |-						{
|    |2369|+						
|2370|2370| 							// Try to follow the target
|2371|2371| 							if (this.MoveToTargetRange(this.gatheringTarget, IID_ResourceGatherer))
|2372|2372| 							{
|2373|2373| 								this.SetNextState("APPROACHING");
|2374|2374| 								return;
|2375|2375| 							}
|2376|    |-						}
|    |2376|+						
|2377|2377| 					}
|2378|2378| 
|2379|2379| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|    | [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
|2400|2400| 					// Also don't switch to a different type of huntable animal
|2401|2401| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2402|2402| 						return (
|2403|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2404|    |-							|| (type.specific == resourceType.specific
|    |2403|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2404|+							(type.specific == resourceType.specific
|2405|2405| 							&& (type.specific != "meat" || resourceTemplate == template))
|2406|2406| 						);
|2407|2407| 					});
|    | [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
|2401|2401| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2402|2402| 						return (
|2403|2403| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2404|    |-							|| (type.specific == resourceType.specific
|2405|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2404|+							|| (type.specific == resourceType.specific &&
|    |2405|+							(type.specific != "meat" || resourceTemplate == template))
|2406|2406| 						);
|2407|2407| 					});
|2408|2408| 					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
|2466|2466| 
|2467|2467| 				"Timer": function(msg) {
|2468|2468| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2469|    |-					{
|    |2469|+					
|2470|2470| 						// Return to our original position unless we have a better order.
|2471|2471| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2472|2472| 							this.WalkToHeldPosition();
|2473|    |-					}
|    |2473|+					
|2474|2474| 				},
|2475|2475| 
|2476|2476| 				"MovementUpdate": 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
|2500|2500| 					this.StartTimer(prepare, this.healTimers.repeat);
|2501|2501| 
|2502|2502| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2503|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2503|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2504|2504| 
|2505|2505| 					this.FaceTowardsTarget(this.order.data.target);
|2506|2506| 				},
|    | [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
|2713|2713| 					{
|2714|2714| 						// The building was already finished/fully repaired before we arrived;
|2715|2715| 						// let the ConstructionFinished handler handle this.
|2716|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2716|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2717|2717| 						return true;
|2718|2718| 					}
|2719|2719| 
|    | [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
|2713|2713| 					{
|2714|2714| 						// The building was already finished/fully repaired before we arrived;
|2715|2715| 						// let the ConstructionFinished handler handle this.
|2716|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2716|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2717|2717| 						return true;
|2718|2718| 					}
|2719|2719| 
|    | [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
|2840|2840| 
|2841|2841| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2842|2842| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2843|    |-				{
|    |2843|+				
|2844|2844| 					// We're already walking to the given point, so add this as a order.
|2845|2845| 					this.WalkToTarget(msg.data.newentity, true);
|2846|    |-				}
|    |2846|+				
|2847|2847| 			},
|2848|2848| 		},
|2849|2849| 
|    | [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
|2903|2903| 
|2904|2904| 					// Check that we can garrison here
|2905|2905| 					if (this.CanGarrison(target))
|2906|    |-					{
|    |2906|+					
|2907|2907| 						// Check that we're in range of the garrison target
|2908|2908| 						if (this.CheckGarrisonRange(target))
|2909|2909| 						{
|2979|2979| 								return false;
|2980|2980| 							}
|2981|2981| 						}
|2982|    |-					}
|    |2982|+					
|2983|2983| 					// Garrisoning failed for some reason, so finish the order
|2984|2984| 					this.FinishOrder();
|2985|2985| 					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
|3101|3101| 		"Attacked": function(msg) {
|3102|3102| 			if (this.template.NaturalBehaviour == "skittish" ||
|3103|3103| 			    this.template.NaturalBehaviour == "passive")
|3104|    |-			{
|    |3104|+			
|3105|3105| 				this.Flee(msg.data.attacker, false);
|3106|    |-			}
|    |3106|+			
|3107|3107| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3108|3108| 			{
|3109|3109| 				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
|3110|3110| 					this.Attack(msg.data.attacker, false);
|3111|3111| 			}
|3112|3112| 			else if (this.template.NaturalBehaviour == "domestic")
|3113|    |-			{
|    |3113|+			
|3114|3114| 				// Never flee, stop what we were doing
|3115|3115| 				this.SetNextState("IDLE");
|3116|    |-			}
|    |3116|+			
|3117|3117| 		},
|3118|3118| 
|3119|3119| 		"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
|3124|3124| 				this.FinishOrder();
|3125|3125| 				return;
|3126|3126| 			}
|3127|    |-			else
|3128|    |-			{
|    |3127|+			
|3129|3128| 				this.order.data.min = range;
|3130|3129| 				this.SetNextState("WALKING");
|3131|    |-			}
|    |3130|+			
|3132|3131| 		},
|3133|3132| 
|3134|3133| 		"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
|3168|3168| 				}
|3169|3169| 				// Start attacking one of the newly-seen enemy (if any)
|3170|3170| 				else if (this.IsDangerousAnimal())
|3171|    |-				{
|    |3171|+				
|3172|3172| 					this.AttackVisibleEntity(msg.data.added);
|3173|    |-				}
|    |3173|+				
|3174|3174| 
|3175|3175| 				// TODO: if two units enter our range together, we'll attack the
|3176|3176| 				// 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
|3211|3211| 				}
|3212|3212| 				// Start attacking one of the newly-seen enemy (if any)
|3213|3213| 				else if (this.template.NaturalBehaviour == "violent")
|3214|    |-				{
|    |3214|+				
|3215|3215| 					this.AttackVisibleEntity(msg.data.added);
|3216|    |-				}
|    |3216|+				
|3217|3217| 			},
|3218|3218| 
|3219|3219| 			"Timer": function(msg) {
|    | [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
|3226|3226| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3227|3227| 
|3228|3228| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3229|    |-							// only used for domestic animals
|    |3229|+		// only used for domestic animals
|3230|3230| 	},
|3231|3231| };
|3232|3232| 
|    | [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
|3283|3283| 
|3284|3284| UnitAI.prototype.IsAnimal = function()
|3285|3285| {
|3286|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3286|+	return (!!this.template.NaturalBehaviour);
|3287|3287| };
|3288|3288| 
|3289|3289| 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
|3321|3321| UnitAI.prototype.GetGarrisonHolder = function()
|3322|3322| {
|3323|3323| 	if (this.IsGarrisoned())
|3324|    |-	{
|    |3324|+	
|3325|3325| 		for (let order of this.orderQueue)
|3326|3326| 			if (order.type == "Garrison")
|3327|3327| 				return order.data.target;
|3328|    |-	}
|    |3328|+	
|3329|3329| 	return INVALID_ENTITY;
|3330|3330| };
|3331|3331| 
|    | [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
|3399|3399| 		{
|3400|3400| 			let index = this.GetCurrentState().indexOf(".");
|3401|3401| 			if (index != -1)
|3402|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3402|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3403|3403| 			this.Stop(false);
|3404|3404| 		}
|3405|3405| 
|    | [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
|3455|3455| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3456|3456| 			continue;
|3457|3457| 		if (i == 0)
|3458|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3458|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3459|3459| 		else
|3460|3460| 			this.orderQueue.splice(i, 1);
|3461|3461| 		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
|3455|3455| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3456|3456| 			continue;
|3457|3457| 		if (i == 0)
|3458|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3458|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3459|3459| 		else
|3460|3460| 			this.orderQueue.splice(i, 1);
|3461|3461| 		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
|3539|3539| };
|3540|3540| 
|3541|3541| 
|3542|    |-//// FSM linkage functions ////
|    |3542|+// // FSM linkage functions ////
|3543|3543| 
|3544|3544| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3545|3545| 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
|3711|3711| 				continue;
|3712|3712| 			if (this.orderQueue[i].type == type)
|3713|3713| 				continue;
|3714|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3714|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3715|3715| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3716|3716| 			return;
|3717|3717| 		}
|    | [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
|3711|3711| 				continue;
|3712|3712| 			if (this.orderQueue[i].type == type)
|3713|3713| 				continue;
|3714|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3714|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3715|3715| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3716|3716| 			return;
|3717|3717| 		}
|    | [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
|3725|3725| {
|3726|3726| 	// Remember the previous work orders to be able to go back to them later if required
|3727|3727| 	if (data && data.force)
|3728|    |-	{
|    |3728|+	
|3729|3729| 		if (this.IsFormationController())
|3730|3730| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3731|3731| 		else
|3732|3732| 			this.UpdateWorkOrders(type);
|3733|    |-	}
|    |3733|+	
|3734|3734| 
|3735|3735| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3736|3736| 
|    | [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
|3802|3802| 	{
|3803|3803| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3804|3804| 		if (cmpUnitAI)
|3805|    |-		{
|    |3805|+		
|3806|3806| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3807|3807| 			{
|3808|3808| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3811|3811| 					return;
|3812|3812| 				}
|3813|3813| 			}
|3814|    |-		}
|    |3814|+		
|3815|3815| 	}
|3816|3816| 
|3817|3817| 	// 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
|3804|3804| 		if (cmpUnitAI)
|3805|3805| 		{
|3806|3806| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3807|    |-			{
|    |3807|+			
|3808|3808| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3809|3809| 				{
|3810|3810| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3811|3811| 					return;
|3812|3812| 				}
|3813|    |-			}
|    |3813|+			
|3814|3814| 		}
|3815|3815| 	}
|3816|3816| 
|    | [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
|3816|3816| 
|3817|3817| 	// If nothing found, take the unit orders
|3818|3818| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3819|    |-	{
|    |3819|+	
|3820|3820| 		if (isWorkType(this.orderQueue[i].type))
|3821|3821| 		{
|3822|3822| 			this.workOrders = this.orderQueue.slice(i);
|3823|3823| 			return;
|3824|3824| 		}
|3825|    |-	}
|    |3825|+	
|3826|3826| };
|3827|3827| 
|3828|3828| 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
|3882|3882| 	if (data.timerRepeat === undefined)
|3883|3883| 		this.timer = undefined;
|3884|3884| 
|3885|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3885|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3886|3886| };
|3887|3887| 
|3888|3888| /**
|    | [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| 	if (data.timerRepeat === undefined)
|3883|3883| 		this.timer = undefined;
|3884|3884| 
|3885|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3885|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3886|3886| };
|3887|3887| 
|3888|3888| /**
|    | [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
|3917|3917| 	this.timer = undefined;
|3918|3918| };
|3919|3919| 
|3920|    |-//// Message handlers /////
|    |3920|+// // Message handlers /////
|3921|3921| 
|3922|3922| UnitAI.prototype.OnMotionChanged = function(msg)
|3923|3923| {
|    | [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
|3929|3929| 	// TODO: This is a bit inefficient since every unit listens to every
|3930|3930| 	// construction message - ideally we could scope it to only the one we're building
|3931|3931| 
|3932|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3932|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3933|3933| };
|3934|3934| 
|3935|3935| 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
|3929|3929| 	// TODO: This is a bit inefficient since every unit listens to every
|3930|3930| 	// construction message - ideally we could scope it to only the one we're building
|3931|3931| 
|3932|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3932|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3933|3933| };
|3934|3934| 
|3935|3935| 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
|3954|3954| 
|3955|3955| UnitAI.prototype.OnAttacked = function(msg)
|3956|3956| {
|3957|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3957|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3958|3958| };
|3959|3959| 
|3960|3960| 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
|3954|3954| 
|3955|3955| UnitAI.prototype.OnAttacked = function(msg)
|3956|3956| {
|3957|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3957|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3958|3958| };
|3959|3959| 
|3960|3960| 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
|3959|3959| 
|3960|3960| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3961|3961| {
|3962|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3962|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3963|3963| };
|3964|3964| 
|3965|3965| 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
|3959|3959| 
|3960|3960| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3961|3961| {
|3962|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3962|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3963|3963| };
|3964|3964| 
|3965|3965| 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
|3964|3964| 
|3965|3965| UnitAI.prototype.OnHealthChanged = function(msg)
|3966|3966| {
|3967|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3967|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3968|3968| };
|3969|3969| 
|3970|3970| 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
|3964|3964| 
|3965|3965| UnitAI.prototype.OnHealthChanged = function(msg)
|3966|3966| {
|3967|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3967|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3968|3968| };
|3969|3969| 
|3970|3970| 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
|3970|3970| UnitAI.prototype.OnRangeUpdate = function(msg)
|3971|3971| {
|3972|3972| 	if (msg.tag == this.losRangeQuery)
|3973|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3973|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3974|3974| 	else if (msg.tag == this.losHealRangeQuery)
|3975|3975| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3976|3976| };
|    | [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
|3970|3970| UnitAI.prototype.OnRangeUpdate = function(msg)
|3971|3971| {
|3972|3972| 	if (msg.tag == this.losRangeQuery)
|3973|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3973|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3974|3974| 	else if (msg.tag == this.losHealRangeQuery)
|3975|3975| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3976|3976| };
|    | [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
|3972|3972| 	if (msg.tag == this.losRangeQuery)
|3973|3973| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3974|3974| 	else if (msg.tag == this.losHealRangeQuery)
|3975|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3975|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3976|3976| };
|3977|3977| 
|3978|3978| 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
|3972|3972| 	if (msg.tag == this.losRangeQuery)
|3973|3973| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3974|3974| 	else if (msg.tag == this.losHealRangeQuery)
|3975|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3975|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3976|3976| };
|3977|3977| 
|3978|3978| 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
|3977|3977| 
|3978|3978| UnitAI.prototype.OnPackFinished = function(msg)
|3979|3979| {
|3980|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3980|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3981|3981| };
|3982|3982| 
|3983|3983| //// 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
|3977|3977| 
|3978|3978| UnitAI.prototype.OnPackFinished = function(msg)
|3979|3979| {
|3980|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3980|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3981|3981| };
|3982|3982| 
|3983|3983| //// 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
|3980|3980| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3981|3981| };
|3982|3982| 
|3983|    |-//// Helper functions to be called by the FSM ////
|    |3983|+// // Helper functions to be called by the FSM ////
|3984|3984| 
|3985|3985| UnitAI.prototype.GetWalkSpeed = function()
|3986|3986| {
|    | [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
|4082|4082| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4083|4083| 		return undefined;
|4084|4084| 
|4085|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4085|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4086|4086| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4087|4087| 		return undefined;
|4088|4088| 
|    | [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
|4167|4167| 			PlaySound(name, member);
|4168|4168| 	}
|4169|4169| 	else
|4170|    |-	{
|    |4170|+	
|4171|4171| 		// Otherwise use our own sounds
|4172|4172| 		PlaySound(name, this.entity);
|4173|    |-	}
|    |4173|+	
|4174|4174| };
|4175|4175| 
|4176|4176| /*
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4291|4291| 
|4292|4292| UnitAI.prototype.MoveToTarget = function(target)
|4293|4293| {
|4294|    |-warn("UnitAI.js; MTT: " + uneval(target) );
|    |4294|+	warn("UnitAI.js; MTT: " + uneval(target) );
|4295|4295| 	if (!this.CheckTargetVisible(target))
|4296|4296| 		return false;
|4297|4297| 
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4291|4291| 
|4292|4292| UnitAI.prototype.MoveToTarget = function(target)
|4293|4293| {
|4294|    |-warn("UnitAI.js; MTT: " + uneval(target) );
|    |4294|+warn("UnitAI.js; MTT: " + uneval(target));
|4295|4295| 	if (!this.CheckTargetVisible(target))
|4296|4296| 		return false;
|4297|4297| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/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| 
|4302|4302| UnitAI.prototype.MoveToTargetRange = function(target, iid, type)
|4303|4303| {
|4304|    |-warn("UnitAI.js; MTTR: " + uneval(target) + " : " + uneval(iid) + " : " + uneval(type) );
|    |4304|+	warn("UnitAI.js; MTTR: " + uneval(target) + " : " + uneval(iid) + " : " + uneval(type) );
|4305|4305| 	if (!this.CheckTargetVisible(target) || this.IsTurret())
|4306|4306| 		return false;
|4307|4307| 
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4301|4301| 
|4302|4302| UnitAI.prototype.MoveToTargetRange = function(target, iid, type)
|4303|4303| {
|4304|    |-warn("UnitAI.js; MTTR: " + uneval(target) + " : " + uneval(iid) + " : " + uneval(type) );
|    |4304|+warn("UnitAI.js; MTTR: " + uneval(target) + " : " + uneval(iid) + " : " + uneval(type));
|4305|4305| 	if (!this.CheckTargetVisible(target) || this.IsTurret())
|4306|4306| 		return false;
|4307|4307| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4325|4325|  */
|4326|4326| UnitAI.prototype.MoveToTargetAttackRange = function(target, type)
|4327|4327| {
|4328|    |-warn("UnitAI.js; MTTAR: " + uneval(target) + " : " + uneval(type) );
|    |4328|+	warn("UnitAI.js; MTTAR: " + uneval(target) + " : " + uneval(type) );
|4329|4329| 	let attackGround = target instanceof Vector3D;
|4330|4330| 	// for formation members, the formation will take care of the range check
|4331|4331| 	if (this.IsFormationMember())
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4325|4325|  */
|4326|4326| UnitAI.prototype.MoveToTargetAttackRange = function(target, type)
|4327|4327| {
|4328|    |-warn("UnitAI.js; MTTAR: " + uneval(target) + " : " + uneval(type) );
|    |4328|+warn("UnitAI.js; MTTAR: " + uneval(target) + " : " + uneval(type));
|4329|4329| 	let attackGround = target instanceof Vector3D;
|4330|4330| 	// for formation members, the formation will take care of the range check
|4331|4331| 	if (this.IsFormationMember())
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4386|4386| 
|4387|4387| UnitAI.prototype.MoveToTargetRangeExplicit = function(target, min, max)
|4388|4388| {
|4389|    |-warn("UnitAI.js; MTTRE: " + uneval(target) + " : " + uneval(min) + " : " + uneval(max) );
|    |4389|+	warn("UnitAI.js; MTTRE: " + uneval(target) + " : " + uneval(min) + " : " + uneval(max) );
|4390|4390| 	if (!this.CheckTargetVisible(target))
|4391|4391| 		return false;
|4392|4392| 
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4386|4386| 
|4387|4387| UnitAI.prototype.MoveToTargetRangeExplicit = function(target, min, max)
|4388|4388| {
|4389|    |-warn("UnitAI.js; MTTRE: " + uneval(target) + " : " + uneval(min) + " : " + uneval(max) );
|    |4389|+warn("UnitAI.js; MTTRE: " + uneval(target) + " : " + uneval(min) + " : " + uneval(max));
|4390|4390| 	if (!this.CheckTargetVisible(target))
|4391|4391| 		return false;
|4392|4392| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4438|4438| 
|4439|4439| UnitAI.prototype.CheckTargetRange = function(target, iid, type)
|4440|4440| {
|4441|    |-warn("UnitAI.js; CTR: " + uneval(target) + " : " + uneval(iid) + " : " + uneval(type) );
|    |4441|+	warn("UnitAI.js; CTR: " + uneval(target) + " : " + uneval(iid) + " : " + uneval(type) );
|4442|4442| 	var cmpRanged = Engine.QueryInterface(this.entity, iid);
|4443|4443| 	if (!cmpRanged)
|4444|4444| 		return false;
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4438|4438| 
|4439|4439| UnitAI.prototype.CheckTargetRange = function(target, iid, type)
|4440|4440| {
|4441|    |-warn("UnitAI.js; CTR: " + uneval(target) + " : " + uneval(iid) + " : " + uneval(type) );
|    |4441|+warn("UnitAI.js; CTR: " + uneval(target) + " : " + uneval(iid) + " : " + uneval(type));
|4442|4442| 	var cmpRanged = Engine.QueryInterface(this.entity, iid);
|4443|4443| 	if (!cmpRanged)
|4444|4444| 		return false;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4460|4460|  */
|4461|4461| UnitAI.prototype.CheckTargetAttackRange = function(target, type)
|4462|4462| {
|4463|    |-warn("UnitAI.js; CTAR: " + uneval(target) + " : " + uneval(type) );
|    |4463|+	warn("UnitAI.js; CTAR: " + uneval(target) + " : " + uneval(type) );
|4464|4464| 	let attackGround = target instanceof Vector3D;
|4465|4465| 	// for formation members, the formation will take care of the range check
|4466|4466| 	if (this.IsFormationMember())
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4460|4460|  */
|4461|4461| UnitAI.prototype.CheckTargetAttackRange = function(target, type)
|4462|4462| {
|4463|    |-warn("UnitAI.js; CTAR: " + uneval(target) + " : " + uneval(type) );
|    |4463|+warn("UnitAI.js; CTAR: " + uneval(target) + " : " + uneval(type));
|4464|4464| 	let attackGround = target instanceof Vector3D;
|4465|4465| 	// for formation members, the formation will take care of the range check
|4466|4466| 	if (this.IsFormationMember())
|    | [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
|4466|4466| 	if (this.IsFormationMember())
|4467|4467| 	{
|4468|4468| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4469|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4470|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4469|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4470|+			cmpFormationUnitAI.order.data.target == target)
|4471|4471| 			return true;
|4472|4472| 	}
|4473|4473| 
|    | [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
|4639|4639| UnitAI.prototype.AttackEntityInZone = function(ents)
|4640|4640| {
|4641|4641| 	var target = ents.find(target =>
|4642|    |-		this.CanAttack(target)
|4643|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4642|+		this.CanAttack(target) &&
|    |4643|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4644|4644| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4645|4645| 	);
|4646|4646| 	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
|4640|4640| {
|4641|4641| 	var target = ents.find(target =>
|4642|4642| 		this.CanAttack(target)
|4643|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4644|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4643|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4644|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4645|4645| 	);
|4646|4646| 	if (!target)
|4647|4647| 		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
|4704|4704| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4705|4705| 	if (this.isGuardOf)
|4706|4706| 	{
|4707|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4707|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4708|4708| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4709|4709| 		if (cmpUnitAI && cmpAttack &&
|4710|4710| 		    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
|4708|4708| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4709|4709| 		if (cmpUnitAI && cmpAttack &&
|4710|4710| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4711|    |-				return false;
|    |4711|+			return false;
|4712|4712| 	}
|4713|4713| 
|4714|4714| 	// 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
|4713|4713| 
|4714|4714| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4715|4715| 	if (this.GetStance().respondHoldGround)
|4716|    |-	{
|    |4716|+	
|4717|4717| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4718|4718| 			return true;
|4719|    |-	}
|    |4719|+	
|4720|4720| 
|4721|4721| 	// Stop if it's left our vision range, unless we're especially persistent
|4722|4722| 	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
|4720|4720| 
|4721|4721| 	// Stop if it's left our vision range, unless we're especially persistent
|4722|4722| 	if (!this.GetStance().respondChaseBeyondVision)
|4723|    |-	{
|    |4723|+	
|4724|4724| 		if (!this.CheckTargetIsInVisionRange(target))
|4725|4725| 			return true;
|4726|    |-	}
|    |4726|+	
|4727|4727| 
|4728|4728| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4729|4729| 	// 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
|4747|4747| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4748|4748| 	if (this.isGuardOf)
|4749|4749| 	{
|4750|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4750|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4751|4751| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4752|4752| 		if (cmpUnitAI && cmpAttack &&
|4753|4753| 		    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
|4760|4760| 	return false;
|4761|4761| };
|4762|4762| 
|4763|    |-//// External interface functions ////
|    |4763|+// // External interface functions ////
|4764|4764| 
|4765|4765| UnitAI.prototype.SetFormationController = function(ent)
|4766|4766| {
|    | [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
|4770|4770| 	// of our own formation (or ourself if not in formation)
|4771|4771| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4772|4772| 	if (cmpObstruction)
|4773|    |-	{
|    |4773|+	
|4774|4774| 		if (ent == INVALID_ENTITY)
|4775|4775| 			cmpObstruction.SetControlGroup(this.entity);
|4776|4776| 		else
|4777|4777| 			cmpObstruction.SetControlGroup(ent);
|4778|    |-	}
|    |4778|+	
|4779|4779| 
|4780|4780| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4781|4781| 	if (ent == INVALID_ENTITY)
|    | [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
|4818|4818| 		return undefined;
|4819|4819| 
|4820|4820| 	return cmpTargetPosition.GetPosition();
|4821|    |-}
|    |4821|+};
|4822|4822| 
|4823|4823| UnitAI.prototype.GetTargetPositions = function()
|4824|4824| {
|    | [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
|4929|4929| 	// if we already had an old guard order, do nothing if the target is the same
|4930|4930| 	// and the order is running, otherwise remove the previous order
|4931|4931| 	if (this.isGuardOf)
|4932|    |-	{
|    |4932|+	
|4933|4933| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4934|4934| 			return;
|4935|4935| 		else
|4936|4936| 			this.RemoveGuard();
|4937|    |-	}
|    |4937|+	
|4938|4938| 
|4939|4939| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4940|4940| };
|    | [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
|4932|4932| 	{
|4933|4933| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4934|4934| 			return;
|4935|    |-		else
|4936|    |-			this.RemoveGuard();
|    |4935|+		this.RemoveGuard();
|4937|4936| 	}
|4938|4937| 
|4939|4938| 	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
|5103|5103| 			this.WalkToTarget(target, queued);
|5104|5104| 		return;
|5105|5105| 	}
|5106|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5106|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5107|5107| };
|5108|5108| 
|5109|5109| /**
|    | [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
|5264|5264| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5265|5265| 	{
|5266|5266| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5267|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5267|+		if (cmpTrader.HasBothMarkets() &&
|5268|5268| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5269|5269| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5270|5270| 		{
|    | [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
|5545|5545| 				{
|5546|5546| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5547|5547| 					var targetClasses = this.order.data.targetClasses;
|5548|    |-					if (targetClasses.attack && cmpIdentity
|5549|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5548|+					if (targetClasses.attack && cmpIdentity &&
|    |5549|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5550|5550| 						continue;
|5551|5551| 					if (targetClasses.avoid && cmpIdentity
|5552|5552| 						&& 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
|5548|5548| 					if (targetClasses.attack && cmpIdentity
|5549|5549| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5550|5550| 						continue;
|5551|    |-					if (targetClasses.avoid && cmpIdentity
|5552|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5551|+					if (targetClasses.avoid && cmpIdentity &&
|    |5552|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5553|5553| 						continue;
|5554|5554| 					// Only used by the AIs to prevent some choices of targets
|5555|5555| 					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
|5571|5571| 		{
|5572|5572| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5573|5573| 			var targetClasses = this.order.data.targetClasses;
|5574|    |-			if (cmpIdentity && targetClasses.attack
|5575|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5574|+			if (cmpIdentity && targetClasses.attack &&
|    |5575|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5576|5576| 				continue;
|5577|5577| 			if (cmpIdentity && targetClasses.avoid
|5578|5578| 				&& 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
|5574|5574| 			if (cmpIdentity && targetClasses.attack
|5575|5575| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5576|5576| 				continue;
|5577|    |-			if (cmpIdentity && targetClasses.avoid
|5578|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5577|+			if (cmpIdentity && targetClasses.avoid &&
|    |5578|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5579|5579| 				continue;
|5580|5580| 			// Only used by the AIs to prevent some choices of targets
|5581|5581| 			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
|5717|5717| 
|5718|5718| UnitAI.prototype.SetHeldPosition = function(x, z)
|5719|5719| {
|5720|    |-	this.heldPosition = {"x": x, "z": z};
|    |5720|+	this.heldPosition = { "x": x, "z": z};
|5721|5721| };
|5722|5722| 
|5723|5723| 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
|5717|5717| 
|5718|5718| UnitAI.prototype.SetHeldPosition = function(x, z)
|5719|5719| {
|5720|    |-	this.heldPosition = {"x": x, "z": z};
|    |5720|+	this.heldPosition = {"x": x, "z": z };
|5721|5721| };
|5722|5722| 
|5723|5723| 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
|5744|5744| 	return false;
|5745|5745| };
|5746|5746| 
|5747|    |-//// Helper functions ////
|    |5747|+// // Helper functions ////
|5748|5748| 
|5749|5749| UnitAI.prototype.CanAttack = function(target)
|5750|5750| {
|    | [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
|5948|5948| 	return cmpPack && cmpPack.IsPacking();
|5949|5949| };
|5950|5950| 
|5951|    |-//// Formation specific functions ////
|    |5951|+// // Formation specific functions ////
|5952|5952| 
|5953|5953| UnitAI.prototype.IsAttackingAsFormation = function()
|5954|5954| {
|    | [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
|5953|5953| UnitAI.prototype.IsAttackingAsFormation = function()
|5954|5954| {
|5955|5955| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5956|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5957|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5956|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5957|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5958|5958| };
|5959|5959| 
|5960|5960| //// 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
|5957|5957| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5958|5958| };
|5959|5959| 
|5960|    |-//// Animal specific functions ////
|    |5960|+// // Animal specific functions ////
|5961|5961| 
|5962|5962| UnitAI.prototype.MoveRandomly = function(distance)
|5963|5963| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
| 905| »   »   »   "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
| 927| »   »   »   "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
| 974| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1037| »   »   »   »   "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
|1072| »   »   »   "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
|1104| »   »   »   »   "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
|1183| »   »   »   »   "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
|1388| »   »   »   "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
|1571| »   »   »   "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
|1592| »   »   »   "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
|1622| »   »   »   "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
|1777| »   »   »   "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
|1815| »   »   »   "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
|1831| »   »   »   »   »   »   return;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected a return value.

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|1871| »   »   »   »   "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
|1948| »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2131| »   »   »   »   "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
|2221| »   »   »   »   "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
|2390| »   »   »   »   »   »   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
|2445| »   »   »   »   "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
|2563| »   »   »   »   "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
|2628| »   »   »   »   "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
|2668| »   »   »   »   "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
|2872| »   »   »   »   "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
|3056| »   »   »   »   "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
|3787| »   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
|4626| »   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
|4641| »   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
|4687| »   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
|4710| »   »   ····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
|5195| »   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
| 354| »   »   ····&&·(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
|1884| »   »   »   »   »   if·(!this.order.data.target·instanceof·Vector3D)
|    | [NORMAL] JSHintBear:
|    | Confusing use of '!'.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4470| »   »   »   &&·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
|4643| »   »   &&·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
|4644| »   »   &&·(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
|4821| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5957| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.
Executing section cli...

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

Stan added a comment.EditedThu, Jun 20, 10:32 PM
This comment has been deleted.
binaries/data/mods/public/simulation/components/UnitAI.js
1952

Ah I see, it's because the Filter use it possibly out of the class and we want to make sure it's the the right class that's being called.

4579

Maybe add some unit tests ? :)

4593

Maybe use the new function GetTargetPosition ?

5153

I don't think JS makes any difference between "number" and "float"
Also add dots at the end of the sentence :)

Freagarach marked an inline comment as done.Fri, Jun 21, 6:06 PM

I had a thought today: Usually, when someone wants to order ~10 catapults to attack ground a specific area, it is not desired that all catapults fire at the same location. I do not know whether it is possible, but it would be interesting to add an area to the attack ground order. So that if one clicks the button the cursor appears, but around the cursor a circle (perhaps filled circle) of the area to be bombarded. The circle would initially have a rather small radius (~5 m perhaps) but the radius can be increased/decreased by scrolling the middle mouse button (or pushing +/-). When the actual command is given, the catapults randomly choose a location within that radius to bombard, varying the location with every "PerformAttack".
How does that sound to you?

binaries/data/mods/public/simulation/components/UnitAI.js
4593

Yeah, tried that but it gave errors in the tests (something with vectors). I did not bother to try and fix those yesterday evening.

Stan added a comment.Fri, Jun 21, 6:49 PM

That sounds good and maybe actually better than being that precise though the shape should differ depending on the type of attacker. However I beleive that the spread parameter is made for that. One could use that to compute the circle.

Freagarach marked 2 inline comments as done.Fri, Jun 21, 8:38 PM
In D1971#83463, @Stan wrote:

However I beleive that the spread parameter is made for that. One could use that to compute the circle.

I guess the spread is for unintentional differences in projectile landing location, where my idea is intentional spread.

In D1971#83463, @Stan wrote:

That sounds good and maybe actually better than being that precise though the shape should differ depending on the type of attacker.

How do you mean that the shape should differ? Can you perhaps give an example?

Krinkle requested changes to this revision.Fri, Jun 21, 10:33 PM
Krinkle added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
1821

This is checking the instance of the boolean false value. In JavaScript, the ! is associated with the left-hand side first, not with the instanceof operator.

Example
function Foo() {}
function Bar() {}
a = new Foo()
a instanceof Bar; // false
!a instanceof Bar; // false (also)

You'll need if (!(obj instancof Ctor)) instead :)

This revision now requires changes to proceed.Fri, Jun 21, 10:33 PM
Freagarach updated this revision to Diff 8573.Fri, Jun 21, 10:34 PM
Freagarach marked 8 inline comments as done.
Freagarach edited the summary of this revision. (Show Details)

Looks like formations are working.

  • Added new functions to manage formation ranges.
Freagarach marked an inline comment as done.Fri, Jun 21, 10:36 PM
Freagarach added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
1821

Thanks! I remembered that I did this somewhere but I could not find it anymore ;)

Freagarach updated this revision to Diff 8574.Fri, Jun 21, 10:37 PM
Freagarach marked an inline comment as done.

Fixed check for timer.

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 271| 271| 		return "AttackGround" in this.template[attackType];
| 272| 272| 
| 273| 273| 	return this.GetAttackTypes().some(type => "AttackGround" in this.template[type]);
| 274|    |-}
|    | 274|+};
| 275| 275| 
| 276| 276| Attack.prototype.GetPreferredClasses = function(type)
| 277| 277| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 546| 546| 
| 547| 547| 		let horizSpeed = +this.template[type].Projectile.Speed;
| 548| 548| 		let gravity = +this.template[type].Projectile.Gravity;
| 549|    |-		//horizSpeed /= 2; gravity /= 2; // slow it down for testing
|    | 549|+		// horizSpeed /= 2; gravity /= 2; // slow it down for testing
| 550| 550| 
| 551| 551| 		let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 552| 552| 		if (!cmpPosition || !cmpPosition.IsInWorld())
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 604| 604| 		// TODO: Use unit rotation to implement x/z offsets.
| 605| 605| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 606| 606| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 607|    |-		
|    | 607|+
| 608| 608| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 609| 609| 		if (cmpVisual)
| 610| 610| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 676| 676| 			});
| 677| 677| 	}
| 678| 678| 	else
| 679|    |-	{
|    | 679|+	
| 680| 680| 		// Melee attack - hurt the target immediately
| 681| 681| 		cmpDamage.CauseDamage({
| 682| 682| 			"strengths": this.GetAttackStrengths(type),
| 686| 686| 			"type": type,
| 687| 687| 			"attackerOwner": attackerOwner
| 688| 688| 		});
| 689|    |-	}
|    | 689|+	
| 690| 690| };
| 691| 691| 
| 692| 692| /**

binaries/data/mods/public/simulation/components/Attack.js
| 536| ·»   let·cmpDamage·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_Damage);
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

binaries/data/mods/public/simulation/components/Attack.js
| 651| »   »   cmpTimer.SetTimeout(SYSTEM_ENTITY,·IID_Damage,·"MissileHit",·timeToTarget·*·1000·+·+this.template[type].Delay,·data);
|    | [NORMAL] JSHintBear:
|    | Confusing plusses.

binaries/data/mods/public/gui/session/unit_actions.js
| 590| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 416| 416| 
| 417| 417| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For units, take the range in front of it, no spread. So angle = 0
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423| 423| 			{
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421| 421| 			}
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426|    |-			}
|    | 426|+			
| 427| 427| 			else
| 428| 428| 			{
| 429| 429| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426| 426| 			}
| 427| 427| 			else
| 428|    |-			{
|    | 428|+			
| 429| 429| 				// not in world, set a default?
| 430| 430| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 431|    |-			}
|    | 431|+			
| 432| 432| 		}
| 433| 433| 
| 434| 434| 		ret.attack.attackGround = cmpAttack.CanAttackGround();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 798| 798| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 799| 799| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 800| 800| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 801|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 801|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 802| 802| 	}
| 803| 803| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 804| 804| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1317|1317| 		}
|1318|1318| 	}
|1319|1319| 	else
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1322|1322| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1323|1323| 		// wall piece.
|1338|1338| 			"pos": start.pos,
|1339|1339| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1340|1340| 		});
|1341|    |-	}
|    |1341|+	
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|1344| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1341|1341| 	}
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|    |-	{
|    |1344|+	
|1345|1345| 		// Analogous to the starting side case above
|1346|1346| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1347|1347| 		{
|1379|1379| 				"pos": end.pos,
|1380|1380| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1381|1381| 			});
|1382|    |-	}
|    |1382|+	
|1383|1383| 
|1384|1384| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1385|1385| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1557|1557| 
|1558|1558| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1559|1559| 		if (cmpVisual)
|1560|    |-		{
|    |1560|+		
|1561|1561| 			if (!allPiecesValid || !canAfford)
|1562|1562| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1563|1563| 			else
|1564|1564| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1565|    |-		}
|    |1565|+		
|1566|1566| 
|1567|1567| 		++entPool.numUsed;
|1568|1568| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1631|1631| 			{
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|    |-						"x": pos.x,
|    |1634|+					"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|    |-						"z": pos.z,
|    |1635|+					"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|    |-						"angle": cmpPosition.GetRotation().y,
|    |1636|+					"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|    |-						"ent": ent
|    |1637|+					"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|1640|1640| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1780|1780| 	}
|1781|1781| 	else if (data.target === secondMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = {
|1784|1784| 			"type": "is second",
|1785|1785| 			"gain": cmpEntityTrader.GetGoods().amount,
|1786|1786| 		};
|1787|    |-	}
|    |1787|+	
|1788|1788| 	else if (!firstMarket)
|1789|1789| 	{
|1790|1790| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1786|1786| 		};
|1787|1787| 	}
|1788|1788| 	else if (!firstMarket)
|1789|    |-	{
|    |1789|+	
|1790|1790| 		result = { "type": "set first" };
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else if (!secondMarket)
|1793|1793| 	{
|1794|1794| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		result = { "type": "set first" };
|1791|1791| 	}
|1792|1792| 	else if (!secondMarket)
|1793|    |-	{
|    |1793|+	
|1794|1794| 		result = {
|1795|1795| 			"type": "set second",
|1796|1796| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1797|1797| 		};
|1798|    |-	}
|    |1798|+	
|1799|1799| 	else
|1800|1800| 	{
|1801|1801| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1797|1797| 		};
|1798|1798| 	}
|1799|1799| 	else
|1800|    |-	{
|    |1800|+	
|1801|1801| 		// Else both markets are not null and target is different from them
|1802|1802| 		result = { "type": "set first" };
|1803|    |-	}
|    |1803|+	
|1804|1804| 	return result;
|1805|1805| };
|1806|1806| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|    |  26|+	let result = { "min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|  27|  27| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  28|  28| 	if (!cmpFormation)
|  29|  29| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|    |  26|+	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0 };
|  27|  27| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  28|  28| 	if (!cmpFormation)
|  29|  29| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  23|  23| 	let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|    |-			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|    |  26|+		(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|    |-			0,
|    |  27|+		0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|    |-			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|    |  28|+		(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|  31|  31| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 114| 114| 
| 115| 115| 	// Do this first in case the direct hit kills the target
| 116| 116| 	if (data.isSplash)
| 117|    |-	{
|    | 117|+	
| 118| 118| 		this.CauseSplashDamage({
| 119| 119| 			"attacker": data.attacker,
| 120| 120| 			"origin": Vector2D.from3D(data.position),
| 127| 127| 			"type": data.type,
| 128| 128| 			"attackerOwner": data.attackerOwner
| 129| 129| 		});
| 130|    |-	}
|    | 130|+	
| 131| 131| 
| 132| 132| 	let cmpProjectileManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ProjectileManager);
| 133| 133| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 225| 225| 				damageMultiplier = 0;
| 226| 226| 		}
| 227| 227| 		else // In case someone calls this function with an invalid shape.
| 228|    |-		{
|    | 228|+		
| 229| 229| 			warn("The " + data.shape + " splash damage shape is not implemented!");
| 230|    |-		}
|    | 230|+		
| 231| 231| 
| 232| 232| 		if (data.splashBonus)
| 233| 233| 			damageMultiplier *= GetDamageBonus(data.attacker, ent, data.type, data.splashBonus);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 182| 182| 		}
| 183| 183| 	}
| 184| 184| 	else if (placementSupport.mode === "wall")
| 185|    |-	{
|    | 185|+	
| 186| 186| 		if (placementSupport.wallSet && placementSupport.position)
| 187| 187| 		{
| 188| 188| 			// Fetch an updated list of snapping candidate entities
| 200| 200| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 201| 201| 			});
| 202| 202| 		}
| 203|    |-	}
|    | 203|+	
| 204| 204| 
| 205| 205| 	return false;
| 206| 206| }
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 289| 289| 	}
| 290| 290| 
| 291| 291| 	if (!updateBuildingPlacementPreview())
| 292|    |-	{
|    | 292|+	
| 293| 293| 		// invalid location - don't build it
| 294| 294| 		// TODO: play a sound?
| 295| 295| 		return false;
| 296|    |-	}
|    | 296|+	
| 297| 297| 
| 298| 298| 	var selection = g_Selection.toList();
| 299| 299| 
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 328| 328| 	}
| 329| 329| 
| 330| 330| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 331|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 331|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 332| 332| 	{
| 333| 333| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 334| 334| 		return false;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 355| 355| 	// (this is somewhat non-ideal and hardcode-ish)
| 356| 356| 	var hasWallSegment = false;
| 357| 357| 	for (let piece of cmd.pieces)
| 358|    |-	{
|    | 358|+	
| 359| 359| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 360| 360| 		{
| 361| 361| 			hasWallSegment = true;
| 362| 362| 			break;
| 363| 363| 		}
| 364|    |-	}
|    | 364|+	
| 365| 365| 
| 366| 366| 	if (hasWallSegment)
| 367| 367| 	{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 478| 478| 	mouseIsOverObject = (hoveredObject != null);
| 479| 479| 
| 480| 480| 	// Close the menu when interacting with the game world
| 481|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 482|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 481|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 482|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 483| 483| 		closeMenu();
| 484| 484| 
| 485| 485| 	// State-machine processing:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 519| 519| 
| 520| 520| 				// Update the list of selected units
| 521| 521| 				if (Engine.HotkeyIsPressed("selection.add"))
| 522|    |-				{
|    | 522|+				
| 523| 523| 					g_Selection.addList(ents);
| 524|    |-				}
|    | 524|+				
| 525| 525| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 526| 526| 				{
| 527| 527| 					g_Selection.removeList(ents);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 523| 523| 					g_Selection.addList(ents);
| 524| 524| 				}
| 525| 525| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 526|    |-				{
|    | 526|+				
| 527| 527| 					g_Selection.removeList(ents);
| 528|    |-				}
|    | 528|+				
| 529| 529| 				else
| 530| 530| 				{
| 531| 531| 					g_Selection.reset();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 579| 579| 				// If shift is down, let the player continue placing another of the same building
| 580| 580| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 581| 581| 				if (tryPlaceBuilding(queued))
| 582|    |-				{
|    | 582|+				
| 583| 583| 					if (queued)
| 584| 584| 						inputState = INPUT_BUILDING_PLACEMENT;
| 585| 585| 					else
| 586| 586| 						inputState = INPUT_NORMAL;
| 587|    |-				}
|    | 587|+				
| 588| 588| 				else
| 589| 589| 				{
| 590| 590| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 586| 586| 						inputState = INPUT_NORMAL;
| 587| 587| 				}
| 588| 588| 				else
| 589|    |-				{
|    | 589|+				
| 590| 590| 					inputState = INPUT_BUILDING_PLACEMENT;
| 591|    |-				}
|    | 591|+				
| 592| 592| 				return true;
| 593| 593| 			}
| 594| 594| 			break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 639| 639| 		// user to continue building walls.
| 640| 640| 		switch (ev.type)
| 641| 641| 		{
| 642|    |-			case "mousemotion":
|    | 642|+		case "mousemotion":
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 640| 640| 		switch (ev.type)
| 641| 641| 		{
| 642| 642| 			case "mousemotion":
| 643|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 643|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 642| 642| 			case "mousemotion":
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 645|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646|    |-				// the ending point and the starting point to snap to.
|    | 646|+			// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647|    |-				//
|    | 647|+			//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 648|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 649|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 650|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 651|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 652|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653|    |-				// points.
|    | 653|+			// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
| 655|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 655|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 653| 653| 				// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 656|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658|    |-				if (result && result.cost)
|    | 658|+			if (result && result.cost)
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659|    |-				{
|    | 659|+			{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
| 660|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 660|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661|    |-					placementSupport.tooltipMessage = [
|    | 661|+				placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662|    |-						getEntityCostTooltip(result),
|    | 662|+					getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663|    |-						getNeededResourcesTooltip(neededResources)
|    | 663|+					getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664|    |-					].filter(tip => tip).join("\n");
|    | 664|+				].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
| 667| 667| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665|    |-				}
|    | 665|+			}
| 666| 666| 
| 667| 667| 				break;
| 668| 668| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
| 667|    |-				break;
|    | 667|+			break;
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				break;
| 668| 668| 
| 669|    |-			case "mousebuttondown":
|    | 669|+		case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				break;
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 670|+			if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671|    |-				{
|    | 671|+			{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 672|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673|    |-					if (tryPlaceWall(queued))
|    | 673|+				if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676| 676| 						{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674|    |-					{
|    | 674|+					
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688|    |-					}
|    | 688|+					
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674|    |-					{
|    | 674|+				{
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675|    |-						if (queued)
|    | 675|+					if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676|    |-						{
|    | 676|+					{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677|    |-							// continue building, just set a new starting position where we left off
|    | 677|+						// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 678|+						placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679|    |-							placementSupport.wallEndPosition = undefined;
|    | 679|+						placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 681|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683| 683| 						else
| 684| 684| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682|    |-						}
|    | 682|+					}
| 683| 683| 						else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683|    |-						else
|    | 683|+					else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683| 683| 						else
| 684|    |-						{
|    | 684|+					{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						}
| 683| 683| 						else
| 684| 684| 						{
| 685|    |-							placementSupport.Reset();
|    | 685|+						placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 683| 683| 						else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686|    |-							inputState = INPUT_NORMAL;
|    | 686|+						inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
| 689| 689| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687|    |-						}
|    | 687|+					}
| 688| 688| 					}
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688|    |-					}
|    | 688|+				}
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
| 689|    |-					else
|    | 689|+				else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 687| 687| 						}
| 688| 688| 					}
| 689| 689| 					else
| 690|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 690|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692|    |-					updateBuildingPlacementPreview();
|    | 692|+				updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693|    |-					return true;
|    | 693|+				return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694|    |-				}
|    | 694|+			}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694| 694| 				}
| 695|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 695|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 693| 693| 					return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696|    |-				{
|    | 696|+			{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697|    |-					// reset to normal input mode
|    | 697|+				// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698|    |-					placementSupport.Reset();
|    | 698|+				placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699|    |-					updateBuildingPlacementPreview();
|    | 699|+				updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701|    |-					inputState = INPUT_NORMAL;
|    | 701|+				inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				break;
| 705| 705| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				break;
| 705| 705| 		}
| 706| 706| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				break;
|    | 704|+			break;
| 705| 705| 		}
| 706| 706| 		break;
| 707| 707| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 711| 711| 		case "mousemotion":
| 712| 712| 			let maxDragDelta = 16;
| 713| 713| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 714|    |-			{
|    | 714|+			
| 715| 715| 				// Rotate in the direction of the mouse
| 716| 716| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 717|    |-			}
|    | 717|+			
| 718| 718| 			else
| 719| 719| 			{
| 720| 720| 				// If the mouse is near the center, snap back to the default orientation
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 716| 716| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 717| 717| 			}
| 718| 718| 			else
| 719|    |-			{
|    | 719|+			
| 720| 720| 				// If the mouse is near the center, snap back to the default orientation
| 721| 721| 				placementSupport.SetDefaultAngle();
| 722|    |-			}
|    | 722|+			
| 723| 723| 
| 724| 724| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 725| 725| 				"template": placementSupport.template,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 742| 742| 				// If shift is down, let the player continue placing another of the same building
| 743| 743| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 744| 744| 				if (tryPlaceBuilding(queued))
| 745|    |-				{
|    | 745|+				
| 746| 746| 					if (queued)
| 747| 747| 						inputState = INPUT_BUILDING_PLACEMENT;
| 748| 748| 					else
| 749| 749| 						inputState = INPUT_NORMAL;
| 750|    |-				}
|    | 750|+				
| 751| 751| 				else
| 752| 752| 				{
| 753| 753| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 749| 749| 						inputState = INPUT_NORMAL;
| 750| 750| 				}
| 751| 751| 				else
| 752|    |-				{
|    | 752|+				
| 753| 753| 					inputState = INPUT_BUILDING_PLACEMENT;
| 754|    |-				}
|    | 754|+				
| 755| 755| 				return true;
| 756| 756| 			}
| 757| 757| 			break;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 798| 798| 
| 799| 799| 	// Handle the time-warp testing features, restricted to single-player
| 800| 800| 	if (!g_IsNetworked && g_DeveloperOverlay.isTimeWarpEnabled())
| 801|    |-	{
|    | 801|+	
| 802| 802| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 803| 803| 			Engine.SetSimRate(20.0);
| 804| 804| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 805| 805| 			Engine.SetSimRate(1.0);
| 806| 806| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 807| 807| 			Engine.RewindTimeWarp();
| 808|    |-	}
|    | 808|+	
| 809| 809| 
| 810| 810| 	if (ev.hotkey == "session.highlightguarding")
| 811| 811| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 857| 857| 			break;
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 860|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861|    |-				{
|    | 861|+			{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862|    |-					let now = Date.now();
|    | 862|+				let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 863|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 865|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866|    |-						{
|    | 866|+					{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867|    |-							var sptr = ev.hotkey.split(".");
|    | 867|+						var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868|    |-							performGroup("snap", sptr[3]);
|    | 868|+						performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869|    |-						}
|    | 869|+					}
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870|    |-					}
|    | 870|+				}
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871|    |-					else
|    | 871|+				else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
| 872|    |-					{
|    | 872|+				{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
| 873|    |-						var sptr = ev.hotkey.split(".");
|    | 873|+					var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874|    |-						performGroup(sptr[2], sptr[3]);
|    | 874|+					performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876|    |-						doublePressTimer = now;
|    | 876|+					doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877|    |-						prevHotkey = ev.hotkey;
|    | 877|+					prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880| 880| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878|    |-					}
|    | 878|+				}
| 879| 879| 				}
| 880| 880| 				break;
| 881| 881| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879|    |-				}
|    | 879|+			}
| 880| 880| 				break;
| 881| 881| 		}
| 882| 882| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880|    |-				break;
|    | 880|+			break;
| 881| 881| 		}
| 882| 882| 		break;
| 883| 883| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1045|1045| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1046|1046| 
|1047|1047| 			if (placementSupport.mode === "wall")
|1048|    |-			{
|    |1048|+			
|1049|1049| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1050|1050| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1051|1051| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1052|1052| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1053|    |-			}
|    |1053|+			
|1054|1054| 			else
|1055|1055| 			{
|1056|1056| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1317|1317| 	if (templateData.attack &&
|1318|1318| 		templateData.attack.Ranged &&
|1319|1319| 		templateData.attack.Ranged.maxRange)
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// add attack information to display a good tooltip
|1322|1322| 		placementSupport.attack = templateData.attack;
|1323|    |-	}
|    |1323|+	
|1324|1324| }
|1325|1325| 
|1326|1326| // Batch training:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1405|1405| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1406|1406| 	{
|1407|1407| 		if (inputState == INPUT_BATCHTRAINING)
|1408|    |-		{
|    |1408|+		
|1409|1409| 			// Check if we are training in the same building(s) as the last batch
|1410|1410| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1411|1411| 			// If the order changed, we have a new selection and we should create a new batch.
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|1440| 				// fall through to create the new batch
|1441|    |-		}
|    |1441|+		
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|1444|1444| 		if (decrement || Engine.GuiInterfaceCall("GetNeededResources", { "cost":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1437|1437| 			// Otherwise start a new one
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|    |-				// fall through to create the new batch
|    |1440|+			// fall through to create the new batch
|1441|1441| 		}
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1515|1515| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1516|1516| 	{
|1517|1517| 		// Train as many full batches as we can
|1518|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1518|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1519|1519| 		Engine.PostNetworkCommand({
|1520|1520| 			"type": "train",
|1521|1521| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1594|1594| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1595|1595| 
|1596|1596| 	// Reset the last idle unit, etc., if the selection type has changed.
|1597|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1597|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1598|1598| 		resetIdleUnit();
|1599|1599| 	lastIdleClasses = classes;
|1600|1600| 

binaries/data/mods/public/gui/session/input.js
| 229| »   »   var·entState·=·GetEntityState(ent);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'entState' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
| 236| »   var·target·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'target' to undefined.

binaries/data/mods/public/gui/session/input.js
| 250| »   var·actionInfo·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'actionInfo' to undefined.

binaries/data/mods/public/gui/session/input.js
| 467| »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 494| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 498| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 553| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 563| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 611| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 640| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 709| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 826| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 829| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 929| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1018| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1032| »   »   »   »   let·action·=·determineAction(ev.x,·ev.y);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'action' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
|1041| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1110| »   »   »   switch·(ev.hotkey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1545| »   switch·(action)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 236| »   var·target·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'target' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 250| »   var·actionInfo·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'actionInfo' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 264| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 267| »   »   »   var·r·=·g_UnitActions[action].hotkeyActionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 272| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 275| »   »   »   var·r·=·g_UnitActions[action].actionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 482| »   »   &&·(ev.button·==·SDL_BUTTON_LEFT·||·ev.button·==·SDL_BUTTON_RIGHT))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/gui/session/input.js
| 512| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 515| »   »   »   »   var·ents·=·getPreferredEntities(Engine.PickPlayerEntitiesInRect(rect[0],·rect[1],·rect[2],·rect[3],·g_ViewedPlayer));
|    | [NORMAL] JSHintBear:
|    | 'ents' is already defined.

binaries/data/mods/public/gui/session/input.js
| 672| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 712| »   »   »   let·maxDragDelta·=·16;
|    | [MAJOR] JSHintBear:
|    | 'maxDragDelta' has already been declared.

binaries/data/mods/public/gui/session/input.js
| 743| »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 873| »   »   »   »   »   »   var·sptr·=·ev.hotkey.split(".");
|    | [NORMAL] JSHintBear:
|    | 'sptr' is already defined.

binaries/data/mods/public/gui/session/input.js
| 889| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/gui/session/input.js
| 915| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'default'.

binaries/data/mods/public/gui/session/input.js
| 939| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 394| 394| function getRepairTimeTooltip(entState)
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397|    |-			"label": headerFont(translate("Number of repairers:")),
|    | 397|+		"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398|    |-			"details": entState.repairable.numBuilders
|    | 398|+		"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399|    |-		}) + "\n" + (entState.repairable.numBuilders ?
|    | 399|+	}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
| 402| 402| 			"Add another worker to speed up the repairs by %(second)s seconds.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 416| 416| function getBuildTimeTooltip(entState)
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419|    |-			"label": headerFont(translate("Number of builders:")),
|    | 419|+		"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420|    |-			"details": entState.foundation.numBuilders
|    | 420|+		"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421|    |-		}) + "\n" + (entState.foundation.numBuilders ?
|    | 421|+	}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
| 424| 424| 			"Add another worker to speed up the construction by %(second)s seconds.",
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 205| 205| 	"attack-ground": function(player, cmd, data)
| 206| 206| 	{
| 207| 207| 		let entities = [];
| 208|    |-		let target = new Vector3D(cmd.target.x, cmd.target.y, cmd.target.z)
|    | 208|+		let target = new Vector3D(cmd.target.x, cmd.target.y, cmd.target.z);
| 209| 209| 		for (let ent of data.entities)
| 210| 210| 		{
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 209| 209| 		for (let ent of data.entities)
| 210| 210| 		{
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
| 212|    |-			if (cmpAttack && cmpAttack.CanAttackGround()){
|    | 212|+			if (cmpAttack && cmpAttack.CanAttackGround())
| 213| 213| 				entities.push(ent);
| 214|    |-			}
|    | 214|+			
| 215| 215| 		}
| 216| 216| 		GetFormationUnitAIs(entities, player).forEach(cmpUnitAI => {
| 217| 217| 			cmpUnitAI.AttackGround(target, cmd.queued);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 346| 346| 			{
| 347| 347| 				var list = queue.GetEntitiesList();
| 348| 348| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 349|    |-				{
|    | 349|+				
| 350| 350| 					for (var promoted of cmd.promoted)
| 351| 351| 					{
| 352| 352| 						if (list.indexOf(promoted) === -1)
| 354| 354| 						cmd.template = promoted;
| 355| 355| 						break;
| 356| 356| 					}
| 357|    |-				}
|    | 357|+				
| 358| 358| 			}
| 359| 359| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 360| 360| 				if ("metadata" in cmd)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 553| 553| 			if (cmpGarrisonHolder)
| 554| 554| 			{
| 555| 555| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 556|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 557|    |-				    && player != +cmd.owner)
|    | 556|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 557|+				    player != +cmd.owner)
| 558| 558| 						continue;
| 559| 559| 
| 560| 560| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 555| 555| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 556| 556| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 557| 557| 				    && player != +cmd.owner)
| 558|    |-						continue;
|    | 558|+					continue;
| 559| 559| 
| 560| 560| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 561| 561| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 965| 965| 		{
| 966| 966| 			var count = 0;
| 967| 967| 			for (let j = 0; j < length - 1; ++j)
| 968|    |-			{
|    | 968|+			
| 969| 969| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 970| 970| 					++count;
| 971| 971| 				else
| 972| 972| 					break;
| 973|    |-			}
|    | 973|+			
| 974| 974| 			consec[i] = count;
| 975| 975| 		}
| 976| 976| 		var start = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 976| 976| 		var start = 0;
| 977| 977| 		var count = 0;
| 978| 978| 		for (var c in consec)
| 979|    |-		{
|    | 979|+		
| 980| 980| 			if (consec[c] > count)
| 981| 981| 			{
| 982| 982| 				start = c;
| 983| 983| 				count = consec[c];
| 984| 984| 			}
| 985|    |-		}
|    | 985|+		
| 986| 986| 
| 987| 987| 		// If we've found a shoreline, stop searching
| 988| 988| 		if (count != numPoints-1)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|1166|    |-	{
|    |1166|+	
|1167|1167| 		ProcessCommand(player, {
|1168|1168| 			"type": "repair",
|1169|1169| 			"entities": entities,
|1171|1171| 			"autocontinue": cmd.autocontinue,
|1172|1172| 			"queued": cmd.queued
|1173|1173| 		});
|1174|    |-	}
|    |1174|+	
|1175|1175| 
|1176|1176| 	return ent;
|1177|1177| }
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1267|1267| 		}
|1268|1268| 
|1269|1269| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1270|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1270|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1271|1271| 	}
|1272|1272| 
|1273|1273| 	var i = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1284|1284| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1285|1285| 		// start position snapping (implying that the first entity we build must be a tower)
|1286|1286| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1287|    |-		{
|    |1287|+		
|1288|1288| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1289|1289| 			{
|1290|1290|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1291|1291|     			break;
|1292|1292| 			}
|1293|    |-		}
|    |1293|+		
|1294|1294| 
|1295|1295| 		var constructPieceCmd = {
|1296|1296| 			"type": "construct",
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1331|1331| 
|1332|1332| 				if (i > 0)
|1333|1333| 				{
|1334|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1334|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1335|1335| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1336|1336| 					// TODO: ensure that cmpPreviousObstruction exists
|1337|1337| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1389|1389| 		}
|1390|1390| 
|1391|1391| 		if (piece.template == cmd.wallSet.templates.tower)
|1392|    |-		{
|    |1392|+		
|1393|1393| 			// encountered a tower entity, update the last tower control group
|1394|1394| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1395|    |-		}
|    |1395|+		
|1396|1396| 		else
|1397|1397| 		{
|1398|1398| 			// Encountered a non-tower entity, update its secondary control group to 'lastTowerControlGroup'.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1403|1403| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1404|1404| 			{
|1405|1405| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1406|    |-				{
|    |1406|+				
|1407|1407| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1408|    |-				}
|    |1408|+				
|1409|1409| 			}
|1410|1410| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1411|1411| 			{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1478|1478| 	}
|1479|1479| 
|1480|1480| 	if (formedEnts.length == 0)
|1481|    |-	{
|    |1481|+	
|1482|1482| 		// No units support the formation - return all the others
|1483|1483| 		return nonformedUnitAIs;
|1484|    |-	}
|    |1484|+	
|1485|1485| 
|1486|1486| 	// Find what formations the formationable selected entities are currently in
|1487|1487| 	var formation = ExtractFormations(formedEnts);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1494|1494| 		// Check that all its members are selected
|1495|1495| 		var fid = formationIds[0];
|1496|1496| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1497|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1498|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1497|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1498|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1499|1499| 		{
|1500|1500| 			cmpFormation.DeleteTwinFormations();
|1501|1501| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1526|1526| 					{
|1527|1527| 						var template = cmpUnitAI.GetFormationTemplate();
|1528|1528| 						if (lastFormationTemplate === undefined)
|1529|    |-						{
|    |1529|+						
|1530|1530| 							lastFormationTemplate = template;
|1531|    |-						}
|    |1531|+						
|1532|1532| 						else if (lastFormationTemplate != template)
|1533|1533| 						{
|1534|1534| 							lastFormationTemplate = undefined;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1602|1602| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1603|1603| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1604|1604| 				if (matrix[i][j] < distSq)
|1605|    |-					closeClusters = [i,j];
|    |1605|+					closeClusters = [i, j];
|1606|1606| 
|1607|1607| 		// if no more close clusters found, just return all found clusters so far
|1608|1608| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1624|1624| 		}
|1625|1625| 		// remove the rows and columns in the matrix for the merged clusters,
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|    |-		clusters.splice(closeClusters[0],1);
|    |1627|+		clusters.splice(closeClusters[0], 1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		// remove the rows and columns in the matrix for the merged clusters,
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|    |-		clusters.splice(closeClusters[1],1);
|    |1628|+		clusters.splice(closeClusters[1], 1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|    |-		matrix.splice(closeClusters[0],1);
|    |1629|+		matrix.splice(closeClusters[0], 1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|    |-		matrix.splice(closeClusters[1],1);
|    |1630|+		matrix.splice(closeClusters[1], 1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|1634|    |-				matrix[i].splice(closeClusters[0],1);
|    |1634|+				matrix[i].splice(closeClusters[0], 1);
|1635|1635| 			if (matrix[i].length > closeClusters[1])
|1636|1636| 				matrix[i].splice(closeClusters[1],1);
|1637|1637| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|1634|1634| 				matrix[i].splice(closeClusters[0],1);
|1635|1635| 			if (matrix[i].length > closeClusters[1])
|1636|    |-				matrix[i].splice(closeClusters[1],1);
|    |1636|+				matrix[i].splice(closeClusters[1], 1);
|1637|1637| 		}
|1638|1638| 		// add a new row of distances to the matrix and the new cluster
|1639|1639| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
|  43| »   if·(g_Commands[cmd.type])
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|  47| »   »   g_Commands[cmd.type](player,·cmd,·data);
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 212| »   »   »   if·(cmpAttack·&&·cmpAttack.CanAttackGround()){
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/helpers/Commands.js
| 805| »   »   let·ent·=·pickRandom(cmpRangeManager.GetEntitiesByPlayer(cmd.player).filter(ent·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Commands.js
|1290| ····»   »   »   error("[TryConstructWall]·Expected·last·tower·control·group·to·be·available,·none·found·(1st·pass,·iteration·"·+·i·+·")");
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1291| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|  53| var·g_Commands·=·{
|    | [NORMAL] JSHintBear:
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 208| »   »   let·target·=·new·Vector3D(cmd.target.x,·cmd.target.y,·cmd.target.z)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/Commands.js
| 557| »   »   »   »   ····&&·player·!=·+cmd.owner)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
| 745| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
| 977| »   »   var·count·=·0;
|    | [NORMAL] JSHintBear:
|    | 'count' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1124| »   »   var·cmpGuiInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGuiInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1376| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1498| »   »   »   &&·cmpFormation.GetMemberCount()·==·formation.entities.length)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1557| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353| 353| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354| 354| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355|    |-		{
|    | 355|+		
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 358| 358| 				needToMove = false;
| 359|    |-		}
|    | 359|+		
| 360| 360| 
| 361| 361| 		if (needToMove)
| 362| 362| 			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
| 350| 350| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 351| 351| 		var needToMove = true;
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 353|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 354|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355| 355| 		{
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			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
| 511| 511| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 512| 512| 				}
| 513| 513| 				else
| 514|    |-				{
|    | 514|+				
| 515| 515| 					// We couldn't move there, or the target moved away
| 516| 516| 					this.FinishOrder();
| 517|    |-				}
|    | 517|+				
| 518| 518| 				return;
| 519| 519| 			}
| 520| 520| 
|    | [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
| 743| 743| 			}
| 744| 744| 			// Check if we are already in range, otherwise walk there
| 745| 745| 			if (!this.CheckGarrisonRange(msg.data.target))
| 746|    |-			{
|    | 746|+			
| 747| 747| 				if (!this.CheckTargetVisible(msg.data.target))
| 748| 748| 				{
| 749| 749| 					this.FinishOrder();
| 754| 754| 					this.SetNextState("GARRISON.APPROACHING");
| 755| 755| 					return;
| 756| 756| 				}
| 757|    |-			}
|    | 757|+			
| 758| 758| 
| 759| 759| 			this.SetNextState("GARRISON.GARRISONING");
| 760| 760| 		},
|    | [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
| 749| 749| 					this.FinishOrder();
| 750| 750| 					return;
| 751| 751| 				}
| 752|    |-				else
| 753|    |-				{
|    | 752|+				
| 754| 753| 					this.SetNextState("GARRISON.APPROACHING");
| 755| 754| 					return;
| 756|    |-				}
|    | 755|+				
| 757| 756| 			}
| 758| 757| 
| 759| 758| 			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
| 772| 772| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 773| 773| 					}
| 774| 774| 					else
| 775|    |-					{
|    | 775|+					
| 776| 776| 						// We couldn't move there, or the target moved away
| 777| 777| 						this.FinishOrder();
| 778|    |-					}
|    | 778|+					
| 779| 779| 					return;
| 780| 780| 				}
| 781| 781| 
|    | [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
|1005|1005| 			},
|1006|1006| 		},
|1007|1007| 
|1008|    |-		"GARRISON":{
|    |1008|+		"GARRISON": {
|1009|1009| 			"enter": function() {
|1010|1010| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1011|1011| 				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
|1232|1232| 			// If the controller handled an order but some members rejected it,
|1233|1233| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1234|1234| 			if (this.orderQueue.length)
|1235|    |-			{
|    |1235|+			
|1236|1236| 				// We're leaving the formation, so stop our FormationWalk order
|1237|1237| 				if (this.FinishOrder())
|1238|1238| 					return;
|1239|    |-			}
|    |1239|+			
|1240|1240| 
|1241|1241| 			// No orders left, we're an individual now
|1242|1242| 			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
|1260|1260| 			// Move a tile outside the building
|1261|1261| 			let range = 4;
|1262|1262| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1263|    |-			{
|    |1263|+			
|1264|1264| 				// We are already at the target, or can't move at all
|1265|1265| 				this.FinishOrder();
|1266|    |-			}
|    |1266|+			
|1267|1267| 			else
|1268|1268| 			{
|1269|1269| 				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
|1481|1481| 
|1482|1482| 			"LosRangeUpdate": function(msg) {
|1483|1483| 				if (this.GetStance().targetVisibleEnemies)
|1484|    |-				{
|    |1484|+				
|1485|1485| 					// Start attacking one of the newly-seen enemy (if any)
|1486|1486| 					this.AttackEntitiesByPreference(msg.data.added);
|1487|    |-				}
|    |1487|+				
|1488|1488| 			},
|1489|1489| 
|1490|1490| 			"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
|1514|1514| 				this.SelectAnimation("move");
|1515|1515| 			},
|1516|1516| 
|1517|    |-			"leave": function () {
|    |1517|+			"leave": function() {
|1518|1518| 				this.SelectAnimation("idle");
|1519|1519| 				this.StopMoving();
|1520|1520| 			},
|    | [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
|1694|1694| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1695|1695| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1696|1696| 						if (cmpHealth && cmpHealth.IsInjured())
|1697|    |-						{
|    |1697|+						
|1698|1698| 							if (this.CanHeal(this.isGuardOf))
|1699|1699| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1700|1700| 							else if (this.CanRepair(this.isGuardOf))
|1701|1701| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1702|    |-						}
|    |1702|+						
|1703|1703| 					}
|1704|1704| 				},
|1705|1705| 
|    | [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
|1910|1910| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1911|1911| 
|1912|1912| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1913|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1913|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1914|1914| 
|1915|1915| 					this.FaceTowardsTarget(this.order.data.target);
|1916|1916| 
|    | [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
|2052|2052| 
|2053|2053| 				"Attacked": function(msg) {
|2054|2054| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2055|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2056|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2055|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2056|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2057|2057| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2058|2058| 				},
|2059|2059| 			},
|    | [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
|2072|2072| 					this.SelectAnimation("move");
|2073|2073| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2074|2074| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2075|    |-					{
|    |2075|+					
|2076|2076| 						// Run after a fleeing target
|2077|2077| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2078|    |-					}
|    |2078|+					
|2079|2079| 					this.StartTimer(1000, 1000);
|2080|2080| 				},
|2081|2081| 
|    | [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
|2254|2254| 
|2255|2255| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2256|2256| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2257|    |-					{
|    |2257|+					
|2258|2258| 						// Check we can still reach and gather from the target
|2259|2259| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2260|2260| 						{
|2305|2305| 								return;
|2306|2306| 							}
|2307|2307| 						}
|2308|    |-					}
|    |2308|+					
|2309|2309| 
|2310|2310| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2311|2311| 
|    | [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
|2297|2297| 								return;
|2298|2298| 						}
|2299|2299| 						else
|2300|    |-						{
|    |2300|+						
|2301|2301| 							// Try to follow the target
|2302|2302| 							if (this.MoveToTargetRange(this.gatheringTarget, IID_ResourceGatherer))
|2303|2303| 							{
|2304|2304| 								this.SetNextState("APPROACHING");
|2305|2305| 								return;
|2306|2306| 							}
|2307|    |-						}
|    |2307|+						
|2308|2308| 					}
|2309|2309| 
|2310|2310| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|    | [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
|2331|2331| 					// Also don't switch to a different type of huntable animal
|2332|2332| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2333|2333| 						return (
|2334|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2335|    |-							|| (type.specific == resourceType.specific
|    |2334|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2335|+							(type.specific == resourceType.specific
|2336|2336| 							&& (type.specific != "meat" || resourceTemplate == template))
|2337|2337| 						);
|2338|2338| 					});
|    | [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
|2332|2332| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2333|2333| 						return (
|2334|2334| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2335|    |-							|| (type.specific == resourceType.specific
|2336|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2335|+							|| (type.specific == resourceType.specific &&
|    |2336|+							(type.specific != "meat" || resourceTemplate == template))
|2337|2337| 						);
|2338|2338| 					});
|2339|2339| 					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
|2397|2397| 
|2398|2398| 				"Timer": function(msg) {
|2399|2399| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2400|    |-					{
|    |2400|+					
|2401|2401| 						// Return to our original position unless we have a better order.
|2402|2402| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2403|2403| 							this.WalkToHeldPosition();
|2404|    |-					}
|    |2404|+					
|2405|2405| 				},
|2406|2406| 
|2407|2407| 				"MovementUpdate": 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
|2431|2431| 					this.StartTimer(prepare, this.healTimers.repeat);
|2432|2432| 
|2433|2433| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2434|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2434|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2435|2435| 
|2436|2436| 					this.FaceTowardsTarget(this.order.data.target);
|2437|2437| 				},
|    | [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
|2644|2644| 					{
|2645|2645| 						// The building was already finished/fully repaired before we arrived;
|2646|2646| 						// let the ConstructionFinished handler handle this.
|2647|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2647|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2648|2648| 						return true;
|2649|2649| 					}
|2650|2650| 
|    | [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
|2644|2644| 					{
|2645|2645| 						// The building was already finished/fully repaired before we arrived;
|2646|2646| 						// let the ConstructionFinished handler handle this.
|2647|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2647|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2648|2648| 						return true;
|2649|2649| 					}
|2650|2650| 
|    | [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
|2771|2771| 
|2772|2772| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2773|2773| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2774|    |-				{
|    |2774|+				
|2775|2775| 					// We're already walking to the given point, so add this as a order.
|2776|2776| 					this.WalkToTarget(msg.data.newentity, true);
|2777|    |-				}
|    |2777|+				
|2778|2778| 			},
|2779|2779| 		},
|2780|2780| 
|    | [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
|2834|2834| 
|2835|2835| 					// Check that we can garrison here
|2836|2836| 					if (this.CanGarrison(target))
|2837|    |-					{
|    |2837|+					
|2838|2838| 						// Check that we're in range of the garrison target
|2839|2839| 						if (this.CheckGarrisonRange(target))
|2840|2840| 						{
|2910|2910| 								return false;
|2911|2911| 							}
|2912|2912| 						}
|2913|    |-					}
|    |2913|+					
|2914|2914| 					// Garrisoning failed for some reason, so finish the order
|2915|2915| 					this.FinishOrder();
|2916|2916| 					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
|3032|3032| 		"Attacked": function(msg) {
|3033|3033| 			if (this.template.NaturalBehaviour == "skittish" ||
|3034|3034| 			    this.template.NaturalBehaviour == "passive")
|3035|    |-			{
|    |3035|+			
|3036|3036| 				this.Flee(msg.data.attacker, false);
|3037|    |-			}
|    |3037|+			
|3038|3038| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3039|3039| 			{
|3040|3040| 				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
|3041|3041| 					this.Attack(msg.data.attacker, false);
|3042|3042| 			}
|3043|3043| 			else if (this.template.NaturalBehaviour == "domestic")
|3044|    |-			{
|    |3044|+			
|3045|3045| 				// Never flee, stop what we were doing
|3046|3046| 				this.SetNextState("IDLE");
|3047|    |-			}
|    |3047|+			
|3048|3048| 		},
|3049|3049| 
|3050|3050| 		"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
|3055|3055| 				this.FinishOrder();
|3056|3056| 				return;
|3057|3057| 			}
|3058|    |-			else
|3059|    |-			{
|    |3058|+			
|3060|3059| 				this.order.data.min = range;
|3061|3060| 				this.SetNextState("WALKING");
|3062|    |-			}
|    |3061|+			
|3063|3062| 		},
|3064|3063| 
|3065|3064| 		"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
|3099|3099| 				}
|3100|3100| 				// Start attacking one of the newly-seen enemy (if any)
|3101|3101| 				else if (this.IsDangerousAnimal())
|3102|    |-				{
|    |3102|+				
|3103|3103| 					this.AttackVisibleEntity(msg.data.added);
|3104|    |-				}
|    |3104|+				
|3105|3105| 
|3106|3106| 				// TODO: if two units enter our range together, we'll attack the
|3107|3107| 				// 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
|3142|3142| 				}
|3143|3143| 				// Start attacking one of the newly-seen enemy (if any)
|3144|3144| 				else if (this.template.NaturalBehaviour == "violent")
|3145|    |-				{
|    |3145|+				
|3146|3146| 					this.AttackVisibleEntity(msg.data.added);
|3147|    |-				}
|    |3147|+				
|3148|3148| 			},
|3149|3149| 
|3150|3150| 			"Timer": function(msg) {
|    | [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
|3157|3157| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3158|3158| 
|3159|3159| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3160|    |-							// only used for domestic animals
|    |3160|+		// only used for domestic animals
|3161|3161| 	},
|3162|3162| };
|3163|3163| 
|    | [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
|3214|3214| 
|3215|3215| UnitAI.prototype.IsAnimal = function()
|3216|3216| {
|3217|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3217|+	return (!!this.template.NaturalBehaviour);
|3218|3218| };
|3219|3219| 
|3220|3220| 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
|3252|3252| UnitAI.prototype.GetGarrisonHolder = function()
|3253|3253| {
|3254|3254| 	if (this.IsGarrisoned())
|3255|    |-	{
|    |3255|+	
|3256|3256| 		for (let order of this.orderQueue)
|3257|3257| 			if (order.type == "Garrison")
|3258|3258| 				return order.data.target;
|3259|    |-	}
|    |3259|+	
|3260|3260| 	return INVALID_ENTITY;
|3261|3261| };
|3262|3262| 
|    | [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
|3330|3330| 		{
|3331|3331| 			let index = this.GetCurrentState().indexOf(".");
|3332|3332| 			if (index != -1)
|3333|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3333|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3334|3334| 			this.Stop(false);
|3335|3335| 		}
|3336|3336| 
|    | [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
|3386|3386| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3387|3387| 			continue;
|3388|3388| 		if (i == 0)
|3389|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3389|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3390|3390| 		else
|3391|3391| 			this.orderQueue.splice(i, 1);
|3392|3392| 		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
|3386|3386| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3387|3387| 			continue;
|3388|3388| 		if (i == 0)
|3389|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3389|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3390|3390| 		else
|3391|3391| 			this.orderQueue.splice(i, 1);
|3392|3392| 		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
|3470|3470| };
|3471|3471| 
|3472|3472| 
|3473|    |-//// FSM linkage functions ////
|    |3473|+// // FSM linkage functions ////
|3474|3474| 
|3475|3475| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3476|3476| 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
|3642|3642| 				continue;
|3643|3643| 			if (this.orderQueue[i].type == type)
|3644|3644| 				continue;
|3645|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3645|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3646|3646| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3647|3647| 			return;
|3648|3648| 		}
|    | [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
|3642|3642| 				continue;
|3643|3643| 			if (this.orderQueue[i].type == type)
|3644|3644| 				continue;
|3645|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3645|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3646|3646| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3647|3647| 			return;
|3648|3648| 		}
|    | [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
|3656|3656| {
|3657|3657| 	// Remember the previous work orders to be able to go back to them later if required
|3658|3658| 	if (data && data.force)
|3659|    |-	{
|    |3659|+	
|3660|3660| 		if (this.IsFormationController())
|3661|3661| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3662|3662| 		else
|3663|3663| 			this.UpdateWorkOrders(type);
|3664|    |-	}
|    |3664|+	
|3665|3665| 
|3666|3666| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3667|3667| 
|    | [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
|3733|3733| 	{
|3734|3734| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3735|3735| 		if (cmpUnitAI)
|3736|    |-		{
|    |3736|+		
|3737|3737| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3738|3738| 			{
|3739|3739| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3742|3742| 					return;
|3743|3743| 				}
|3744|3744| 			}
|3745|    |-		}
|    |3745|+		
|3746|3746| 	}
|3747|3747| 
|3748|3748| 	// 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
|3735|3735| 		if (cmpUnitAI)
|3736|3736| 		{
|3737|3737| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3738|    |-			{
|    |3738|+			
|3739|3739| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3740|3740| 				{
|3741|3741| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3742|3742| 					return;
|3743|3743| 				}
|3744|    |-			}
|    |3744|+			
|3745|3745| 		}
|3746|3746| 	}
|3747|3747| 
|    | [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
|3747|3747| 
|3748|3748| 	// If nothing found, take the unit orders
|3749|3749| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3750|    |-	{
|    |3750|+	
|3751|3751| 		if (isWorkType(this.orderQueue[i].type))
|3752|3752| 		{
|3753|3753| 			this.workOrders = this.orderQueue.slice(i);
|3754|3754| 			return;
|3755|3755| 		}
|3756|    |-	}
|    |3756|+	
|3757|3757| };
|3758|3758| 
|3759|3759| 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
|3813|3813| 	if (data.timerRepeat === undefined)
|3814|3814| 		this.timer = undefined;
|3815|3815| 
|3816|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3816|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3817|3817| };
|3818|3818| 
|3819|3819| /**
|    | [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
|3813|3813| 	if (data.timerRepeat === undefined)
|3814|3814| 		this.timer = undefined;
|3815|3815| 
|3816|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3816|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3817|3817| };
|3818|3818| 
|3819|3819| /**
|    | [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
|3848|3848| 	this.timer = undefined;
|3849|3849| };
|3850|3850| 
|3851|    |-//// Message handlers /////
|    |3851|+// // Message handlers /////
|3852|3852| 
|3853|3853| UnitAI.prototype.OnMotionChanged = function(msg)
|3854|3854| {
|    | [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
|3860|3860| 	// TODO: This is a bit inefficient since every unit listens to every
|3861|3861| 	// construction message - ideally we could scope it to only the one we're building
|3862|3862| 
|3863|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3863|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3864|3864| };
|3865|3865| 
|3866|3866| 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
|3860|3860| 	// TODO: This is a bit inefficient since every unit listens to every
|3861|3861| 	// construction message - ideally we could scope it to only the one we're building
|3862|3862| 
|3863|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3863|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3864|3864| };
|3865|3865| 
|3866|3866| 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
|3885|3885| 
|3886|3886| UnitAI.prototype.OnAttacked = function(msg)
|3887|3887| {
|3888|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3888|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3889|3889| };
|3890|3890| 
|3891|3891| 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
|3885|3885| 
|3886|3886| UnitAI.prototype.OnAttacked = function(msg)
|3887|3887| {
|3888|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3888|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3889|3889| };
|3890|3890| 
|3891|3891| 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
|3890|3890| 
|3891|3891| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3892|3892| {
|3893|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3893|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3894|3894| };
|3895|3895| 
|3896|3896| 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
|3890|3890| 
|3891|3891| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3892|3892| {
|3893|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3893|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3894|3894| };
|3895|3895| 
|3896|3896| 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
|3895|3895| 
|3896|3896| UnitAI.prototype.OnHealthChanged = function(msg)
|3897|3897| {
|3898|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3898|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3899|3899| };
|3900|3900| 
|3901|3901| 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
|3895|3895| 
|3896|3896| UnitAI.prototype.OnHealthChanged = function(msg)
|3897|3897| {
|3898|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3898|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3899|3899| };
|3900|3900| 
|3901|3901| 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
|3901|3901| UnitAI.prototype.OnRangeUpdate = function(msg)
|3902|3902| {
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3904|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|3906| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|    | [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
|3901|3901| UnitAI.prototype.OnRangeUpdate = function(msg)
|3902|3902| {
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3904|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|3906| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|    | [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
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|3904| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3906|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|3908|3908| 
|3909|3909| 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
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|3904| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3906|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3907|3907| };
|3908|3908| 
|3909|3909| 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
|3908|3908| 
|3909|3909| UnitAI.prototype.OnPackFinished = function(msg)
|3910|3910| {
|3911|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3911|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3912|3912| };
|3913|3913| 
|3914|3914| //// 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
|3908|3908| 
|3909|3909| UnitAI.prototype.OnPackFinished = function(msg)
|3910|3910| {
|3911|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3911|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3912|3912| };
|3913|3913| 
|3914|3914| //// 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
|3911|3911| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3912|3912| };
|3913|3913| 
|3914|    |-//// Helper functions to be called by the FSM ////
|    |3914|+// // Helper functions to be called by the FSM ////
|3915|3915| 
|3916|3916| UnitAI.prototype.GetWalkSpeed = function()
|3917|3917| {
|    | [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
|4013|4013| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4014|4014| 		return undefined;
|4015|4015| 
|4016|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4016|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4017|4017| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4018|4018| 		return undefined;
|4019|4019| 
|    | [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
|4098|4098| 			PlaySound(name, member);
|4099|4099| 	}
|4100|4100| 	else
|4101|    |-	{
|    |4101|+	
|4102|4102| 		// Otherwise use our own sounds
|4103|4103| 		PlaySound(name, this.entity);
|4104|    |-	}
|    |4104|+	
|4105|4105| };
|4106|4106| 
|4107|4107| /*
|    | [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
|4443|4443| 	if (this.IsFormationMember())
|4444|4444| 	{
|4445|4445| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4446|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4447|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4446|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4447|+			cmpFormationUnitAI.order.data.target == target)
|4448|4448| 			return true;
|4449|4449| 	}
|4450|4450| 
|    | [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| 	if (this.IsFormationMember())
|4504|4504| 	{
|4505|4505| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4506|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4507|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4506|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4507|+			cmpFormationUnitAI.order.data.target == target)
|4508|4508| 			return true;
|4509|4509| 	}
|4510|4510| 
|    | [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
|4649|4649| UnitAI.prototype.AttackEntityInZone = function(ents)
|4650|4650| {
|4651|4651| 	var target = ents.find(target =>
|4652|    |-		this.CanAttack(target)
|4653|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4652|+		this.CanAttack(target) &&
|    |4653|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4654|4654| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4655|4655| 	);
|4656|4656| 	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
|4650|4650| {
|4651|4651| 	var target = ents.find(target =>
|4652|4652| 		this.CanAttack(target)
|4653|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4654|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4653|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4654|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4655|4655| 	);
|4656|4656| 	if (!target)
|4657|4657| 		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
|4714|4714| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4715|4715| 	if (this.isGuardOf)
|4716|4716| 	{
|4717|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4717|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4718|4718| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4719|4719| 		if (cmpUnitAI && cmpAttack &&
|4720|4720| 		    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
|4718|4718| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4719|4719| 		if (cmpUnitAI && cmpAttack &&
|4720|4720| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4721|    |-				return false;
|    |4721|+			return false;
|4722|4722| 	}
|4723|4723| 
|4724|4724| 	// 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
|4723|4723| 
|4724|4724| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4725|4725| 	if (this.GetStance().respondHoldGround)
|4726|    |-	{
|    |4726|+	
|4727|4727| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4728|4728| 			return true;
|4729|    |-	}
|    |4729|+	
|4730|4730| 
|4731|4731| 	// Stop if it's left our vision range, unless we're especially persistent
|4732|4732| 	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
|4730|4730| 
|4731|4731| 	// Stop if it's left our vision range, unless we're especially persistent
|4732|4732| 	if (!this.GetStance().respondChaseBeyondVision)
|4733|    |-	{
|    |4733|+	
|4734|4734| 		if (!this.CheckTargetIsInVisionRange(target))
|4735|4735| 			return true;
|4736|    |-	}
|    |4736|+	
|4737|4737| 
|4738|4738| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4739|4739| 	// 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
|4757|4757| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4758|4758| 	if (this.isGuardOf)
|4759|4759| 	{
|4760|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4760|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4761|4761| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4762|4762| 		if (cmpUnitAI && cmpAttack &&
|4763|4763| 		    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
|4770|4770| 	return false;
|4771|4771| };
|4772|4772| 
|4773|    |-//// External interface functions ////
|    |4773|+// // External interface functions ////
|4774|4774| 
|4775|4775| UnitAI.prototype.SetFormationController = function(ent)
|4776|4776| {
|    | [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
|4780|4780| 	// of our own formation (or ourself if not in formation)
|4781|4781| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4782|4782| 	if (cmpObstruction)
|4783|    |-	{
|    |4783|+	
|4784|4784| 		if (ent == INVALID_ENTITY)
|4785|4785| 			cmpObstruction.SetControlGroup(this.entity);
|4786|4786| 		else
|4787|4787| 			cmpObstruction.SetControlGroup(ent);
|4788|    |-	}
|    |4788|+	
|4789|4789| 
|4790|4790| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4791|4791| 	if (ent == INVALID_ENTITY)
|    | [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
|4834|4834| 		return undefined;
|4835|4835| 
|4836|4836| 	return twoD ? cmpTargetPosition.GetPosition2D() : cmpTargetPosition.GetPosition();
|4837|    |-}
|    |4837|+};
|4838|4838| 
|4839|4839| UnitAI.prototype.GetTargetPositions = function()
|4840|4840| {
|    | [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
|4945|4945| 	// if we already had an old guard order, do nothing if the target is the same
|4946|4946| 	// and the order is running, otherwise remove the previous order
|4947|4947| 	if (this.isGuardOf)
|4948|    |-	{
|    |4948|+	
|4949|4949| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4950|4950| 			return;
|4951|4951| 		else
|4952|4952| 			this.RemoveGuard();
|4953|    |-	}
|    |4953|+	
|4954|4954| 
|4955|4955| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4956|4956| };
|    | [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
|4948|4948| 	{
|4949|4949| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4950|4950| 			return;
|4951|    |-		else
|4952|    |-			this.RemoveGuard();
|    |4951|+		this.RemoveGuard();
|4953|4952| 	}
|4954|4953| 
|4955|4954| 	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
|5119|5119| 			this.WalkToTarget(target, queued);
|5120|5120| 		return;
|5121|5121| 	}
|5122|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5122|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5123|5123| };
|5124|5124| 
|5125|5125| /**
|    | [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
|5280|5280| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5281|5281| 	{
|5282|5282| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5283|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5283|+		if (cmpTrader.HasBothMarkets() &&
|5284|5284| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5285|5285| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5286|5286| 		{
|    | [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
|5561|5561| 				{
|5562|5562| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5563|5563| 					var targetClasses = this.order.data.targetClasses;
|5564|    |-					if (targetClasses.attack && cmpIdentity
|5565|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5564|+					if (targetClasses.attack && cmpIdentity &&
|    |5565|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5566|5566| 						continue;
|5567|5567| 					if (targetClasses.avoid && cmpIdentity
|5568|5568| 						&& 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
|5564|5564| 					if (targetClasses.attack && cmpIdentity
|5565|5565| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5566|5566| 						continue;
|5567|    |-					if (targetClasses.avoid && cmpIdentity
|5568|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5567|+					if (targetClasses.avoid && cmpIdentity &&
|    |5568|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5569|5569| 						continue;
|5570|5570| 					// Only used by the AIs to prevent some choices of targets
|5571|5571| 					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
|5587|5587| 		{
|5588|5588| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5589|5589| 			var targetClasses = this.order.data.targetClasses;
|5590|    |-			if (cmpIdentity && targetClasses.attack
|5591|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5590|+			if (cmpIdentity && targetClasses.attack &&
|    |5591|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5592|5592| 				continue;
|5593|5593| 			if (cmpIdentity && targetClasses.avoid
|5594|5594| 				&& 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
|5590|5590| 			if (cmpIdentity && targetClasses.attack
|5591|5591| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5592|5592| 				continue;
|5593|    |-			if (cmpIdentity && targetClasses.avoid
|5594|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5593|+			if (cmpIdentity && targetClasses.avoid &&
|    |5594|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5595|5595| 				continue;
|5596|5596| 			// Only used by the AIs to prevent some choices of targets
|5597|5597| 			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
|5733|5733| 
|5734|5734| UnitAI.prototype.SetHeldPosition = function(x, z)
|5735|5735| {
|5736|    |-	this.heldPosition = {"x": x, "z": z};
|    |5736|+	this.heldPosition = { "x": x, "z": z};
|5737|5737| };
|5738|5738| 
|5739|5739| 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
|5733|5733| 
|5734|5734| UnitAI.prototype.SetHeldPosition = function(x, z)
|5735|5735| {
|5736|    |-	this.heldPosition = {"x": x, "z": z};
|    |5736|+	this.heldPosition = {"x": x, "z": z };
|5737|5737| };
|5738|5738| 
|5739|5739| 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
|5760|5760| 	return false;
|5761|5761| };
|5762|5762| 
|5763|    |-//// Helper functions ////
|    |5763|+// // Helper functions ////
|5764|5764| 
|5765|5765| UnitAI.prototype.CanAttack = function(target)
|5766|5766| {
|    | [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
|5964|5964| 	return cmpPack && cmpPack.IsPacking();
|5965|5965| };
|5966|5966| 
|5967|    |-//// Formation specific functions ////
|    |5967|+// // Formation specific functions ////
|5968|5968| 
|5969|5969| UnitAI.prototype.IsAttackingAsFormation = function()
|5970|5970| {
|    | [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
|5969|5969| UnitAI.prototype.IsAttackingAsFormation = function()
|5970|5970| {
|5971|5971| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5972|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5973|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5972|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5973|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5974|5974| };
|5975|5975| 
|5976|5976| //// 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
|5973|5973| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5974|5974| };
|5975|5975| 
|5976|    |-//// Animal specific functions ////
|    |5976|+// // Animal specific functions ////
|5977|5977| 
|5978|5978| UnitAI.prototype.MoveRandomly = function(distance)
|5979|5979| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
| 898| »   »   »   "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
| 967| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1030| »   »   »   »   "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
|1065| »   »   »   "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
|1097| »   »   »   »   "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
|1119| »   »   »   »   »   attackGround·?·this.CallMemberFunction("AttackGround",·[target,·false])·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1141| »   »   »   »   »   »   »   attackGround·?·this.PushOrderFront("AttackGround",·{·"target":·target,·"force":·false·})·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1170| »   »   »   »   »   »   »   attackGround·?·this.PushOrderFront("AttackGround",·{·"target":·target,·"force":·false·})·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1325| »   »   »   "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
|1508| »   »   »   "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
|1529| »   »   »   "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
|1559| »   »   »   "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
|1714| »   »   »   "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
|1802| »   »   »   »   "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
|1879| »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2062| »   »   »   »   "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
|2152| »   »   »   »   "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
|2321| »   »   »   »   »   »   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
|2376| »   »   »   »   "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
|2494| »   »   »   »   "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
|2559| »   »   »   »   "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
|2599| »   »   »   »   "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
|2803| »   »   »   »   "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
|2987| »   »   »   »   "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
|3718| »   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
|4636| »   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
|4651| »   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
|4697| »   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
|4720| »   »   ····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
|5211| »   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
| 354| »   »   ····&&·(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
|1120| »   »   »   »   »   »   this.CallMemberFunction("Attack",·[target,·this.order.data.allowCapture,·false]);
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1142| »   »   »   »   »   »   »   »   this.PushOrderFront("Attack",·{·"target":·target,·"force":·false,·"allowCapture":·allowCapture·});
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1171| »   »   »   »   »   »   »   »   this.PushOrderFront("Attack",·{·"target":·target,·"force":·false,·"allowCapture":·allowCapture·});
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1815| »   »   »   »   »   if·(!this.order.data.target·instanceof·Vector3D)
|    | [NORMAL] JSHintBear:
|    | Confusing use of '!'.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4447| »   »   »   &&·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| »   »   »   &&·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
|4653| »   »   &&·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
|4654| »   »   &&·(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
|4837| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5973| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.
Executing section cli...

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

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|    |  26|+	let result = { "min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|  27|  27| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  28|  28| 	if (!cmpFormation)
|  29|  29| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|    |  26|+	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0 };
|  27|  27| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  28|  28| 	if (!cmpFormation)
|  29|  29| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 394| 394| function getRepairTimeTooltip(entState)
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397|    |-			"label": headerFont(translate("Number of repairers:")),
|    | 397|+		"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398|    |-			"details": entState.repairable.numBuilders
|    | 398|+		"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399|    |-		}) + "\n" + (entState.repairable.numBuilders ?
|    | 399|+	}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
| 402| 402| 			"Add another worker to speed up the repairs by %(second)s seconds.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 416| 416| function getBuildTimeTooltip(entState)
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419|    |-			"label": headerFont(translate("Number of builders:")),
|    | 419|+		"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420|    |-			"details": entState.foundation.numBuilders
|    | 420|+		"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421|    |-		}) + "\n" + (entState.foundation.numBuilders ?
|    | 421|+	}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
| 424| 424| 			"Add another worker to speed up the construction by %(second)s seconds.",

binaries/data/mods/public/gui/session/unit_actions.js
| 590| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 416| 416| 
| 417| 417| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For units, take the range in front of it, no spread. So angle = 0
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423| 423| 			{
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421| 421| 			}
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426|    |-			}
|    | 426|+			
| 427| 427| 			else
| 428| 428| 			{
| 429| 429| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426| 426| 			}
| 427| 427| 			else
| 428|    |-			{
|    | 428|+			
| 429| 429| 				// not in world, set a default?
| 430| 430| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 431|    |-			}
|    | 431|+			
| 432| 432| 		}
| 433| 433| 
| 434| 434| 		ret.attack.attackGround = cmpAttack.CanAttackGround();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 798| 798| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 799| 799| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 800| 800| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 801|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 801|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 802| 802| 	}
| 803| 803| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 804| 804| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1317|1317| 		}
|1318|1318| 	}
|1319|1319| 	else
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1322|1322| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1323|1323| 		// wall piece.
|1338|1338| 			"pos": start.pos,
|1339|1339| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1340|1340| 		});
|1341|    |-	}
|    |1341|+	
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|1344| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1341|1341| 	}
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|    |-	{
|    |1344|+	
|1345|1345| 		// Analogous to the starting side case above
|1346|1346| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1347|1347| 		{
|1379|1379| 				"pos": end.pos,
|1380|1380| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1381|1381| 			});
|1382|    |-	}
|    |1382|+	
|1383|1383| 
|1384|1384| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1385|1385| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1557|1557| 
|1558|1558| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1559|1559| 		if (cmpVisual)
|1560|    |-		{
|    |1560|+		
|1561|1561| 			if (!allPiecesValid || !canAfford)
|1562|1562| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1563|1563| 			else
|1564|1564| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1565|    |-		}
|    |1565|+		
|1566|1566| 
|1567|1567| 		++entPool.numUsed;
|1568|1568| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1631|1631| 			{
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|    |-						"x": pos.x,
|    |1634|+					"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|    |-						"z": pos.z,
|    |1635|+					"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|    |-						"angle": cmpPosition.GetRotation().y,
|    |1636|+					"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|    |-						"ent": ent
|    |1637|+					"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|1640|1640| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1780|1780| 	}
|1781|1781| 	else if (data.target === secondMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = {
|1784|1784| 			"type": "is second",
|1785|1785| 			"gain": cmpEntityTrader.GetGoods().amount,
|1786|1786| 		};
|1787|    |-	}
|    |1787|+	
|1788|1788| 	else if (!firstMarket)
|1789|1789| 	{
|1790|1790| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1786|1786| 		};
|1787|1787| 	}
|1788|1788| 	else if (!firstMarket)
|1789|    |-	{
|    |1789|+	
|1790|1790| 		result = { "type": "set first" };
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else if (!secondMarket)
|1793|1793| 	{
|1794|1794| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		result = { "type": "set first" };
|1791|1791| 	}
|1792|1792| 	else if (!secondMarket)
|1793|    |-	{
|    |1793|+	
|1794|1794| 		result = {
|1795|1795| 			"type": "set second",
|1796|1796| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1797|1797| 		};
|1798|    |-	}
|    |1798|+	
|1799|1799| 	else
|1800|1800| 	{
|1801|1801| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1797|1797| 		};
|1798|1798| 	}
|1799|1799| 	else
|1800|    |-	{
|    |1800|+	
|1801|1801| 		// Else both markets are not null and target is different from them
|1802|1802| 		result = { "type": "set first" };
|1803|    |-	}
|    |1803|+	
|1804|1804| 	return result;
|1805|1805| };
|1806|1806| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 205| 205| 	"attack-ground": function(player, cmd, data)
| 206| 206| 	{
| 207| 207| 		let entities = [];
| 208|    |-		let target = new Vector3D(cmd.target.x, cmd.target.y, cmd.target.z)
|    | 208|+		let target = new Vector3D(cmd.target.x, cmd.target.y, cmd.target.z);
| 209| 209| 		for (let ent of data.entities)
| 210| 210| 		{
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 209| 209| 		for (let ent of data.entities)
| 210| 210| 		{
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
| 212|    |-			if (cmpAttack && cmpAttack.CanAttackGround()){
|    | 212|+			if (cmpAttack && cmpAttack.CanAttackGround())
| 213| 213| 				entities.push(ent);
| 214|    |-			}
|    | 214|+			
| 215| 215| 		}
| 216| 216| 		GetFormationUnitAIs(entities, player).forEach(cmpUnitAI => {
| 217| 217| 			cmpUnitAI.AttackGround(target, cmd.queued);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 346| 346| 			{
| 347| 347| 				var list = queue.GetEntitiesList();
| 348| 348| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 349|    |-				{
|    | 349|+				
| 350| 350| 					for (var promoted of cmd.promoted)
| 351| 351| 					{
| 352| 352| 						if (list.indexOf(promoted) === -1)
| 354| 354| 						cmd.template = promoted;
| 355| 355| 						break;
| 356| 356| 					}
| 357|    |-				}
|    | 357|+				
| 358| 358| 			}
| 359| 359| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 360| 360| 				if ("metadata" in cmd)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 553| 553| 			if (cmpGarrisonHolder)
| 554| 554| 			{
| 555| 555| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 556|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 557|    |-				    && player != +cmd.owner)
|    | 556|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 557|+				    player != +cmd.owner)
| 558| 558| 						continue;
| 559| 559| 
| 560| 560| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 555| 555| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 556| 556| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 557| 557| 				    && player != +cmd.owner)
| 558|    |-						continue;
|    | 558|+					continue;
| 559| 559| 
| 560| 560| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 561| 561| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 965| 965| 		{
| 966| 966| 			var count = 0;
| 967| 967| 			for (let j = 0; j < length - 1; ++j)
| 968|    |-			{
|    | 968|+			
| 969| 969| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 970| 970| 					++count;
| 971| 971| 				else
| 972| 972| 					break;
| 973|    |-			}
|    | 973|+			
| 974| 974| 			consec[i] = count;
| 975| 975| 		}
| 976| 976| 		var start = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 976| 976| 		var start = 0;
| 977| 977| 		var count = 0;
| 978| 978| 		for (var c in consec)
| 979|    |-		{
|    | 979|+		
| 980| 980| 			if (consec[c] > count)
| 981| 981| 			{
| 982| 982| 				start = c;
| 983| 983| 				count = consec[c];
| 984| 984| 			}
| 985|    |-		}
|    | 985|+		
| 986| 986| 
| 987| 987| 		// If we've found a shoreline, stop searching
| 988| 988| 		if (count != numPoints-1)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|1166|    |-	{
|    |1166|+	
|1167|1167| 		ProcessCommand(player, {
|1168|1168| 			"type": "repair",
|1169|1169| 			"entities": entities,
|1171|1171| 			"autocontinue": cmd.autocontinue,
|1172|1172| 			"queued": cmd.queued
|1173|1173| 		});
|1174|    |-	}
|    |1174|+	
|1175|1175| 
|1176|1176| 	return ent;
|1177|1177| }
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1267|1267| 		}
|1268|1268| 
|1269|1269| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1270|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1270|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1271|1271| 	}
|1272|1272| 
|1273|1273| 	var i = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1284|1284| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1285|1285| 		// start position snapping (implying that the first entity we build must be a tower)
|1286|1286| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1287|    |-		{
|    |1287|+		
|1288|1288| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1289|1289| 			{
|1290|1290|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1291|1291|     			break;
|1292|1292| 			}
|1293|    |-		}
|    |1293|+		
|1294|1294| 
|1295|1295| 		var constructPieceCmd = {
|1296|1296| 			"type": "construct",
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1331|1331| 
|1332|1332| 				if (i > 0)
|1333|1333| 				{
|1334|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1334|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1335|1335| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1336|1336| 					// TODO: ensure that cmpPreviousObstruction exists
|1337|1337| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1389|1389| 		}
|1390|1390| 
|1391|1391| 		if (piece.template == cmd.wallSet.templates.tower)
|1392|    |-		{
|    |1392|+		
|1393|1393| 			// encountered a tower entity, update the last tower control group
|1394|1394| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1395|    |-		}
|    |1395|+		
|1396|1396| 		else
|1397|1397| 		{
|1398|1398| 			// Encountered a non-tower entity, update its secondary control group to 'lastTowerControlGroup'.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1403|1403| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1404|1404| 			{
|1405|1405| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1406|    |-				{
|    |1406|+				
|1407|1407| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1408|    |-				}
|    |1408|+				
|1409|1409| 			}
|1410|1410| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1411|1411| 			{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1478|1478| 	}
|1479|1479| 
|1480|1480| 	if (formedEnts.length == 0)
|1481|    |-	{
|    |1481|+	
|1482|1482| 		// No units support the formation - return all the others
|1483|1483| 		return nonformedUnitAIs;
|1484|    |-	}
|    |1484|+	
|1485|1485| 
|1486|1486| 	// Find what formations the formationable selected entities are currently in
|1487|1487| 	var formation = ExtractFormations(formedEnts);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1494|1494| 		// Check that all its members are selected
|1495|1495| 		var fid = formationIds[0];
|1496|1496| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1497|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1498|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1497|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1498|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1499|1499| 		{
|1500|1500| 			cmpFormation.DeleteTwinFormations();
|1501|1501| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1526|1526| 					{
|1527|1527| 						var template = cmpUnitAI.GetFormationTemplate();
|1528|1528| 						if (lastFormationTemplate === undefined)
|1529|    |-						{
|    |1529|+						
|1530|1530| 							lastFormationTemplate = template;
|1531|    |-						}
|    |1531|+						
|1532|1532| 						else if (lastFormationTemplate != template)
|1533|1533| 						{
|1534|1534| 							lastFormationTemplate = undefined;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1602|1602| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1603|1603| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1604|1604| 				if (matrix[i][j] < distSq)
|1605|    |-					closeClusters = [i,j];
|    |1605|+					closeClusters = [i, j];
|1606|1606| 
|1607|1607| 		// if no more close clusters found, just return all found clusters so far
|1608|1608| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1624|1624| 		}
|1625|1625| 		// remove the rows and columns in the matrix for the merged clusters,
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|    |-		clusters.splice(closeClusters[0],1);
|    |1627|+		clusters.splice(closeClusters[0], 1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		// remove the rows and columns in the matrix for the merged clusters,
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|    |-		clusters.splice(closeClusters[1],1);
|    |1628|+		clusters.splice(closeClusters[1], 1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|    |-		matrix.splice(closeClusters[0],1);
|    |1629|+		matrix.splice(closeClusters[0], 1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|    |-		matrix.splice(closeClusters[1],1);
|    |1630|+		matrix.splice(closeClusters[1], 1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|1634|    |-				matrix[i].splice(closeClusters[0],1);
|    |1634|+				matrix[i].splice(closeClusters[0], 1);
|1635|1635| 			if (matrix[i].length > closeClusters[1])
|1636|1636| 				matrix[i].splice(closeClusters[1],1);
|1637|1637| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|1634|1634| 				matrix[i].splice(closeClusters[0],1);
|1635|1635| 			if (matrix[i].length > closeClusters[1])
|1636|    |-				matrix[i].splice(closeClusters[1],1);
|    |1636|+				matrix[i].splice(closeClusters[1], 1);
|1637|1637| 		}
|1638|1638| 		// add a new row of distances to the matrix and the new cluster
|1639|1639| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
|  43| »   if·(g_Commands[cmd.type])
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|  47| »   »   g_Commands[cmd.type](player,·cmd,·data);
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 212| »   »   »   if·(cmpAttack·&&·cmpAttack.CanAttackGround()){
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/helpers/Commands.js
| 805| »   »   let·ent·=·pickRandom(cmpRangeManager.GetEntitiesByPlayer(cmd.player).filter(ent·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Commands.js
|1290| ····»   »   »   error("[TryConstructWall]·Expected·last·tower·control·group·to·be·available,·none·found·(1st·pass,·iteration·"·+·i·+·")");
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1291| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|  53| var·g_Commands·=·{
|    | [NORMAL] JSHintBear:
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 208| »   »   let·target·=·new·Vector3D(cmd.target.x,·cmd.target.y,·cmd.target.z)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/Commands.js
| 557| »   »   »   »   ····&&·player·!=·+cmd.owner)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
| 745| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
| 977| »   »   var·count·=·0;
|    | [NORMAL] JSHintBear:
|    | 'count' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1124| »   »   var·cmpGuiInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGuiInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1376| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1498| »   »   »   &&·cmpFormation.GetMemberCount()·==·formation.entities.length)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1557| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  23|  23| 	let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|    |-			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|    |  26|+		(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|    |-			0,
|    |  27|+		0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|    |-			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|    |  28|+		(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|  31|  31| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 114| 114| 
| 115| 115| 	// Do this first in case the direct hit kills the target
| 116| 116| 	if (data.isSplash)
| 117|    |-	{
|    | 117|+	
| 118| 118| 		this.CauseSplashDamage({
| 119| 119| 			"attacker": data.attacker,
| 120| 120| 			"origin": Vector2D.from3D(data.position),
| 127| 127| 			"type": data.type,
| 128| 128| 			"attackerOwner": data.attackerOwner
| 129| 129| 		});
| 130|    |-	}
|    | 130|+	
| 131| 131| 
| 132| 132| 	let cmpProjectileManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ProjectileManager);
| 133| 133| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 225| 225| 				damageMultiplier = 0;
| 226| 226| 		}
| 227| 227| 		else // In case someone calls this function with an invalid shape.
| 228|    |-		{
|    | 228|+		
| 229| 229| 			warn("The " + data.shape + " splash damage shape is not implemented!");
| 230|    |-		}
|    | 230|+		
| 231| 231| 
| 232| 232| 		if (data.splashBonus)
| 233| 233| 			damageMultiplier *= GetDamageBonus(data.attacker, ent, data.type, data.splashBonus);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 271| 271| 		return "AttackGround" in this.template[attackType];
| 272| 272| 
| 273| 273| 	return this.GetAttackTypes().some(type => "AttackGround" in this.template[type]);
| 274|    |-}
|    | 274|+};
| 275| 275| 
| 276| 276| Attack.prototype.GetPreferredClasses = function(type)
| 277| 277| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 546| 546| 
| 547| 547| 		let horizSpeed = +this.template[type].Projectile.Speed;
| 548| 548| 		let gravity = +this.template[type].Projectile.Gravity;
| 549|    |-		//horizSpeed /= 2; gravity /= 2; // slow it down for testing
|    | 549|+		// horizSpeed /= 2; gravity /= 2; // slow it down for testing
| 550| 550| 
| 551| 551| 		let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 552| 552| 		if (!cmpPosition || !cmpPosition.IsInWorld())
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 604| 604| 		// TODO: Use unit rotation to implement x/z offsets.
| 605| 605| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 606| 606| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 607|    |-		
|    | 607|+
| 608| 608| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 609| 609| 		if (cmpVisual)
| 610| 610| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 676| 676| 			});
| 677| 677| 	}
| 678| 678| 	else
| 679|    |-	{
|    | 679|+	
| 680| 680| 		// Melee attack - hurt the target immediately
| 681| 681| 		cmpDamage.CauseDamage({
| 682| 682| 			"strengths": this.GetAttackStrengths(type),
| 686| 686| 			"type": type,
| 687| 687| 			"attackerOwner": attackerOwner
| 688| 688| 		});
| 689|    |-	}
|    | 689|+	
| 690| 690| };
| 691| 691| 
| 692| 692| /**

binaries/data/mods/public/simulation/components/Attack.js
| 536| ·»   let·cmpDamage·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_Damage);
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

binaries/data/mods/public/simulation/components/Attack.js
| 651| »   »   cmpTimer.SetTimeout(SYSTEM_ENTITY,·IID_Damage,·"MissileHit",·timeToTarget·*·1000·+·+this.template[type].Delay,·data);
|    | [NORMAL] JSHintBear:
|    | Confusing plusses.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 182| 182| 		}
| 183| 183| 	}
| 184| 184| 	else if (placementSupport.mode === "wall")
| 185|    |-	{
|    | 185|+	
| 186| 186| 		if (placementSupport.wallSet && placementSupport.position)
| 187| 187| 		{
| 188| 188| 			// Fetch an updated list of snapping candidate entities
| 200| 200| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 201| 201| 			});
| 202| 202| 		}
| 203|    |-	}
|    | 203|+	
| 204| 204| 
| 205| 205| 	return false;
| 206| 206| }
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 289| 289| 	}
| 290| 290| 
| 291| 291| 	if (!updateBuildingPlacementPreview())
| 292|    |-	{
|    | 292|+	
| 293| 293| 		// invalid location - don't build it
| 294| 294| 		// TODO: play a sound?
| 295| 295| 		return false;
| 296|    |-	}
|    | 296|+	
| 297| 297| 
| 298| 298| 	var selection = g_Selection.toList();
| 299| 299| 
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 328| 328| 	}
| 329| 329| 
| 330| 330| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 331|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 331|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 332| 332| 	{
| 333| 333| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 334| 334| 		return false;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 355| 355| 	// (this is somewhat non-ideal and hardcode-ish)
| 356| 356| 	var hasWallSegment = false;
| 357| 357| 	for (let piece of cmd.pieces)
| 358|    |-	{
|    | 358|+	
| 359| 359| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 360| 360| 		{
| 361| 361| 			hasWallSegment = true;
| 362| 362| 			break;
| 363| 363| 		}
| 364|    |-	}
|    | 364|+	
| 365| 365| 
| 366| 366| 	if (hasWallSegment)
| 367| 367| 	{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 478| 478| 	mouseIsOverObject = (hoveredObject != null);
| 479| 479| 
| 480| 480| 	// Close the menu when interacting with the game world
| 481|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 482|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 481|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 482|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 483| 483| 		closeMenu();
| 484| 484| 
| 485| 485| 	// State-machine processing:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 519| 519| 
| 520| 520| 				// Update the list of selected units
| 521| 521| 				if (Engine.HotkeyIsPressed("selection.add"))
| 522|    |-				{
|    | 522|+				
| 523| 523| 					g_Selection.addList(ents);
| 524|    |-				}
|    | 524|+				
| 525| 525| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 526| 526| 				{
| 527| 527| 					g_Selection.removeList(ents);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 523| 523| 					g_Selection.addList(ents);
| 524| 524| 				}
| 525| 525| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 526|    |-				{
|    | 526|+				
| 527| 527| 					g_Selection.removeList(ents);
| 528|    |-				}
|    | 528|+				
| 529| 529| 				else
| 530| 530| 				{
| 531| 531| 					g_Selection.reset();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 579| 579| 				// If shift is down, let the player continue placing another of the same building
| 580| 580| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 581| 581| 				if (tryPlaceBuilding(queued))
| 582|    |-				{
|    | 582|+				
| 583| 583| 					if (queued)
| 584| 584| 						inputState = INPUT_BUILDING_PLACEMENT;
| 585| 585| 					else
| 586| 586| 						inputState = INPUT_NORMAL;
| 587|    |-				}
|    | 587|+				
| 588| 588| 				else
| 589| 589| 				{
| 590| 590| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 586| 586| 						inputState = INPUT_NORMAL;
| 587| 587| 				}
| 588| 588| 				else
| 589|    |-				{
|    | 589|+				
| 590| 590| 					inputState = INPUT_BUILDING_PLACEMENT;
| 591|    |-				}
|    | 591|+				
| 592| 592| 				return true;
| 593| 593| 			}
| 594| 594| 			break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 639| 639| 		// user to continue building walls.
| 640| 640| 		switch (ev.type)
| 641| 641| 		{
| 642|    |-			case "mousemotion":
|    | 642|+		case "mousemotion":
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 640| 640| 		switch (ev.type)
| 641| 641| 		{
| 642| 642| 			case "mousemotion":
| 643|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 643|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 642| 642| 			case "mousemotion":
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 645|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646|    |-				// the ending point and the starting point to snap to.
|    | 646|+			// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647|    |-				//
|    | 647|+			//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 648|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 649|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 650|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 651|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 652|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653|    |-				// points.
|    | 653|+			// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
| 655|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 655|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 653| 653| 				// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 656|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658|    |-				if (result && result.cost)
|    | 658|+			if (result && result.cost)
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659|    |-				{
|    | 659|+			{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
| 660|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 660|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661|    |-					placementSupport.tooltipMessage = [
|    | 661|+				placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662|    |-						getEntityCostTooltip(result),
|    | 662|+					getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663|    |-						getNeededResourcesTooltip(neededResources)
|    | 663|+					getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664|    |-					].filter(tip => tip).join("\n");
|    | 664|+				].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
| 667| 667| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665|    |-				}
|    | 665|+			}
| 666| 666| 
| 667| 667| 				break;
| 668| 668| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
| 667|    |-				break;
|    | 667|+			break;
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				break;
| 668| 668| 
| 669|    |-			case "mousebuttondown":
|    | 669|+		case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				break;
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 670|+			if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671|    |-				{
|    | 671|+			{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 672|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673|    |-					if (tryPlaceWall(queued))
|    | 673|+				if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676| 676| 						{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674|    |-					{
|    | 674|+					
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688|    |-					}
|    | 688|+					
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674|    |-					{
|    | 674|+				{
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675|    |-						if (queued)
|    | 675|+					if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676|    |-						{
|    | 676|+					{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677|    |-							// continue building, just set a new starting position where we left off
|    | 677|+						// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 678|+						placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679|    |-							placementSupport.wallEndPosition = undefined;
|    | 679|+						placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 681|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683| 683| 						else
| 684| 684| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682|    |-						}
|    | 682|+					}
| 683| 683| 						else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683|    |-						else
|    | 683|+					else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683| 683| 						else
| 684|    |-						{
|    | 684|+					{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						}
| 683| 683| 						else
| 684| 684| 						{
| 685|    |-							placementSupport.Reset();
|    | 685|+						placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 683| 683| 						else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686|    |-							inputState = INPUT_NORMAL;
|    | 686|+						inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
| 689| 689| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687|    |-						}
|    | 687|+					}
| 688| 688| 					}
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688|    |-					}
|    | 688|+				}
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
| 689|    |-					else
|    | 689|+				else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 687| 687| 						}
| 688| 688| 					}
| 689| 689| 					else
| 690|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 690|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692|    |-					updateBuildingPlacementPreview();
|    | 692|+				updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693|    |-					return true;
|    | 693|+				return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694|    |-				}
|    | 694|+			}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694| 694| 				}
| 695|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 695|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 693| 693| 					return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696|    |-				{
|    | 696|+			{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697|    |-					// reset to normal input mode
|    | 697|+				// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698|    |-					placementSupport.Reset();
|    | 698|+				placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699|    |-					updateBuildingPlacementPreview();
|    | 699|+				updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701|    |-					inputState = INPUT_NORMAL;
|    | 701|+				inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				break;
| 705| 705| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				break;
| 705| 705| 		}
| 706| 706| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				break;
|    | 704|+			break;
| 705| 705| 		}
| 706| 706| 		break;
| 707| 707| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 711| 711| 		case "mousemotion":
| 712| 712| 			let maxDragDelta = 16;
| 713| 713| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 714|    |-			{
|    | 714|+			
| 715| 715| 				// Rotate in the direction of the mouse
| 716| 716| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 717|    |-			}
|    | 717|+			
| 718| 718| 			else
| 719| 719| 			{
| 720| 720| 				// If the mouse is near the center, snap back to the default orientation
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 716| 716| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 717| 717| 			}
| 718| 718| 			else
| 719|    |-			{
|    | 719|+			
| 720| 720| 				// If the mouse is near the center, snap back to the default orientation
| 721| 721| 				placementSupport.SetDefaultAngle();
| 722|    |-			}
|    | 722|+			
| 723| 723| 
| 724| 724| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 725| 725| 				"template": placementSupport.template,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 742| 742| 				// If shift is down, let the player continue placing another of the same building
| 743| 743| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 744| 744| 				if (tryPlaceBuilding(queued))
| 745|    |-				{
|    | 745|+				
| 746| 746| 					if (queued)
| 747| 747| 						inputState = INPUT_BUILDING_PLACEMENT;
| 748| 748| 					else
| 749| 749| 						inputState = INPUT_NORMAL;
| 750|    |-				}
|    | 750|+				
| 751| 751| 				else
| 752| 752| 				{
| 753| 753| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 749| 749| 						inputState = INPUT_NORMAL;
| 750| 750| 				}
| 751| 751| 				else
| 752|    |-				{
|    | 752|+				
| 753| 753| 					inputState = INPUT_BUILDING_PLACEMENT;
| 754|    |-				}
|    | 754|+				
| 755| 755| 				return true;
| 756| 756| 			}
| 757| 757| 			break;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 798| 798| 
| 799| 799| 	// Handle the time-warp testing features, restricted to single-player
| 800| 800| 	if (!g_IsNetworked && g_DeveloperOverlay.isTimeWarpEnabled())
| 801|    |-	{
|    | 801|+	
| 802| 802| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 803| 803| 			Engine.SetSimRate(20.0);
| 804| 804| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 805| 805| 			Engine.SetSimRate(1.0);
| 806| 806| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 807| 807| 			Engine.RewindTimeWarp();
| 808|    |-	}
|    | 808|+	
| 809| 809| 
| 810| 810| 	if (ev.hotkey == "session.highlightguarding")
| 811| 811| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 857| 857| 			break;
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 860|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861|    |-				{
|    | 861|+			{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862|    |-					let now = Date.now();
|    | 862|+				let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 863|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 865|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866|    |-						{
|    | 866|+					{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867|    |-							var sptr = ev.hotkey.split(".");
|    | 867|+						var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868|    |-							performGroup("snap", sptr[3]);
|    | 868|+						performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869|    |-						}
|    | 869|+					}
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870|    |-					}
|    | 870|+				}
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871|    |-					else
|    | 871|+				else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
| 872|    |-					{
|    | 872|+				{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
| 873|    |-						var sptr = ev.hotkey.split(".");
|    | 873|+					var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874|    |-						performGroup(sptr[2], sptr[3]);
|    | 874|+					performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876|    |-						doublePressTimer = now;
|    | 876|+					doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877|    |-						prevHotkey = ev.hotkey;
|    | 877|+					prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880| 880| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878|    |-					}
|    | 878|+				}
| 879| 879| 				}
| 880| 880| 				break;
| 881| 881| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879|    |-				}
|    | 879|+			}
| 880| 880| 				break;
| 881| 881| 		}
| 882| 882| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880|    |-				break;
|    | 880|+			break;
| 881| 881| 		}
| 882| 882| 		break;
| 883| 883| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1045|1045| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1046|1046| 
|1047|1047| 			if (placementSupport.mode === "wall")
|1048|    |-			{
|    |1048|+			
|1049|1049| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1050|1050| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1051|1051| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1052|1052| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1053|    |-			}
|    |1053|+			
|1054|1054| 			else
|1055|1055| 			{
|1056|1056| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1317|1317| 	if (templateData.attack &&
|1318|1318| 		templateData.attack.Ranged &&
|1319|1319| 		templateData.attack.Ranged.maxRange)
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// add attack information to display a good tooltip
|1322|1322| 		placementSupport.attack = templateData.attack;
|1323|    |-	}
|    |1323|+	
|1324|1324| }
|1325|1325| 
|1326|1326| // Batch training:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1405|1405| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1406|1406| 	{
|1407|1407| 		if (inputState == INPUT_BATCHTRAINING)
|1408|    |-		{
|    |1408|+		
|1409|1409| 			// Check if we are training in the same building(s) as the last batch
|1410|1410| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1411|1411| 			// If the order changed, we have a new selection and we should create a new batch.
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|1440| 				// fall through to create the new batch
|1441|    |-		}
|    |1441|+		
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|1444|1444| 		if (decrement || Engine.GuiInterfaceCall("GetNeededResources", { "cost":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1437|1437| 			// Otherwise start a new one
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|    |-				// fall through to create the new batch
|    |1440|+			// fall through to create the new batch
|1441|1441| 		}
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1515|1515| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1516|1516| 	{
|1517|1517| 		// Train as many full batches as we can
|1518|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1518|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1519|1519| 		Engine.PostNetworkCommand({
|1520|1520| 			"type": "train",
|1521|1521| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1594|1594| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1595|1595| 
|1596|1596| 	// Reset the last idle unit, etc., if the selection type has changed.
|1597|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1597|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1598|1598| 		resetIdleUnit();
|1599|1599| 	lastIdleClasses = classes;
|1600|1600| 

binaries/data/mods/public/gui/session/input.js
| 229| »   »   var·entState·=·GetEntityState(ent);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'entState' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
| 236| »   var·target·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'target' to undefined.

binaries/data/mods/public/gui/session/input.js
| 250| »   var·actionInfo·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'actionInfo' to undefined.

binaries/data/mods/public/gui/session/input.js
| 467| »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 494| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 498| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 553| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 563| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 611| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 640| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 709| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 826| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 829| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 929| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1018| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1032| »   »   »   »   let·action·=·determineAction(ev.x,·ev.y);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'action' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
|1041| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1110| »   »   »   switch·(ev.hotkey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1545| »   switch·(action)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 236| »   var·target·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'target' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 250| »   var·actionInfo·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'actionInfo' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 264| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 267| »   »   »   var·r·=·g_UnitActions[action].hotkeyActionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 272| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 275| »   »   »   var·r·=·g_UnitActions[action].actionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 482| »   »   &&·(ev.button·==·SDL_BUTTON_LEFT·||·ev.button·==·SDL_BUTTON_RIGHT))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/gui/session/input.js
| 512| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 515| »   »   »   »   var·ents·=·getPreferredEntities(Engine.PickPlayerEntitiesInRect(rect[0],·rect[1],·rect[2],·rect[3],·g_ViewedPlayer));
|    | [NORMAL] JSHintBear:
|    | 'ents' is already defined.

binaries/data/mods/public/gui/session/input.js
| 672| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 712| »   »   »   let·maxDragDelta·=·16;
|    | [MAJOR] JSHintBear:
|    | 'maxDragDelta' has already been declared.

binaries/data/mods/public/gui/session/input.js
| 743| »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 873| »   »   »   »   »   »   var·sptr·=·ev.hotkey.split(".");
|    | [NORMAL] JSHintBear:
|    | 'sptr' is already defined.

binaries/data/mods/public/gui/session/input.js
| 889| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/gui/session/input.js
| 915| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'default'.

binaries/data/mods/public/gui/session/input.js
| 939| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353| 353| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354| 354| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355|    |-		{
|    | 355|+		
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 358| 358| 				needToMove = false;
| 359|    |-		}
|    | 359|+		
| 360| 360| 
| 361| 361| 		if (needToMove)
| 362| 362| 			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
| 350| 350| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 351| 351| 		var needToMove = true;
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 353|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 354|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355| 355| 		{
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			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
| 511| 511| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 512| 512| 				}
| 513| 513| 				else
| 514|    |-				{
|    | 514|+				
| 515| 515| 					// We couldn't move there, or the target moved away
| 516| 516| 					this.FinishOrder();
| 517|    |-				}
|    | 517|+				
| 518| 518| 				return;
| 519| 519| 			}
| 520| 520| 
|    | [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
| 743| 743| 			}
| 744| 744| 			// Check if we are already in range, otherwise walk there
| 745| 745| 			if (!this.CheckGarrisonRange(msg.data.target))
| 746|    |-			{
|    | 746|+			
| 747| 747| 				if (!this.CheckTargetVisible(msg.data.target))
| 748| 748| 				{
| 749| 749| 					this.FinishOrder();
| 754| 754| 					this.SetNextState("GARRISON.APPROACHING");
| 755| 755| 					return;
| 756| 756| 				}
| 757|    |-			}
|    | 757|+			
| 758| 758| 
| 759| 759| 			this.SetNextState("GARRISON.GARRISONING");
| 760| 760| 		},
|    | [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
| 749| 749| 					this.FinishOrder();
| 750| 750| 					return;
| 751| 751| 				}
| 752|    |-				else
| 753|    |-				{
|    | 752|+				
| 754| 753| 					this.SetNextState("GARRISON.APPROACHING");
| 755| 754| 					return;
| 756|    |-				}
|    | 755|+				
| 757| 756| 			}
| 758| 757| 
| 759| 758| 			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
| 772| 772| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 773| 773| 					}
| 774| 774| 					else
| 775|    |-					{
|    | 775|+					
| 776| 776| 						// We couldn't move there, or the target moved away
| 777| 777| 						this.FinishOrder();
| 778|    |-					}
|    | 778|+					
| 779| 779| 					return;
| 780| 780| 				}
| 781| 781| 
|    | [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
|1005|1005| 			},
|1006|1006| 		},
|1007|1007| 
|1008|    |-		"GARRISON":{
|    |1008|+		"GARRISON": {
|1009|1009| 			"enter": function() {
|1010|1010| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1011|1011| 				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
|1232|1232| 			// If the controller handled an order but some members rejected it,
|1233|1233| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1234|1234| 			if (this.orderQueue.length)
|1235|    |-			{
|    |1235|+			
|1236|1236| 				// We're leaving the formation, so stop our FormationWalk order
|1237|1237| 				if (this.FinishOrder())
|1238|1238| 					return;
|1239|    |-			}
|    |1239|+			
|1240|1240| 
|1241|1241| 			// No orders left, we're an individual now
|1242|1242| 			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
|1260|1260| 			// Move a tile outside the building
|1261|1261| 			let range = 4;
|1262|1262| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1263|    |-			{
|    |1263|+			
|1264|1264| 				// We are already at the target, or can't move at all
|1265|1265| 				this.FinishOrder();
|1266|    |-			}
|    |1266|+			
|1267|1267| 			else
|1268|1268| 			{
|1269|1269| 				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
|1481|1481| 
|1482|1482| 			"LosRangeUpdate": function(msg) {
|1483|1483| 				if (this.GetStance().targetVisibleEnemies)
|1484|    |-				{
|    |1484|+				
|1485|1485| 					// Start attacking one of the newly-seen enemy (if any)
|1486|1486| 					this.AttackEntitiesByPreference(msg.data.added);
|1487|    |-				}
|    |1487|+				
|1488|1488| 			},
|1489|1489| 
|1490|1490| 			"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
|1514|1514| 				this.SelectAnimation("move");
|1515|1515| 			},
|1516|1516| 
|1517|    |-			"leave": function () {
|    |1517|+			"leave": function() {
|1518|1518| 				this.SelectAnimation("idle");
|1519|1519| 				this.StopMoving();
|1520|1520| 			},
|    | [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
|1694|1694| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1695|1695| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1696|1696| 						if (cmpHealth && cmpHealth.IsInjured())
|1697|    |-						{
|    |1697|+						
|1698|1698| 							if (this.CanHeal(this.isGuardOf))
|1699|1699| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1700|1700| 							else if (this.CanRepair(this.isGuardOf))
|1701|1701| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1702|    |-						}
|    |1702|+						
|1703|1703| 					}
|1704|1704| 				},
|1705|1705| 
|    | [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
|1910|1910| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1911|1911| 
|1912|1912| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1913|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1913|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1914|1914| 
|1915|1915| 					this.FaceTowardsTarget(this.order.data.target);
|1916|1916| 
|    | [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
|2052|2052| 
|2053|2053| 				"Attacked": function(msg) {
|2054|2054| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2055|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2056|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2055|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2056|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2057|2057| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2058|2058| 				},
|2059|2059| 			},
|    | [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
|2072|2072| 					this.SelectAnimation("move");
|2073|2073| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2074|2074| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2075|    |-					{
|    |2075|+					
|2076|2076| 						// Run after a fleeing target
|2077|2077| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2078|    |-					}
|    |2078|+					
|2079|2079| 					this.StartTimer(1000, 1000);
|2080|2080| 				},
|2081|2081| 
|    | [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
|2254|2254| 
|2255|2255| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2256|2256| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2257|    |-					{
|    |2257|+					
|2258|2258| 						// Check we can still reach and gather from the target
|2259|2259| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2260|2260| 						{
|2305|2305| 								return;
|2306|2306| 							}
|2307|2307| 						}
|2308|    |-					}
|    |2308|+					
|2309|2309| 
|2310|2310| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2311|2311| 
|    | [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
|2297|2297| 								return;
|2298|2298| 						}
|2299|2299| 						else
|2300|    |-						{
|    |2300|+						
|2301|2301| 							// Try to follow the target
|2302|2302| 							if (this.MoveToTargetRange(this.gatheringTarget, IID_ResourceGatherer))
|2303|2303| 							{
|2304|2304| 								this.SetNextState("APPROACHING");
|2305|2305| 								return;
|2306|2306| 							}
|2307|    |-						}
|    |2307|+						
|2308|2308| 					}
|2309|2309| 
|2310|2310| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|    | [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
|2331|2331| 					// Also don't switch to a different type of huntable animal
|2332|2332| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2333|2333| 						return (
|2334|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2335|    |-							|| (type.specific == resourceType.specific
|    |2334|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2335|+							(type.specific == resourceType.specific
|2336|2336| 							&& (type.specific != "meat" || resourceTemplate == template))
|2337|2337| 						);
|2338|2338| 					});
|    | [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
|2332|2332| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2333|2333| 						return (
|2334|2334| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2335|    |-							|| (type.specific == resourceType.specific
|2336|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2335|+							|| (type.specific == resourceType.specific &&
|    |2336|+							(type.specific != "meat" || resourceTemplate == template))
|2337|2337| 						);
|2338|2338| 					});
|2339|2339| 					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
|2397|2397| 
|2398|2398| 				"Timer": function(msg) {
|2399|2399| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2400|    |-					{
|    |2400|+					
|2401|2401| 						// Return to our original position unless we have a better order.
|2402|2402| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2403|2403| 							this.WalkToHeldPosition();
|2404|    |-					}
|    |2404|+					
|2405|2405| 				},
|2406|2406| 
|2407|2407| 				"MovementUpdate": 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
|2431|2431| 					this.StartTimer(prepare, this.healTimers.repeat);
|2432|2432| 
|2433|2433| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2434|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2434|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2435|2435| 
|2436|2436| 					this.FaceTowardsTarget(this.order.data.target);
|2437|2437| 				},
|    | [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
|2644|2644| 					{
|2645|2645| 						// The building was already finished/fully repaired before we arrived;
|2646|2646| 						// let the ConstructionFinished handler handle this.
|2647|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2647|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2648|2648| 						return true;
|2649|2649| 					}
|2650|2650| 
|    | [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
|2644|2644| 					{
|2645|2645| 						// The building was already finished/fully repaired before we arrived;
|2646|2646| 						// let the ConstructionFinished handler handle this.
|2647|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2647|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2648|2648| 						return true;
|2649|2649| 					}
|2650|2650| 
|    | [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
|2771|2771| 
|2772|2772| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2773|2773| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2774|    |-				{
|    |2774|+				
|2775|2775| 					// We're already walking to the given point, so add this as a order.
|2776|2776| 					this.WalkToTarget(msg.data.newentity, true);
|2777|    |-				}
|    |2777|+				
|2778|2778| 			},
|2779|2779| 		},
|2780|2780| 
|    | [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
|2834|2834| 
|2835|2835| 					// Check that we can garrison here
|2836|2836| 					if (this.CanGarrison(target))
|2837|    |-					{
|    |2837|+					
|2838|2838| 						// Check that we're in range of the garrison target
|2839|2839| 						if (this.CheckGarrisonRange(target))
|2840|2840| 						{
|2910|2910| 								return false;
|2911|2911| 							}
|2912|2912| 						}
|2913|    |-					}
|    |2913|+					
|2914|2914| 					// Garrisoning failed for some reason, so finish the order
|2915|2915| 					this.FinishOrder();
|2916|2916| 					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
|3032|3032| 		"Attacked": function(msg) {
|3033|3033| 			if (this.template.NaturalBehaviour == "skittish" ||
|3034|3034| 			    this.template.NaturalBehaviour == "passive")
|3035|    |-			{
|    |3035|+			
|3036|3036| 				this.Flee(msg.data.attacker, false);
|3037|    |-			}
|    |3037|+			
|3038|3038| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3039|3039| 			{
|3040|3040| 				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
|3041|3041| 					this.Attack(msg.data.attacker, false);
|3042|3042| 			}
|3043|3043| 			else if (this.template.NaturalBehaviour == "domestic")
|3044|    |-			{
|    |3044|+			
|3045|3045| 				// Never flee, stop what we were doing
|3046|3046| 				this.SetNextState("IDLE");
|3047|    |-			}
|    |3047|+			
|3048|3048| 		},
|3049|3049| 
|3050|3050| 		"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
|3055|3055| 				this.FinishOrder();
|3056|3056| 				return;
|3057|3057| 			}
|3058|    |-			else
|3059|    |-			{
|    |3058|+			
|3060|3059| 				this.order.data.min = range;
|3061|3060| 				this.SetNextState("WALKING");
|3062|    |-			}
|    |3061|+			
|3063|3062| 		},
|3064|3063| 
|3065|3064| 		"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
|3099|3099| 				}
|3100|3100| 				// Start attacking one of the newly-seen enemy (if any)
|3101|3101| 				else if (this.IsDangerousAnimal())
|3102|    |-				{
|    |3102|+				
|3103|3103| 					this.AttackVisibleEntity(msg.data.added);
|3104|    |-				}
|    |3104|+				
|3105|3105| 
|3106|3106| 				// TODO: if two units enter our range together, we'll attack the
|3107|3107| 				// 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
|3142|3142| 				}
|3143|3143| 				// Start attacking one of the newly-seen enemy (if any)
|3144|3144| 				else if (this.template.NaturalBehaviour == "violent")
|3145|    |-				{
|    |3145|+				
|3146|3146| 					this.AttackVisibleEntity(msg.data.added);
|3147|    |-				}
|    |3147|+				
|3148|3148| 			},
|3149|3149| 
|3150|3150| 			"Timer": function(msg) {
|    | [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
|3157|3157| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3158|3158| 
|3159|3159| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3160|    |-							// only used for domestic animals
|    |3160|+		// only used for domestic animals
|3161|3161| 	},
|3162|3162| };
|3163|3163| 
|    | [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
|3214|3214| 
|3215|3215| UnitAI.prototype.IsAnimal = function()
|3216|3216| {
|3217|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3217|+	return (!!this.template.NaturalBehaviour);
|3218|3218| };
|3219|3219| 
|3220|3220| 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
|3252|3252| UnitAI.prototype.GetGarrisonHolder = function()
|3253|3253| {
|3254|3254| 	if (this.IsGarrisoned())
|3255|    |-	{
|    |3255|+	
|3256|3256| 		for (let order of this.orderQueue)
|3257|3257| 			if (order.type == "Garrison")
|3258|3258| 				return order.data.target;
|3259|    |-	}
|    |3259|+	
|3260|3260| 	return INVALID_ENTITY;
|3261|3261| };
|3262|3262| 
|    | [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
|3330|3330| 		{
|3331|3331| 			let index = this.GetCurrentState().indexOf(".");
|3332|3332| 			if (index != -1)
|3333|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3333|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3334|3334| 			this.Stop(false);
|3335|3335| 		}
|3336|3336| 
|    | [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
|3386|3386| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3387|3387| 			continue;
|3388|3388| 		if (i == 0)
|3389|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3389|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3390|3390| 		else
|3391|3391| 			this.orderQueue.splice(i, 1);
|3392|3392| 		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
|3386|3386| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3387|3387| 			continue;
|3388|3388| 		if (i == 0)
|3389|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3389|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3390|3390| 		else
|3391|3391| 			this.orderQueue.splice(i, 1);
|3392|3392| 		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
|3470|3470| };
|3471|3471| 
|3472|3472| 
|3473|    |-//// FSM linkage functions ////
|    |3473|+// // FSM linkage functions ////
|3474|3474| 
|3475|3475| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3476|3476| 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
|3642|3642| 				continue;
|3643|3643| 			if (this.orderQueue[i].type == type)
|3644|3644| 				continue;
|3645|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3645|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3646|3646| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3647|3647| 			return;
|3648|3648| 		}
|    | [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
|3642|3642| 				continue;
|3643|3643| 			if (this.orderQueue[i].type == type)
|3644|3644| 				continue;
|3645|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3645|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3646|3646| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3647|3647| 			return;
|3648|3648| 		}
|    | [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
|3656|3656| {
|3657|3657| 	// Remember the previous work orders to be able to go back to them later if required
|3658|3658| 	if (data && data.force)
|3659|    |-	{
|    |3659|+	
|3660|3660| 		if (this.IsFormationController())
|3661|3661| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3662|3662| 		else
|3663|3663| 			this.UpdateWorkOrders(type);
|3664|    |-	}
|    |3664|+	
|3665|3665| 
|3666|3666| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3667|3667| 
|    | [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
|3733|3733| 	{
|3734|3734| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3735|3735| 		if (cmpUnitAI)
|3736|    |-		{
|    |3736|+		
|3737|3737| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3738|3738| 			{
|3739|3739| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3742|3742| 					return;
|3743|3743| 				}
|3744|3744| 			}
|3745|    |-		}
|    |3745|+		
|3746|3746| 	}
|3747|3747| 
|3748|3748| 	// 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
|3735|3735| 		if (cmpUnitAI)
|3736|3736| 		{
|3737|3737| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3738|    |-			{
|    |3738|+			
|3739|3739| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3740|3740| 				{
|3741|3741| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3742|3742| 					return;
|3743|3743| 				}
|3744|    |-			}
|    |3744|+			
|3745|3745| 		}
|3746|3746| 	}
|3747|3747| 
|    | [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
|3747|3747| 
|3748|3748| 	// If nothing found, take the unit orders
|3749|3749| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3750|    |-	{
|    |3750|+	
|3751|3751| 		if (isWorkType(this.orderQueue[i].type))
|3752|3752| 		{
|3753|3753| 			this.workOrders = this.orderQueue.slice(i);
|3754|3754| 			return;
|3755|3755| 		}
|3756|    |-	}
|    |3756|+	
|3757|3757| };
|3758|3758| 
|3759|3759| 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
|3813|3813| 	if (data.timerRepeat === undefined)
|3814|3814| 		this.timer = undefined;
|3815|3815| 
|3816|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3816|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3817|3817| };
|3818|3818| 
|3819|3819| /**
|    | [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
|3813|3813| 	if (data.timerRepeat === undefined)
|3814|3814| 		this.timer = undefined;
|3815|3815| 
|3816|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3816|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3817|3817| };
|3818|3818| 
|3819|3819| /**
|    | [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
|3848|3848| 	this.timer = undefined;
|3849|3849| };
|3850|3850| 
|3851|    |-//// Message handlers /////
|    |3851|+// // Message handlers /////
|3852|3852| 
|3853|3853| UnitAI.prototype.OnMotionChanged = function(msg)
|3854|3854| {
|    | [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
|3860|3860| 	// TODO: This is a bit inefficient since every unit listens to every
|3861|3861| 	// construction message - ideally we could scope it to only the one we're building
|3862|3862| 
|3863|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3863|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3864|3864| };
|3865|3865| 
|3866|3866| 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
|3860|3860| 	// TODO: This is a bit inefficient since every unit listens to every
|3861|3861| 	// construction message - ideally we could scope it to only the one we're building
|3862|3862| 
|3863|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3863|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3864|3864| };
|3865|3865| 
|3866|3866| 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
|3885|3885| 
|3886|3886| UnitAI.prototype.OnAttacked = function(msg)
|3887|3887| {
|3888|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3888|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3889|3889| };
|3890|3890| 
|3891|3891| 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
|3885|3885| 
|3886|3886| UnitAI.prototype.OnAttacked = function(msg)
|3887|3887| {
|3888|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3888|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3889|3889| };
|3890|3890| 
|3891|3891| 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
|3890|3890| 
|3891|3891| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3892|3892| {
|3893|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3893|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3894|3894| };
|3895|3895| 
|3896|3896| 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
|3890|3890| 
|3891|3891| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3892|3892| {
|3893|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3893|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3894|3894| };
|3895|3895| 
|3896|3896| 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
|3895|3895| 
|3896|3896| UnitAI.prototype.OnHealthChanged = function(msg)
|3897|3897| {
|3898|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3898|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3899|3899| };
|3900|3900| 
|3901|3901| 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
|3895|3895| 
|3896|3896| UnitAI.prototype.OnHealthChanged = function(msg)
|3897|3897| {
|3898|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3898|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3899|3899| };
|3900|3900| 
|3901|3901| 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
|3901|3901| UnitAI.prototype.OnRangeUpdate = function(msg)
|3902|3902| {
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3904|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|3906| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|    | [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
|3901|3901| UnitAI.prototype.OnRangeUpdate = function(msg)
|3902|3902| {
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3904|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|3906| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|    | [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
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|3904| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3906|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|3908|3908| 
|3909|3909| 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
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|3904| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3906|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3907|3907| };
|3908|3908| 
|3909|3909| 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
|3908|3908| 
|3909|3909| UnitAI.prototype.OnPackFinished = function(msg)
|3910|3910| {
|3911|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3911|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3912|3912| };
|3913|3913| 
|3914|3914| //// 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
|3908|3908| 
|3909|3909| UnitAI.prototype.OnPackFinished = function(msg)
|3910|3910| {
|3911|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3911|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3912|3912| };
|3913|3913| 
|3914|3914| //// 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
|3911|3911| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3912|3912| };
|3913|3913| 
|3914|    |-//// Helper functions to be called by the FSM ////
|    |3914|+// // Helper functions to be called by the FSM ////
|3915|3915| 
|3916|3916| UnitAI.prototype.GetWalkSpeed = function()
|3917|3917| {
|    | [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
|4013|4013| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4014|4014| 		return undefined;
|4015|4015| 
|4016|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4016|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4017|4017| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4018|4018| 		return undefined;
|4019|4019| 
|    | [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
|4098|4098| 			PlaySound(name, member);
|4099|4099| 	}
|4100|4100| 	else
|4101|    |-	{
|    |4101|+	
|4102|4102| 		// Otherwise use our own sounds
|4103|4103| 		PlaySound(name, this.entity);
|4104|    |-	}
|    |4104|+	
|4105|4105| };
|4106|4106| 
|4107|4107| /*
|    | [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
|4443|4443| 	if (this.IsFormationMember())
|4444|4444| 	{
|4445|4445| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4446|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4447|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4446|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4447|+			cmpFormationUnitAI.order.data.target == target)
|4448|4448| 			return true;
|4449|4449| 	}
|4450|4450| 
|    | [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| 	if (this.IsFormationMember())
|4504|4504| 	{
|4505|4505| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4506|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4507|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4506|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4507|+			cmpFormationUnitAI.order.data.target == target)
|4508|4508| 			return true;
|4509|4509| 	}
|4510|4510| 
|    | [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
|4649|4649| UnitAI.prototype.AttackEntityInZone = function(ents)
|4650|4650| {
|4651|4651| 	var target = ents.find(target =>
|4652|    |-		this.CanAttack(target)
|4653|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4652|+		this.CanAttack(target) &&
|    |4653|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4654|4654| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4655|4655| 	);
|4656|4656| 	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
|4650|4650| {
|4651|4651| 	var target = ents.find(target =>
|4652|4652| 		this.CanAttack(target)
|4653|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4654|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4653|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4654|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4655|4655| 	);
|4656|4656| 	if (!target)
|4657|4657| 		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
|4714|4714| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4715|4715| 	if (this.isGuardOf)
|4716|4716| 	{
|4717|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4717|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4718|4718| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4719|4719| 		if (cmpUnitAI && cmpAttack &&
|4720|4720| 		    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
|4718|4718| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4719|4719| 		if (cmpUnitAI && cmpAttack &&
|4720|4720| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4721|    |-				return false;
|    |4721|+			return false;
|4722|4722| 	}
|4723|4723| 
|4724|4724| 	// 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
|4723|4723| 
|4724|4724| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4725|4725| 	if (this.GetStance().respondHoldGround)
|4726|    |-	{
|    |4726|+	
|4727|4727| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4728|4728| 			return true;
|4729|    |-	}
|    |4729|+	
|4730|4730| 
|4731|4731| 	// Stop if it's left our vision range, unless we're especially persistent
|4732|4732| 	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
|4730|4730| 
|4731|4731| 	// Stop if it's left our vision range, unless we're especially persistent
|4732|4732| 	if (!this.GetStance().respondChaseBeyondVision)
|4733|    |-	{
|    |4733|+	
|4734|4734| 		if (!this.CheckTargetIsInVisionRange(target))
|4735|4735| 			return true;
|4736|    |-	}
|    |4736|+	
|4737|4737| 
|4738|4738| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4739|4739| 	// 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
|4757|4757| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4758|4758| 	if (this.isGuardOf)
|4759|4759| 	{
|4760|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4760|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4761|4761| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4762|4762| 		if (cmpUnitAI && cmpAttack &&
|4763|4763| 		    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
|4770|4770| 	return false;
|4771|4771| };
|4772|4772| 
|4773|    |-//// External interface functions ////
|    |4773|+// // External interface functions ////
|4774|4774| 
|4775|4775| UnitAI.prototype.SetFormationController = function(ent)
|4776|4776| {
|    | [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
|4780|4780| 	// of our own formation (or ourself if not in formation)
|4781|4781| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4782|4782| 	if (cmpObstruction)
|4783|    |-	{
|    |4783|+	
|4784|4784| 		if (ent == INVALID_ENTITY)
|4785|4785| 			cmpObstruction.SetControlGroup(this.entity);
|4786|4786| 		else
|4787|4787| 			cmpObstruction.SetControlGroup(ent);
|4788|    |-	}
|    |4788|+	
|4789|4789| 
|4790|4790| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4791|4791| 	if (ent == INVALID_ENTITY)
|    | [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
|4834|4834| 		return undefined;
|4835|4835| 
|4836|4836| 	return twoD ? cmpTargetPosition.GetPosition2D() : cmpTargetPosition.GetPosition();
|4837|    |-}
|    |4837|+};
|4838|4838| 
|4839|4839| UnitAI.prototype.GetTargetPositions = function()
|4840|4840| {
|    | [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
|4945|4945| 	// if we already had an old guard order, do nothing if the target is the same
|4946|4946| 	// and the order is running, otherwise remove the previous order
|4947|4947| 	if (this.isGuardOf)
|4948|    |-	{
|    |4948|+	
|4949|4949| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4950|4950| 			return;
|4951|4951| 		else
|4952|4952| 			this.RemoveGuard();
|4953|    |-	}
|    |4953|+	
|4954|4954| 
|4955|4955| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4956|4956| };
|    | [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
|4948|4948| 	{
|4949|4949| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4950|4950| 			return;
|4951|    |-		else
|4952|    |-			this.RemoveGuard();
|    |4951|+		this.RemoveGuard();
|4953|4952| 	}
|4954|4953| 
|4955|4954| 	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
|5119|5119| 			this.WalkToTarget(target, queued);
|5120|5120| 		return;
|5121|5121| 	}
|5122|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5122|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5123|5123| };
|5124|5124| 
|5125|5125| /**
|    | [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
|5280|5280| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5281|5281| 	{
|5282|5282| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5283|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5283|+		if (cmpTrader.HasBothMarkets() &&
|5284|5284| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5285|5285| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5286|5286| 		{
|    | [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
|5561|5561| 				{
|5562|5562| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5563|5563| 					var targetClasses = this.order.data.targetClasses;
|5564|    |-					if (targetClasses.attack && cmpIdentity
|5565|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5564|+					if (targetClasses.attack && cmpIdentity &&
|    |5565|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5566|5566| 						continue;
|5567|5567| 					if (targetClasses.avoid && cmpIdentity
|5568|5568| 						&& 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
|5564|5564| 					if (targetClasses.attack && cmpIdentity
|5565|5565| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5566|5566| 						continue;
|5567|    |-					if (targetClasses.avoid && cmpIdentity
|5568|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5567|+					if (targetClasses.avoid && cmpIdentity &&
|    |5568|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5569|5569| 						continue;
|5570|5570| 					// Only used by the AIs to prevent some choices of targets
|5571|5571| 					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
|5587|5587| 		{
|5588|5588| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5589|5589| 			var targetClasses = this.order.data.targetClasses;
|5590|    |-			if (cmpIdentity && targetClasses.attack
|5591|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5590|+			if (cmpIdentity && targetClasses.attack &&
|    |5591|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5592|5592| 				continue;
|5593|5593| 			if (cmpIdentity && targetClasses.avoid
|5594|5594| 				&& 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
|5590|5590| 			if (cmpIdentity && targetClasses.attack
|5591|5591| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5592|5592| 				continue;
|5593|    |-			if (cmpIdentity && targetClasses.avoid
|5594|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5593|+			if (cmpIdentity && targetClasses.avoid &&
|    |5594|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5595|5595| 				continue;
|5596|5596| 			// Only used by the AIs to prevent some choices of targets
|5597|5597| 			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
|5733|5733| 
|5734|5734| UnitAI.prototype.SetHeldPosition = function(x, z)
|5735|5735| {
|5736|    |-	this.heldPosition = {"x": x, "z": z};
|    |5736|+	this.heldPosition = { "x": x, "z": z};
|5737|5737| };
|5738|5738| 
|5739|5739| 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
|5733|5733| 
|5734|5734| UnitAI.prototype.SetHeldPosition = function(x, z)
|5735|5735| {
|5736|    |-	this.heldPosition = {"x": x, "z": z};
|    |5736|+	this.heldPosition = {"x": x, "z": z };
|5737|5737| };
|5738|5738| 
|5739|5739| 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
|5760|5760| 	return false;
|5761|5761| };
|5762|5762| 
|5763|    |-//// Helper functions ////
|    |5763|+// // Helper functions ////
|5764|5764| 
|5765|5765| UnitAI.prototype.CanAttack = function(target)
|5766|5766| {
|    | [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
|5964|5964| 	return cmpPack && cmpPack.IsPacking();
|5965|5965| };
|5966|5966| 
|5967|    |-//// Formation specific functions ////
|    |5967|+// // Formation specific functions ////
|5968|5968| 
|5969|5969| UnitAI.prototype.IsAttackingAsFormation = function()
|5970|5970| {
|    | [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
|5969|5969| UnitAI.prototype.IsAttackingAsFormation = function()
|5970|5970| {
|5971|5971| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5972|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5973|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5972|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5973|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5974|5974| };
|5975|5975| 
|5976|5976| //// 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
|5973|5973| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5974|5974| };
|5975|5975| 
|5976|    |-//// Animal specific functions ////
|    |5976|+// // Animal specific functions ////
|5977|5977| 
|5978|5978| UnitAI.prototype.MoveRandomly = function(distance)
|5979|5979| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
| 898| »   »   »   "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
| 967| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1030| »   »   »   »   "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
|1065| »   »   »   "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
|1097| »   »   »   »   "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
|1119| »   »   »   »   »   attackGround·?·this.CallMemberFunction("AttackGround",·[target,·false])·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1141| »   »   »   »   »   »   »   attackGround·?·this.PushOrderFront("AttackGround",·{·"target":·target,·"force":·false·})·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1170| »   »   »   »   »   »   »   attackGround·?·this.PushOrderFront("AttackGround",·{·"target":·target,·"force":·false·})·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1325| »   »   »   "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
|1508| »   »   »   "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
|1529| »   »   »   "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
|1559| »   »   »   "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
|1714| »   »   »   "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
|1802| »   »   »   »   "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
|1879| »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2062| »   »   »   »   "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
|2152| »   »   »   »   "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
|2321| »   »   »   »   »   »   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
|2376| »   »   »   »   "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
|2494| »   »   »   »   "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
|2559| »   »   »   »   "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
|2599| »   »   »   »   "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
|2803| »   »   »   »   "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
|2987| »   »   »   »   "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
|3718| »   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
|4636| »   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
|4651| »   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
|4697| »   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
|4720| »   »   ····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
|5211| »   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
| 354| »   »   ····&&·(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
|1120| »   »   »   »   »   »   this.CallMemberFunction("Attack",·[target,·this.order.data.allowCapture,·false]);
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1142| »   »   »   »   »   »   »   »   this.PushOrderFront("Attack",·{·"target":·target,·"force":·false,·"allowCapture":·allowCapture·});
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1171| »   »   »   »   »   »   »   »   this.PushOrderFront("Attack",·{·"target":·target,·"force":·false,·"allowCapture":·allowCapture·});
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4447| »   »   »   &&·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| »   »   »   &&·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
|4653| »   »   &&·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
|4654| »   »   &&·(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
|4837| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5973| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.
Executing section cli...

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

Looking much better like that, I think.

I'll try and give this a proper test on Monday/Tuesday, thanks for the work :)

binaries/data/mods/public/simulation/components/Attack.js
401

find does filter()[0] for you.

binaries/data/mods/public/simulation/components/UnitAI.js
4833

In general I'd rather have GetTargetPosition2D and GetTargetPosition3D with some code duplication for performance (as I doubt implementing 2D in terms of 3D will be optimised)

Freagarach updated this revision to Diff 8575.Sat, Jun 22, 11:45 AM
Freagarach marked 2 inline comments as done.
Freagarach edited the summary of this revision. (Show Details)
  • Split "GetTargetPositon"-function in 2D and 3D.
  • "filter(...)[0]" to "find()" for the time being.

I have a question: I can't seem to catch the scrolling of the mouse during input. In the "training_panel.xml" in "gui/session/selection_panels_right" it is done using <action on="MouseWheelUp">, what is the equivalent in "input.js" in "gui/session"?
In "input.js" there is a ev-parameter but when checking that out it returns ({type:"(unknown)"}) when scrolling.
Any ideas on how to tackle this?

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 394| 394| function getRepairTimeTooltip(entState)
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397|    |-			"label": headerFont(translate("Number of repairers:")),
|    | 397|+		"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398|    |-			"details": entState.repairable.numBuilders
|    | 398|+		"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399|    |-		}) + "\n" + (entState.repairable.numBuilders ?
|    | 399|+	}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
| 402| 402| 			"Add another worker to speed up the repairs by %(second)s seconds.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 416| 416| function getBuildTimeTooltip(entState)
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419|    |-			"label": headerFont(translate("Number of builders:")),
|    | 419|+		"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420|    |-			"details": entState.foundation.numBuilders
|    | 420|+		"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421|    |-		}) + "\n" + (entState.foundation.numBuilders ?
|    | 421|+	}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
| 424| 424| 			"Add another worker to speed up the construction by %(second)s seconds.",
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 271| 271| 		return "AttackGround" in this.template[attackType];
| 272| 272| 
| 273| 273| 	return this.GetAttackTypes().some(type => "AttackGround" in this.template[type]);
| 274|    |-}
|    | 274|+};
| 275| 275| 
| 276| 276| Attack.prototype.GetPreferredClasses = function(type)
| 277| 277| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 546| 546| 
| 547| 547| 		let horizSpeed = +this.template[type].Projectile.Speed;
| 548| 548| 		let gravity = +this.template[type].Projectile.Gravity;
| 549|    |-		//horizSpeed /= 2; gravity /= 2; // slow it down for testing
|    | 549|+		// horizSpeed /= 2; gravity /= 2; // slow it down for testing
| 550| 550| 
| 551| 551| 		let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 552| 552| 		if (!cmpPosition || !cmpPosition.IsInWorld())
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 604| 604| 		// TODO: Use unit rotation to implement x/z offsets.
| 605| 605| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 606| 606| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 607|    |-		
|    | 607|+
| 608| 608| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 609| 609| 		if (cmpVisual)
| 610| 610| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Attack.js
| 676| 676| 			});
| 677| 677| 	}
| 678| 678| 	else
| 679|    |-	{
|    | 679|+	
| 680| 680| 		// Melee attack - hurt the target immediately
| 681| 681| 		cmpDamage.CauseDamage({
| 682| 682| 			"strengths": this.GetAttackStrengths(type),
| 686| 686| 			"type": type,
| 687| 687| 			"attackerOwner": attackerOwner
| 688| 688| 		});
| 689|    |-	}
|    | 689|+	
| 690| 690| };
| 691| 691| 
| 692| 692| /**

binaries/data/mods/public/simulation/components/Attack.js
| 536| ·»   let·cmpDamage·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_Damage);
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

binaries/data/mods/public/simulation/components/Attack.js
| 651| »   »   cmpTimer.SetTimeout(SYSTEM_ENTITY,·IID_Damage,·"MissileHit",·timeToTarget·*·1000·+·+this.template[type].Delay,·data);
|    | [NORMAL] JSHintBear:
|    | Confusing plusses.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 416| 416| 
| 417| 417| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For units, take the range in front of it, no spread. So angle = 0
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423| 423| 			{
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421| 421| 			}
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426|    |-			}
|    | 426|+			
| 427| 427| 			else
| 428| 428| 			{
| 429| 429| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426| 426| 			}
| 427| 427| 			else
| 428|    |-			{
|    | 428|+			
| 429| 429| 				// not in world, set a default?
| 430| 430| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 431|    |-			}
|    | 431|+			
| 432| 432| 		}
| 433| 433| 
| 434| 434| 		ret.attack.attackGround = cmpAttack.CanAttackGround();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 798| 798| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 799| 799| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 800| 800| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 801|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 801|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 802| 802| 	}
| 803| 803| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 804| 804| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1317|1317| 		}
|1318|1318| 	}
|1319|1319| 	else
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1322|1322| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1323|1323| 		// wall piece.
|1338|1338| 			"pos": start.pos,
|1339|1339| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1340|1340| 		});
|1341|    |-	}
|    |1341|+	
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|1344| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1341|1341| 	}
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|    |-	{
|    |1344|+	
|1345|1345| 		// Analogous to the starting side case above
|1346|1346| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1347|1347| 		{
|1379|1379| 				"pos": end.pos,
|1380|1380| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1381|1381| 			});
|1382|    |-	}
|    |1382|+	
|1383|1383| 
|1384|1384| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1385|1385| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1557|1557| 
|1558|1558| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1559|1559| 		if (cmpVisual)
|1560|    |-		{
|    |1560|+		
|1561|1561| 			if (!allPiecesValid || !canAfford)
|1562|1562| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1563|1563| 			else
|1564|1564| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1565|    |-		}
|    |1565|+		
|1566|1566| 
|1567|1567| 		++entPool.numUsed;
|1568|1568| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1631|1631| 			{
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|    |-						"x": pos.x,
|    |1634|+					"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|    |-						"z": pos.z,
|    |1635|+					"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|    |-						"angle": cmpPosition.GetRotation().y,
|    |1636|+					"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|    |-						"ent": ent
|    |1637|+					"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|1640|1640| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1780|1780| 	}
|1781|1781| 	else if (data.target === secondMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = {
|1784|1784| 			"type": "is second",
|1785|1785| 			"gain": cmpEntityTrader.GetGoods().amount,
|1786|1786| 		};
|1787|    |-	}
|    |1787|+	
|1788|1788| 	else if (!firstMarket)
|1789|1789| 	{
|1790|1790| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1786|1786| 		};
|1787|1787| 	}
|1788|1788| 	else if (!firstMarket)
|1789|    |-	{
|    |1789|+	
|1790|1790| 		result = { "type": "set first" };
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else if (!secondMarket)
|1793|1793| 	{
|1794|1794| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		result = { "type": "set first" };
|1791|1791| 	}
|1792|1792| 	else if (!secondMarket)
|1793|    |-	{
|    |1793|+	
|1794|1794| 		result = {
|1795|1795| 			"type": "set second",
|1796|1796| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1797|1797| 		};
|1798|    |-	}
|    |1798|+	
|1799|1799| 	else
|1800|1800| 	{
|1801|1801| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1797|1797| 		};
|1798|1798| 	}
|1799|1799| 	else
|1800|    |-	{
|    |1800|+	
|1801|1801| 		// Else both markets are not null and target is different from them
|1802|1802| 		result = { "type": "set first" };
|1803|    |-	}
|    |1803|+	
|1804|1804| 	return result;
|1805|1805| };
|1806|1806| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 182| 182| 		}
| 183| 183| 	}
| 184| 184| 	else if (placementSupport.mode === "wall")
| 185|    |-	{
|    | 185|+	
| 186| 186| 		if (placementSupport.wallSet && placementSupport.position)
| 187| 187| 		{
| 188| 188| 			// Fetch an updated list of snapping candidate entities
| 200| 200| 				"snapEntities": placementSupport.wallSnapEntities,	// snapping entities (towers) for starting a wall segment
| 201| 201| 			});
| 202| 202| 		}
| 203|    |-	}
|    | 203|+	
| 204| 204| 
| 205| 205| 	return false;
| 206| 206| }
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 289| 289| 	}
| 290| 290| 
| 291| 291| 	if (!updateBuildingPlacementPreview())
| 292|    |-	{
|    | 292|+	
| 293| 293| 		// invalid location - don't build it
| 294| 294| 		// TODO: play a sound?
| 295| 295| 		return false;
| 296|    |-	}
|    | 296|+	
| 297| 297| 
| 298| 298| 	var selection = g_Selection.toList();
| 299| 299| 
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 328| 328| 	}
| 329| 329| 
| 330| 330| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 331|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 331|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 332| 332| 	{
| 333| 333| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 334| 334| 		return false;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 355| 355| 	// (this is somewhat non-ideal and hardcode-ish)
| 356| 356| 	var hasWallSegment = false;
| 357| 357| 	for (let piece of cmd.pieces)
| 358|    |-	{
|    | 358|+	
| 359| 359| 		if (piece.template != cmd.wallSet.templates.tower) // TODO: hardcode-ish :(
| 360| 360| 		{
| 361| 361| 			hasWallSegment = true;
| 362| 362| 			break;
| 363| 363| 		}
| 364|    |-	}
|    | 364|+	
| 365| 365| 
| 366| 366| 	if (hasWallSegment)
| 367| 367| 	{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 478| 478| 	mouseIsOverObject = (hoveredObject != null);
| 479| 479| 
| 480| 480| 	// Close the menu when interacting with the game world
| 481|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 482|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 481|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 482|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 483| 483| 		closeMenu();
| 484| 484| 
| 485| 485| 	// State-machine processing:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 519| 519| 
| 520| 520| 				// Update the list of selected units
| 521| 521| 				if (Engine.HotkeyIsPressed("selection.add"))
| 522|    |-				{
|    | 522|+				
| 523| 523| 					g_Selection.addList(ents);
| 524|    |-				}
|    | 524|+				
| 525| 525| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 526| 526| 				{
| 527| 527| 					g_Selection.removeList(ents);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 523| 523| 					g_Selection.addList(ents);
| 524| 524| 				}
| 525| 525| 				else if (Engine.HotkeyIsPressed("selection.remove"))
| 526|    |-				{
|    | 526|+				
| 527| 527| 					g_Selection.removeList(ents);
| 528|    |-				}
|    | 528|+				
| 529| 529| 				else
| 530| 530| 				{
| 531| 531| 					g_Selection.reset();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 579| 579| 				// If shift is down, let the player continue placing another of the same building
| 580| 580| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 581| 581| 				if (tryPlaceBuilding(queued))
| 582|    |-				{
|    | 582|+				
| 583| 583| 					if (queued)
| 584| 584| 						inputState = INPUT_BUILDING_PLACEMENT;
| 585| 585| 					else
| 586| 586| 						inputState = INPUT_NORMAL;
| 587|    |-				}
|    | 587|+				
| 588| 588| 				else
| 589| 589| 				{
| 590| 590| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 586| 586| 						inputState = INPUT_NORMAL;
| 587| 587| 				}
| 588| 588| 				else
| 589|    |-				{
|    | 589|+				
| 590| 590| 					inputState = INPUT_BUILDING_PLACEMENT;
| 591|    |-				}
|    | 591|+				
| 592| 592| 				return true;
| 593| 593| 			}
| 594| 594| 			break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 639| 639| 		// user to continue building walls.
| 640| 640| 		switch (ev.type)
| 641| 641| 		{
| 642|    |-			case "mousemotion":
|    | 642|+		case "mousemotion":
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 640| 640| 		switch (ev.type)
| 641| 641| 		{
| 642| 642| 			case "mousemotion":
| 643|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 643|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 642| 642| 			case "mousemotion":
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 645|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 643| 643| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646|    |-				// the ending point and the starting point to snap to.
|    | 646|+			// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 644| 644| 
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647|    |-				//
|    | 647|+			//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 645| 645| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 648|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 646| 646| 				// the ending point and the starting point to snap to.
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 649|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 647| 647| 				//
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 650|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 648| 648| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 651|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 649| 649| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 652|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 650| 650| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 651| 651| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653|    |-				// points.
|    | 653|+			// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 653| 653| 				// points.
| 654| 654| 
| 655|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 655|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 653| 653| 				// points.
| 654| 654| 
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 656|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658|    |-				if (result && result.cost)
|    | 658|+			if (result && result.cost)
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659|    |-				{
|    | 659|+			{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 657| 657| 
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
| 660|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 660|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				if (result && result.cost)
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661|    |-					placementSupport.tooltipMessage = [
|    | 661|+				placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				{
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662|    |-						getEntityCostTooltip(result),
|    | 662|+					getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 660| 660| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663|    |-						getNeededResourcesTooltip(neededResources)
|    | 663|+					getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 661| 661| 					placementSupport.tooltipMessage = [
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664|    |-					].filter(tip => tip).join("\n");
|    | 664|+				].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
| 667| 667| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 662| 662| 						getEntityCostTooltip(result),
| 663| 663| 						getNeededResourcesTooltip(neededResources)
| 664| 664| 					].filter(tip => tip).join("\n");
| 665|    |-				}
|    | 665|+			}
| 666| 666| 
| 667| 667| 				break;
| 668| 668| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 664| 664| 					].filter(tip => tip).join("\n");
| 665| 665| 				}
| 666| 666| 
| 667|    |-				break;
|    | 667|+			break;
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				break;
| 668| 668| 
| 669|    |-			case "mousebuttondown":
|    | 669|+		case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				break;
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 670|+			if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 668| 668| 
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671|    |-				{
|    | 671|+			{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 669| 669| 			case "mousebuttondown":
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 672|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 670| 670| 				if (ev.button == SDL_BUTTON_LEFT)
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673|    |-					if (tryPlaceWall(queued))
|    | 673|+				if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676| 676| 						{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674|    |-					{
|    | 674|+					
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688|    |-					}
|    | 688|+					
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 671| 671| 				{
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674|    |-					{
|    | 674|+				{
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 672| 672| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675|    |-						if (queued)
|    | 675|+					if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					if (tryPlaceWall(queued))
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676|    |-						{
|    | 676|+					{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 674| 674| 					{
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677|    |-							// continue building, just set a new starting position where we left off
|    | 677|+						// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 675| 675| 						if (queued)
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 678|+						placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 676| 676| 						{
| 677| 677| 							// continue building, just set a new starting position where we left off
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679|    |-							placementSupport.wallEndPosition = undefined;
|    | 679|+						placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 678| 678| 							placementSupport.position = placementSupport.wallEndPosition;
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 681|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683| 683| 						else
| 684| 684| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 679| 679| 							placementSupport.wallEndPosition = undefined;
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682|    |-						}
|    | 682|+					}
| 683| 683| 						else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 680| 680| 
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683|    |-						else
|    | 683|+					else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 681| 681| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 682| 682| 						}
| 683| 683| 						else
| 684|    |-						{
|    | 684|+					{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 682| 682| 						}
| 683| 683| 						else
| 684| 684| 						{
| 685|    |-							placementSupport.Reset();
|    | 685|+						placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 683| 683| 						else
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686|    |-							inputState = INPUT_NORMAL;
|    | 686|+						inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
| 689| 689| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						{
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687|    |-						}
|    | 687|+					}
| 688| 688| 					}
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 685| 685| 							placementSupport.Reset();
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688|    |-					}
|    | 688|+				}
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 686| 686| 							inputState = INPUT_NORMAL;
| 687| 687| 						}
| 688| 688| 					}
| 689|    |-					else
|    | 689|+				else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 687| 687| 						}
| 688| 688| 					}
| 689| 689| 					else
| 690|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 690|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 689| 689| 					else
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692|    |-					updateBuildingPlacementPreview();
|    | 692|+				updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 690| 690| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693|    |-					return true;
|    | 693|+				return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 691| 691| 
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694|    |-				}
|    | 694|+			}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 692| 692| 					updateBuildingPlacementPreview();
| 693| 693| 					return true;
| 694| 694| 				}
| 695|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 695|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 693| 693| 					return true;
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696|    |-				{
|    | 696|+			{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 694| 694| 				}
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697|    |-					// reset to normal input mode
|    | 697|+				// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 695| 695| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698|    |-					placementSupport.Reset();
|    | 698|+				placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 696| 696| 				{
| 697| 697| 					// reset to normal input mode
| 698| 698| 					placementSupport.Reset();
| 699|    |-					updateBuildingPlacementPreview();
|    | 699|+				updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					placementSupport.Reset();
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701|    |-					inputState = INPUT_NORMAL;
|    | 701|+				inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 699| 699| 					updateBuildingPlacementPreview();
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				break;
| 705| 705| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				break;
| 705| 705| 		}
| 706| 706| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					inputState = INPUT_NORMAL;
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				break;
|    | 704|+			break;
| 705| 705| 		}
| 706| 706| 		break;
| 707| 707| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 711| 711| 		case "mousemotion":
| 712| 712| 			let maxDragDelta = 16;
| 713| 713| 			if (g_DragStart.distanceTo(ev) >= maxDragDelta)
| 714|    |-			{
|    | 714|+			
| 715| 715| 				// Rotate in the direction of the mouse
| 716| 716| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 717|    |-			}
|    | 717|+			
| 718| 718| 			else
| 719| 719| 			{
| 720| 720| 				// If the mouse is near the center, snap back to the default orientation
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 716| 716| 				placementSupport.angle = placementSupport.position.horizAngleTo(Engine.GetTerrainAtScreenPoint(ev.x, ev.y));
| 717| 717| 			}
| 718| 718| 			else
| 719|    |-			{
|    | 719|+			
| 720| 720| 				// If the mouse is near the center, snap back to the default orientation
| 721| 721| 				placementSupport.SetDefaultAngle();
| 722|    |-			}
|    | 722|+			
| 723| 723| 
| 724| 724| 			var snapData = Engine.GuiInterfaceCall("GetFoundationSnapData", {
| 725| 725| 				"template": placementSupport.template,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 742| 742| 				// If shift is down, let the player continue placing another of the same building
| 743| 743| 				var queued = Engine.HotkeyIsPressed("session.queue");
| 744| 744| 				if (tryPlaceBuilding(queued))
| 745|    |-				{
|    | 745|+				
| 746| 746| 					if (queued)
| 747| 747| 						inputState = INPUT_BUILDING_PLACEMENT;
| 748| 748| 					else
| 749| 749| 						inputState = INPUT_NORMAL;
| 750|    |-				}
|    | 750|+				
| 751| 751| 				else
| 752| 752| 				{
| 753| 753| 					inputState = INPUT_BUILDING_PLACEMENT;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 749| 749| 						inputState = INPUT_NORMAL;
| 750| 750| 				}
| 751| 751| 				else
| 752|    |-				{
|    | 752|+				
| 753| 753| 					inputState = INPUT_BUILDING_PLACEMENT;
| 754|    |-				}
|    | 754|+				
| 755| 755| 				return true;
| 756| 756| 			}
| 757| 757| 			break;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 798| 798| 
| 799| 799| 	// Handle the time-warp testing features, restricted to single-player
| 800| 800| 	if (!g_IsNetworked && g_DeveloperOverlay.isTimeWarpEnabled())
| 801|    |-	{
|    | 801|+	
| 802| 802| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 803| 803| 			Engine.SetSimRate(20.0);
| 804| 804| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 805| 805| 			Engine.SetSimRate(1.0);
| 806| 806| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 807| 807| 			Engine.RewindTimeWarp();
| 808|    |-	}
|    | 808|+	
| 809| 809| 
| 810| 810| 	if (ev.hotkey == "session.highlightguarding")
| 811| 811| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 857| 857| 			break;
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 860|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861|    |-				{
|    | 861|+			{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862|    |-					let now = Date.now();
|    | 862|+				let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 863|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 865|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866|    |-						{
|    | 866|+					{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867|    |-							var sptr = ev.hotkey.split(".");
|    | 867|+						var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868|    |-							performGroup("snap", sptr[3]);
|    | 868|+						performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869|    |-						}
|    | 869|+					}
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870|    |-					}
|    | 870|+				}
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871|    |-					else
|    | 871|+				else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
| 872|    |-					{
|    | 872|+				{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
| 873|    |-						var sptr = ev.hotkey.split(".");
|    | 873|+					var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874|    |-						performGroup(sptr[2], sptr[3]);
|    | 874|+					performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876|    |-						doublePressTimer = now;
|    | 876|+					doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877|    |-						prevHotkey = ev.hotkey;
|    | 877|+					prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880| 880| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878|    |-					}
|    | 878|+				}
| 879| 879| 				}
| 880| 880| 				break;
| 881| 881| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879|    |-				}
|    | 879|+			}
| 880| 880| 				break;
| 881| 881| 		}
| 882| 882| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880|    |-				break;
|    | 880|+			break;
| 881| 881| 		}
| 882| 882| 		break;
| 883| 883| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1045|1045| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1046|1046| 
|1047|1047| 			if (placementSupport.mode === "wall")
|1048|    |-			{
|    |1048|+			
|1049|1049| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1050|1050| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1051|1051| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1052|1052| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1053|    |-			}
|    |1053|+			
|1054|1054| 			else
|1055|1055| 			{
|1056|1056| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1317|1317| 	if (templateData.attack &&
|1318|1318| 		templateData.attack.Ranged &&
|1319|1319| 		templateData.attack.Ranged.maxRange)
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// add attack information to display a good tooltip
|1322|1322| 		placementSupport.attack = templateData.attack;
|1323|    |-	}
|    |1323|+	
|1324|1324| }
|1325|1325| 
|1326|1326| // Batch training:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1405|1405| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1406|1406| 	{
|1407|1407| 		if (inputState == INPUT_BATCHTRAINING)
|1408|    |-		{
|    |1408|+		
|1409|1409| 			// Check if we are training in the same building(s) as the last batch
|1410|1410| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1411|1411| 			// If the order changed, we have a new selection and we should create a new batch.
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|1440| 				// fall through to create the new batch
|1441|    |-		}
|    |1441|+		
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|1444|1444| 		if (decrement || Engine.GuiInterfaceCall("GetNeededResources", { "cost":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1437|1437| 			// Otherwise start a new one
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|    |-				// fall through to create the new batch
|    |1440|+			// fall through to create the new batch
|1441|1441| 		}
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1515|1515| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1516|1516| 	{
|1517|1517| 		// Train as many full batches as we can
|1518|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1518|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1519|1519| 		Engine.PostNetworkCommand({
|1520|1520| 			"type": "train",
|1521|1521| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1594|1594| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1595|1595| 
|1596|1596| 	// Reset the last idle unit, etc., if the selection type has changed.
|1597|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1597|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1598|1598| 		resetIdleUnit();
|1599|1599| 	lastIdleClasses = classes;
|1600|1600| 

binaries/data/mods/public/gui/session/input.js
| 229| »   »   var·entState·=·GetEntityState(ent);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'entState' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
| 236| »   var·target·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'target' to undefined.

binaries/data/mods/public/gui/session/input.js
| 250| »   var·actionInfo·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'actionInfo' to undefined.

binaries/data/mods/public/gui/session/input.js
| 467| »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 494| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 498| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 553| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 563| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 611| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 640| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 709| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 826| »   switch·(inputState)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 829| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 929| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1018| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1032| »   »   »   »   let·action·=·determineAction(ev.x,·ev.y);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'action' is already declared in the upper scope.

binaries/data/mods/public/gui/session/input.js
|1041| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1110| »   »   »   switch·(ev.hotkey)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
|1545| »   switch·(action)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

binaries/data/mods/public/gui/session/input.js
| 236| »   var·target·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'target' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 250| »   var·actionInfo·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'actionInfo' to 'undefined'.

binaries/data/mods/public/gui/session/input.js
| 264| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 267| »   »   »   var·r·=·g_UnitActions[action].hotkeyActionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 272| »   for·(var·action·of·actions)
|    | [NORMAL] JSHintBear:
|    | 'action' is already defined.

binaries/data/mods/public/gui/session/input.js
| 275| »   »   »   var·r·=·g_UnitActions[action].actionCheck(target,·selection);
|    | [NORMAL] JSHintBear:
|    | 'r' is already defined.

binaries/data/mods/public/gui/session/input.js
| 482| »   »   &&·(ev.button·==·SDL_BUTTON_LEFT·||·ev.button·==·SDL_BUTTON_RIGHT))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/gui/session/input.js
| 512| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 515| »   »   »   »   var·ents·=·getPreferredEntities(Engine.PickPlayerEntitiesInRect(rect[0],·rect[1],·rect[2],·rect[3],·g_ViewedPlayer));
|    | [NORMAL] JSHintBear:
|    | 'ents' is already defined.

binaries/data/mods/public/gui/session/input.js
| 672| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 712| »   »   »   let·maxDragDelta·=·16;
|    | [MAJOR] JSHintBear:
|    | 'maxDragDelta' has already been declared.

binaries/data/mods/public/gui/session/input.js
| 743| »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

binaries/data/mods/public/gui/session/input.js
| 873| »   »   »   »   »   »   var·sptr·=·ev.hotkey.split(".");
|    | [NORMAL] JSHintBear:
|    | 'sptr' is already defined.

binaries/data/mods/public/gui/session/input.js
| 889| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/gui/session/input.js
| 915| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'default'.

binaries/data/mods/public/gui/session/input.js
| 939| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  23|  23| 	let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|    |-			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|    |  26|+		(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|    |-			0,
|    |  27|+		0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|    |-			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|    |  28|+		(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|  31|  31| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 114| 114| 
| 115| 115| 	// Do this first in case the direct hit kills the target
| 116| 116| 	if (data.isSplash)
| 117|    |-	{
|    | 117|+	
| 118| 118| 		this.CauseSplashDamage({
| 119| 119| 			"attacker": data.attacker,
| 120| 120| 			"origin": Vector2D.from3D(data.position),
| 127| 127| 			"type": data.type,
| 128| 128| 			"attackerOwner": data.attackerOwner
| 129| 129| 		});
| 130|    |-	}
|    | 130|+	
| 131| 131| 
| 132| 132| 	let cmpProjectileManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ProjectileManager);
| 133| 133| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 225| 225| 				damageMultiplier = 0;
| 226| 226| 		}
| 227| 227| 		else // In case someone calls this function with an invalid shape.
| 228|    |-		{
|    | 228|+		
| 229| 229| 			warn("The " + data.shape + " splash damage shape is not implemented!");
| 230|    |-		}
|    | 230|+		
| 231| 231| 
| 232| 232| 		if (data.splashBonus)
| 233| 233| 			damageMultiplier *= GetDamageBonus(data.attacker, ent, data.type, data.splashBonus);

binaries/data/mods/public/gui/session/unit_actions.js
| 590| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|    |  26|+	let result = { "min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|  27|  27| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  28|  28| 	if (!cmpFormation)
|  29|  29| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0};
|    |  26|+	let result = {"min": 0, "max": this.canAttackAsFormation ? -1 : 0, "elevationBonus": this.canAttackAsFormation ? -1 : 0 };
|  27|  27| 	let cmpFormation = Engine.QueryInterface(this.entity, IID_Formation);
|  28|  28| 	if (!cmpFormation)
|  29|  29| 	{
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 205| 205| 	"attack-ground": function(player, cmd, data)
| 206| 206| 	{
| 207| 207| 		let entities = [];
| 208|    |-		let target = new Vector3D(cmd.target.x, cmd.target.y, cmd.target.z)
|    | 208|+		let target = new Vector3D(cmd.target.x, cmd.target.y, cmd.target.z);
| 209| 209| 		for (let ent of data.entities)
| 210| 210| 		{
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 209| 209| 		for (let ent of data.entities)
| 210| 210| 		{
| 211| 211| 			let cmpAttack = Engine.QueryInterface(ent, IID_Attack);
| 212|    |-			if (cmpAttack && cmpAttack.CanAttackGround()){
|    | 212|+			if (cmpAttack && cmpAttack.CanAttackGround())
| 213| 213| 				entities.push(ent);
| 214|    |-			}
|    | 214|+			
| 215| 215| 		}
| 216| 216| 		GetFormationUnitAIs(entities, player).forEach(cmpUnitAI => {
| 217| 217| 			cmpUnitAI.AttackGround(target, cmd.queued);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 346| 346| 			{
| 347| 347| 				var list = queue.GetEntitiesList();
| 348| 348| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 349|    |-				{
|    | 349|+				
| 350| 350| 					for (var promoted of cmd.promoted)
| 351| 351| 					{
| 352| 352| 						if (list.indexOf(promoted) === -1)
| 354| 354| 						cmd.template = promoted;
| 355| 355| 						break;
| 356| 356| 					}
| 357|    |-				}
|    | 357|+				
| 358| 358| 			}
| 359| 359| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 360| 360| 				if ("metadata" in cmd)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 553| 553| 			if (cmpGarrisonHolder)
| 554| 554| 			{
| 555| 555| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 556|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 557|    |-				    && player != +cmd.owner)
|    | 556|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 557|+				    player != +cmd.owner)
| 558| 558| 						continue;
| 559| 559| 
| 560| 560| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 555| 555| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 556| 556| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 557| 557| 				    && player != +cmd.owner)
| 558|    |-						continue;
|    | 558|+					continue;
| 559| 559| 
| 560| 560| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 561| 561| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 965| 965| 		{
| 966| 966| 			var count = 0;
| 967| 967| 			for (let j = 0; j < length - 1; ++j)
| 968|    |-			{
|    | 968|+			
| 969| 969| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 970| 970| 					++count;
| 971| 971| 				else
| 972| 972| 					break;
| 973|    |-			}
|    | 973|+			
| 974| 974| 			consec[i] = count;
| 975| 975| 		}
| 976| 976| 		var start = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 976| 976| 		var start = 0;
| 977| 977| 		var count = 0;
| 978| 978| 		for (var c in consec)
| 979|    |-		{
|    | 979|+		
| 980| 980| 			if (consec[c] > count)
| 981| 981| 			{
| 982| 982| 				start = c;
| 983| 983| 				count = consec[c];
| 984| 984| 			}
| 985|    |-		}
|    | 985|+		
| 986| 986| 
| 987| 987| 		// If we've found a shoreline, stop searching
| 988| 988| 		if (count != numPoints-1)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1159|1159| 
|1160|1160| 	// send Metadata info if any
|1161|1161| 	if (cmd.metadata)
|1162|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1162|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1163|1163| 
|1164|1164| 	// Tell the units to start building this new entity
|1165|1165| 	if (cmd.autorepair)
|1166|    |-	{
|    |1166|+	
|1167|1167| 		ProcessCommand(player, {
|1168|1168| 			"type": "repair",
|1169|1169| 			"entities": entities,
|1171|1171| 			"autocontinue": cmd.autocontinue,
|1172|1172| 			"queued": cmd.queued
|1173|1173| 		});
|1174|    |-	}
|    |1174|+	
|1175|1175| 
|1176|1176| 	return ent;
|1177|1177| }
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1267|1267| 		}
|1268|1268| 
|1269|1269| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1270|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1270|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1271|1271| 	}
|1272|1272| 
|1273|1273| 	var i = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1284|1284| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1285|1285| 		// start position snapping (implying that the first entity we build must be a tower)
|1286|1286| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1287|    |-		{
|    |1287|+		
|1288|1288| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1289|1289| 			{
|1290|1290|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1291|1291|     			break;
|1292|1292| 			}
|1293|    |-		}
|    |1293|+		
|1294|1294| 
|1295|1295| 		var constructPieceCmd = {
|1296|1296| 			"type": "construct",
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1331|1331| 
|1332|1332| 				if (i > 0)
|1333|1333| 				{
|1334|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1334|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1335|1335| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1336|1336| 					// TODO: ensure that cmpPreviousObstruction exists
|1337|1337| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1389|1389| 		}
|1390|1390| 
|1391|1391| 		if (piece.template == cmd.wallSet.templates.tower)
|1392|    |-		{
|    |1392|+		
|1393|1393| 			// encountered a tower entity, update the last tower control group
|1394|1394| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1395|    |-		}
|    |1395|+		
|1396|1396| 		else
|1397|1397| 		{
|1398|1398| 			// Encountered a non-tower entity, update its secondary control group to 'lastTowerControlGroup'.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1403|1403| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1404|1404| 			{
|1405|1405| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1406|    |-				{
|    |1406|+				
|1407|1407| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1408|    |-				}
|    |1408|+				
|1409|1409| 			}
|1410|1410| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1411|1411| 			{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1478|1478| 	}
|1479|1479| 
|1480|1480| 	if (formedEnts.length == 0)
|1481|    |-	{
|    |1481|+	
|1482|1482| 		// No units support the formation - return all the others
|1483|1483| 		return nonformedUnitAIs;
|1484|    |-	}
|    |1484|+	
|1485|1485| 
|1486|1486| 	// Find what formations the formationable selected entities are currently in
|1487|1487| 	var formation = ExtractFormations(formedEnts);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1494|1494| 		// Check that all its members are selected
|1495|1495| 		var fid = formationIds[0];
|1496|1496| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1497|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1498|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1497|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1498|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1499|1499| 		{
|1500|1500| 			cmpFormation.DeleteTwinFormations();
|1501|1501| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1526|1526| 					{
|1527|1527| 						var template = cmpUnitAI.GetFormationTemplate();
|1528|1528| 						if (lastFormationTemplate === undefined)
|1529|    |-						{
|    |1529|+						
|1530|1530| 							lastFormationTemplate = template;
|1531|    |-						}
|    |1531|+						
|1532|1532| 						else if (lastFormationTemplate != template)
|1533|1533| 						{
|1534|1534| 							lastFormationTemplate = undefined;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1602|1602| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1603|1603| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1604|1604| 				if (matrix[i][j] < distSq)
|1605|    |-					closeClusters = [i,j];
|    |1605|+					closeClusters = [i, j];
|1606|1606| 
|1607|1607| 		// if no more close clusters found, just return all found clusters so far
|1608|1608| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1624|1624| 		}
|1625|1625| 		// remove the rows and columns in the matrix for the merged clusters,
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|    |-		clusters.splice(closeClusters[0],1);
|    |1627|+		clusters.splice(closeClusters[0], 1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		// remove the rows and columns in the matrix for the merged clusters,
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|    |-		clusters.splice(closeClusters[1],1);
|    |1628|+		clusters.splice(closeClusters[1], 1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1626|1626| 		// and the clusters themselves from the cluster list
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|    |-		matrix.splice(closeClusters[0],1);
|    |1629|+		matrix.splice(closeClusters[0], 1);
|1630|1630| 		matrix.splice(closeClusters[1],1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1627|1627| 		clusters.splice(closeClusters[0],1);
|1628|1628| 		clusters.splice(closeClusters[1],1);
|1629|1629| 		matrix.splice(closeClusters[0],1);
|1630|    |-		matrix.splice(closeClusters[1],1);
|    |1630|+		matrix.splice(closeClusters[1], 1);
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1631|1631| 		for (let i = 0; i < matrix.length; ++i)
|1632|1632| 		{
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|1634|    |-				matrix[i].splice(closeClusters[0],1);
|    |1634|+				matrix[i].splice(closeClusters[0], 1);
|1635|1635| 			if (matrix[i].length > closeClusters[1])
|1636|1636| 				matrix[i].splice(closeClusters[1],1);
|1637|1637| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1633|1633| 			if (matrix[i].length > closeClusters[0])
|1634|1634| 				matrix[i].splice(closeClusters[0],1);
|1635|1635| 			if (matrix[i].length > closeClusters[1])
|1636|    |-				matrix[i].splice(closeClusters[1],1);
|    |1636|+				matrix[i].splice(closeClusters[1], 1);
|1637|1637| 		}
|1638|1638| 		// add a new row of distances to the matrix and the new cluster
|1639|1639| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
|  43| »   if·(g_Commands[cmd.type])
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|  47| »   »   g_Commands[cmd.type](player,·cmd,·data);
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 212| »   »   »   if·(cmpAttack·&&·cmpAttack.CanAttackGround()){
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/helpers/Commands.js
| 805| »   »   let·ent·=·pickRandom(cmpRangeManager.GetEntitiesByPlayer(cmd.player).filter(ent·=>·{
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'ent' is already declared in the upper scope.

binaries/data/mods/public/simulation/helpers/Commands.js
|1290| ····»   »   »   error("[TryConstructWall]·Expected·last·tower·control·group·to·be·available,·none·found·(1st·pass,·iteration·"·+·i·+·")");
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1291| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|  53| var·g_Commands·=·{
|    | [NORMAL] JSHintBear:
|    | 'g_Commands' was used before it was defined.

binaries/data/mods/public/simulation/helpers/Commands.js
| 208| »   »   let·target·=·new·Vector3D(cmd.target.x,·cmd.target.y,·cmd.target.z)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/simulation/helpers/Commands.js
| 557| »   »   »   »   ····&&·player·!=·+cmd.owner)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/helpers/Commands.js
| 745| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
| 977| »   »   var·count·=·0;
|    | [NORMAL] JSHintBear:
|    | 'count' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1124| »   »   var·cmpGuiInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGuiInterface' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1376| »   »   var·piece·=·pieces[j];
|    | [NORMAL] JSHintBear:
|    | 'piece' is already defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1498| »   »   »   &&·cmpFormation.GetMemberCount()·==·formation.entities.length)
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1557| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353| 353| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354| 354| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355|    |-		{
|    | 355|+		
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 358| 358| 				needToMove = false;
| 359|    |-		}
|    | 359|+		
| 360| 360| 
| 361| 361| 		if (needToMove)
| 362| 362| 			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
| 350| 350| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 351| 351| 		var needToMove = true;
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 353|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 354|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355| 355| 		{
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			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
| 511| 511| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 512| 512| 				}
| 513| 513| 				else
| 514|    |-				{
|    | 514|+				
| 515| 515| 					// We couldn't move there, or the target moved away
| 516| 516| 					this.FinishOrder();
| 517|    |-				}
|    | 517|+				
| 518| 518| 				return;
| 519| 519| 			}
| 520| 520| 
|    | [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
| 743| 743| 			}
| 744| 744| 			// Check if we are already in range, otherwise walk there
| 745| 745| 			if (!this.CheckGarrisonRange(msg.data.target))
| 746|    |-			{
|    | 746|+			
| 747| 747| 				if (!this.CheckTargetVisible(msg.data.target))
| 748| 748| 				{
| 749| 749| 					this.FinishOrder();
| 754| 754| 					this.SetNextState("GARRISON.APPROACHING");
| 755| 755| 					return;
| 756| 756| 				}
| 757|    |-			}
|    | 757|+			
| 758| 758| 
| 759| 759| 			this.SetNextState("GARRISON.GARRISONING");
| 760| 760| 		},
|    | [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
| 749| 749| 					this.FinishOrder();
| 750| 750| 					return;
| 751| 751| 				}
| 752|    |-				else
| 753|    |-				{
|    | 752|+				
| 754| 753| 					this.SetNextState("GARRISON.APPROACHING");
| 755| 754| 					return;
| 756|    |-				}
|    | 755|+				
| 757| 756| 			}
| 758| 757| 
| 759| 758| 			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
| 772| 772| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 773| 773| 					}
| 774| 774| 					else
| 775|    |-					{
|    | 775|+					
| 776| 776| 						// We couldn't move there, or the target moved away
| 777| 777| 						this.FinishOrder();
| 778|    |-					}
|    | 778|+					
| 779| 779| 					return;
| 780| 780| 				}
| 781| 781| 
|    | [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
|1005|1005| 			},
|1006|1006| 		},
|1007|1007| 
|1008|    |-		"GARRISON":{
|    |1008|+		"GARRISON": {
|1009|1009| 			"enter": function() {
|1010|1010| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1011|1011| 				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
|1232|1232| 			// If the controller handled an order but some members rejected it,
|1233|1233| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1234|1234| 			if (this.orderQueue.length)
|1235|    |-			{
|    |1235|+			
|1236|1236| 				// We're leaving the formation, so stop our FormationWalk order
|1237|1237| 				if (this.FinishOrder())
|1238|1238| 					return;
|1239|    |-			}
|    |1239|+			
|1240|1240| 
|1241|1241| 			// No orders left, we're an individual now
|1242|1242| 			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
|1260|1260| 			// Move a tile outside the building
|1261|1261| 			let range = 4;
|1262|1262| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1263|    |-			{
|    |1263|+			
|1264|1264| 				// We are already at the target, or can't move at all
|1265|1265| 				this.FinishOrder();
|1266|    |-			}
|    |1266|+			
|1267|1267| 			else
|1268|1268| 			{
|1269|1269| 				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
|1481|1481| 
|1482|1482| 			"LosRangeUpdate": function(msg) {
|1483|1483| 				if (this.GetStance().targetVisibleEnemies)
|1484|    |-				{
|    |1484|+				
|1485|1485| 					// Start attacking one of the newly-seen enemy (if any)
|1486|1486| 					this.AttackEntitiesByPreference(msg.data.added);
|1487|    |-				}
|    |1487|+				
|1488|1488| 			},
|1489|1489| 
|1490|1490| 			"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
|1514|1514| 				this.SelectAnimation("move");
|1515|1515| 			},
|1516|1516| 
|1517|    |-			"leave": function () {
|    |1517|+			"leave": function() {
|1518|1518| 				this.SelectAnimation("idle");
|1519|1519| 				this.StopMoving();
|1520|1520| 			},
|    | [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
|1694|1694| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1695|1695| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1696|1696| 						if (cmpHealth && cmpHealth.IsInjured())
|1697|    |-						{
|    |1697|+						
|1698|1698| 							if (this.CanHeal(this.isGuardOf))
|1699|1699| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1700|1700| 							else if (this.CanRepair(this.isGuardOf))
|1701|1701| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1702|    |-						}
|    |1702|+						
|1703|1703| 					}
|1704|1704| 				},
|1705|1705| 
|    | [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
|1910|1910| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1911|1911| 
|1912|1912| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1913|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1913|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1914|1914| 
|1915|1915| 					this.FaceTowardsTarget(this.order.data.target);
|1916|1916| 
|    | [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
|2052|2052| 
|2053|2053| 				"Attacked": function(msg) {
|2054|2054| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2055|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2056|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2055|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2056|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2057|2057| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2058|2058| 				},
|2059|2059| 			},
|    | [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
|2072|2072| 					this.SelectAnimation("move");
|2073|2073| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2074|2074| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2075|    |-					{
|    |2075|+					
|2076|2076| 						// Run after a fleeing target
|2077|2077| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2078|    |-					}
|    |2078|+					
|2079|2079| 					this.StartTimer(1000, 1000);
|2080|2080| 				},
|2081|2081| 
|    | [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
|2254|2254| 
|2255|2255| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2256|2256| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2257|    |-					{
|    |2257|+					
|2258|2258| 						// Check we can still reach and gather from the target
|2259|2259| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2260|2260| 						{
|2305|2305| 								return;
|2306|2306| 							}
|2307|2307| 						}
|2308|    |-					}
|    |2308|+					
|2309|2309| 
|2310|2310| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2311|2311| 
|    | [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
|2297|2297| 								return;
|2298|2298| 						}
|2299|2299| 						else
|2300|    |-						{
|    |2300|+						
|2301|2301| 							// Try to follow the target
|2302|2302| 							if (this.MoveToTargetRange(this.gatheringTarget, IID_ResourceGatherer))
|2303|2303| 							{
|2304|2304| 								this.SetNextState("APPROACHING");
|2305|2305| 								return;
|2306|2306| 							}
|2307|    |-						}
|    |2307|+						
|2308|2308| 					}
|2309|2309| 
|2310|2310| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|    | [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
|2331|2331| 					// Also don't switch to a different type of huntable animal
|2332|2332| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2333|2333| 						return (
|2334|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2335|    |-							|| (type.specific == resourceType.specific
|    |2334|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2335|+							(type.specific == resourceType.specific
|2336|2336| 							&& (type.specific != "meat" || resourceTemplate == template))
|2337|2337| 						);
|2338|2338| 					});
|    | [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
|2332|2332| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2333|2333| 						return (
|2334|2334| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2335|    |-							|| (type.specific == resourceType.specific
|2336|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2335|+							|| (type.specific == resourceType.specific &&
|    |2336|+							(type.specific != "meat" || resourceTemplate == template))
|2337|2337| 						);
|2338|2338| 					});
|2339|2339| 					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
|2397|2397| 
|2398|2398| 				"Timer": function(msg) {
|2399|2399| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2400|    |-					{
|    |2400|+					
|2401|2401| 						// Return to our original position unless we have a better order.
|2402|2402| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2403|2403| 							this.WalkToHeldPosition();
|2404|    |-					}
|    |2404|+					
|2405|2405| 				},
|2406|2406| 
|2407|2407| 				"MovementUpdate": 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
|2431|2431| 					this.StartTimer(prepare, this.healTimers.repeat);
|2432|2432| 
|2433|2433| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2434|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2434|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2435|2435| 
|2436|2436| 					this.FaceTowardsTarget(this.order.data.target);
|2437|2437| 				},
|    | [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
|2644|2644| 					{
|2645|2645| 						// The building was already finished/fully repaired before we arrived;
|2646|2646| 						// let the ConstructionFinished handler handle this.
|2647|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2647|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2648|2648| 						return true;
|2649|2649| 					}
|2650|2650| 
|    | [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
|2644|2644| 					{
|2645|2645| 						// The building was already finished/fully repaired before we arrived;
|2646|2646| 						// let the ConstructionFinished handler handle this.
|2647|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2647|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2648|2648| 						return true;
|2649|2649| 					}
|2650|2650| 
|    | [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
|2771|2771| 
|2772|2772| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2773|2773| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2774|    |-				{
|    |2774|+				
|2775|2775| 					// We're already walking to the given point, so add this as a order.
|2776|2776| 					this.WalkToTarget(msg.data.newentity, true);
|2777|    |-				}
|    |2777|+				
|2778|2778| 			},
|2779|2779| 		},
|2780|2780| 
|    | [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
|2834|2834| 
|2835|2835| 					// Check that we can garrison here
|2836|2836| 					if (this.CanGarrison(target))
|2837|    |-					{
|    |2837|+					
|2838|2838| 						// Check that we're in range of the garrison target
|2839|2839| 						if (this.CheckGarrisonRange(target))
|2840|2840| 						{
|2910|2910| 								return false;
|2911|2911| 							}
|2912|2912| 						}
|2913|    |-					}
|    |2913|+					
|2914|2914| 					// Garrisoning failed for some reason, so finish the order
|2915|2915| 					this.FinishOrder();
|2916|2916| 					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
|3032|3032| 		"Attacked": function(msg) {
|3033|3033| 			if (this.template.NaturalBehaviour == "skittish" ||
|3034|3034| 			    this.template.NaturalBehaviour == "passive")
|3035|    |-			{
|    |3035|+			
|3036|3036| 				this.Flee(msg.data.attacker, false);
|3037|    |-			}
|    |3037|+			
|3038|3038| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3039|3039| 			{
|3040|3040| 				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
|3041|3041| 					this.Attack(msg.data.attacker, false);
|3042|3042| 			}
|3043|3043| 			else if (this.template.NaturalBehaviour == "domestic")
|3044|    |-			{
|    |3044|+			
|3045|3045| 				// Never flee, stop what we were doing
|3046|3046| 				this.SetNextState("IDLE");
|3047|    |-			}
|    |3047|+			
|3048|3048| 		},
|3049|3049| 
|3050|3050| 		"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
|3055|3055| 				this.FinishOrder();
|3056|3056| 				return;
|3057|3057| 			}
|3058|    |-			else
|3059|    |-			{
|    |3058|+			
|3060|3059| 				this.order.data.min = range;
|3061|3060| 				this.SetNextState("WALKING");
|3062|    |-			}
|    |3061|+			
|3063|3062| 		},
|3064|3063| 
|3065|3064| 		"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
|3099|3099| 				}
|3100|3100| 				// Start attacking one of the newly-seen enemy (if any)
|3101|3101| 				else if (this.IsDangerousAnimal())
|3102|    |-				{
|    |3102|+				
|3103|3103| 					this.AttackVisibleEntity(msg.data.added);
|3104|    |-				}
|    |3104|+				
|3105|3105| 
|3106|3106| 				// TODO: if two units enter our range together, we'll attack the
|3107|3107| 				// 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
|3142|3142| 				}
|3143|3143| 				// Start attacking one of the newly-seen enemy (if any)
|3144|3144| 				else if (this.template.NaturalBehaviour == "violent")
|3145|    |-				{
|    |3145|+				
|3146|3146| 					this.AttackVisibleEntity(msg.data.added);
|3147|    |-				}
|    |3147|+				
|3148|3148| 			},
|3149|3149| 
|3150|3150| 			"Timer": function(msg) {
|    | [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
|3157|3157| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3158|3158| 
|3159|3159| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3160|    |-							// only used for domestic animals
|    |3160|+		// only used for domestic animals
|3161|3161| 	},
|3162|3162| };
|3163|3163| 
|    | [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
|3214|3214| 
|3215|3215| UnitAI.prototype.IsAnimal = function()
|3216|3216| {
|3217|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3217|+	return (!!this.template.NaturalBehaviour);
|3218|3218| };
|3219|3219| 
|3220|3220| 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
|3252|3252| UnitAI.prototype.GetGarrisonHolder = function()
|3253|3253| {
|3254|3254| 	if (this.IsGarrisoned())
|3255|    |-	{
|    |3255|+	
|3256|3256| 		for (let order of this.orderQueue)
|3257|3257| 			if (order.type == "Garrison")
|3258|3258| 				return order.data.target;
|3259|    |-	}
|    |3259|+	
|3260|3260| 	return INVALID_ENTITY;
|3261|3261| };
|3262|3262| 
|    | [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
|3330|3330| 		{
|3331|3331| 			let index = this.GetCurrentState().indexOf(".");
|3332|3332| 			if (index != -1)
|3333|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3333|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3334|3334| 			this.Stop(false);
|3335|3335| 		}
|3336|3336| 
|    | [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
|3386|3386| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3387|3387| 			continue;
|3388|3388| 		if (i == 0)
|3389|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3389|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3390|3390| 		else
|3391|3391| 			this.orderQueue.splice(i, 1);
|3392|3392| 		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
|3386|3386| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3387|3387| 			continue;
|3388|3388| 		if (i == 0)
|3389|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3389|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3390|3390| 		else
|3391|3391| 			this.orderQueue.splice(i, 1);
|3392|3392| 		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
|3470|3470| };
|3471|3471| 
|3472|3472| 
|3473|    |-//// FSM linkage functions ////
|    |3473|+// // FSM linkage functions ////
|3474|3474| 
|3475|3475| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3476|3476| 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
|3642|3642| 				continue;
|3643|3643| 			if (this.orderQueue[i].type == type)
|3644|3644| 				continue;
|3645|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3645|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3646|3646| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3647|3647| 			return;
|3648|3648| 		}
|    | [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
|3642|3642| 				continue;
|3643|3643| 			if (this.orderQueue[i].type == type)
|3644|3644| 				continue;
|3645|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3645|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3646|3646| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3647|3647| 			return;
|3648|3648| 		}
|    | [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
|3656|3656| {
|3657|3657| 	// Remember the previous work orders to be able to go back to them later if required
|3658|3658| 	if (data && data.force)
|3659|    |-	{
|    |3659|+	
|3660|3660| 		if (this.IsFormationController())
|3661|3661| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3662|3662| 		else
|3663|3663| 			this.UpdateWorkOrders(type);
|3664|    |-	}
|    |3664|+	
|3665|3665| 
|3666|3666| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3667|3667| 
|    | [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
|3733|3733| 	{
|3734|3734| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3735|3735| 		if (cmpUnitAI)
|3736|    |-		{
|    |3736|+		
|3737|3737| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3738|3738| 			{
|3739|3739| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3742|3742| 					return;
|3743|3743| 				}
|3744|3744| 			}
|3745|    |-		}
|    |3745|+		
|3746|3746| 	}
|3747|3747| 
|3748|3748| 	// 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
|3735|3735| 		if (cmpUnitAI)
|3736|3736| 		{
|3737|3737| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3738|    |-			{
|    |3738|+			
|3739|3739| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3740|3740| 				{
|3741|3741| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3742|3742| 					return;
|3743|3743| 				}
|3744|    |-			}
|    |3744|+			
|3745|3745| 		}
|3746|3746| 	}
|3747|3747| 
|    | [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
|3747|3747| 
|3748|3748| 	// If nothing found, take the unit orders
|3749|3749| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3750|    |-	{
|    |3750|+	
|3751|3751| 		if (isWorkType(this.orderQueue[i].type))
|3752|3752| 		{
|3753|3753| 			this.workOrders = this.orderQueue.slice(i);
|3754|3754| 			return;
|3755|3755| 		}
|3756|    |-	}
|    |3756|+	
|3757|3757| };
|3758|3758| 
|3759|3759| 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
|3813|3813| 	if (data.timerRepeat === undefined)
|3814|3814| 		this.timer = undefined;
|3815|3815| 
|3816|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3816|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3817|3817| };
|3818|3818| 
|3819|3819| /**
|    | [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
|3813|3813| 	if (data.timerRepeat === undefined)
|3814|3814| 		this.timer = undefined;
|3815|3815| 
|3816|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3816|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3817|3817| };
|3818|3818| 
|3819|3819| /**
|    | [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
|3848|3848| 	this.timer = undefined;
|3849|3849| };
|3850|3850| 
|3851|    |-//// Message handlers /////
|    |3851|+// // Message handlers /////
|3852|3852| 
|3853|3853| UnitAI.prototype.OnMotionChanged = function(msg)
|3854|3854| {
|    | [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
|3860|3860| 	// TODO: This is a bit inefficient since every unit listens to every
|3861|3861| 	// construction message - ideally we could scope it to only the one we're building
|3862|3862| 
|3863|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3863|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3864|3864| };
|3865|3865| 
|3866|3866| 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
|3860|3860| 	// TODO: This is a bit inefficient since every unit listens to every
|3861|3861| 	// construction message - ideally we could scope it to only the one we're building
|3862|3862| 
|3863|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3863|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3864|3864| };
|3865|3865| 
|3866|3866| 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
|3885|3885| 
|3886|3886| UnitAI.prototype.OnAttacked = function(msg)
|3887|3887| {
|3888|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3888|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3889|3889| };
|3890|3890| 
|3891|3891| 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
|3885|3885| 
|3886|3886| UnitAI.prototype.OnAttacked = function(msg)
|3887|3887| {
|3888|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3888|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3889|3889| };
|3890|3890| 
|3891|3891| 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
|3890|3890| 
|3891|3891| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3892|3892| {
|3893|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3893|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3894|3894| };
|3895|3895| 
|3896|3896| 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
|3890|3890| 
|3891|3891| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3892|3892| {
|3893|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3893|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3894|3894| };
|3895|3895| 
|3896|3896| 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
|3895|3895| 
|3896|3896| UnitAI.prototype.OnHealthChanged = function(msg)
|3897|3897| {
|3898|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3898|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3899|3899| };
|3900|3900| 
|3901|3901| 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
|3895|3895| 
|3896|3896| UnitAI.prototype.OnHealthChanged = function(msg)
|3897|3897| {
|3898|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3898|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3899|3899| };
|3900|3900| 
|3901|3901| 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
|3901|3901| UnitAI.prototype.OnRangeUpdate = function(msg)
|3902|3902| {
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3904|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|3906| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|    | [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
|3901|3901| UnitAI.prototype.OnRangeUpdate = function(msg)
|3902|3902| {
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3904|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|3906| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|    | [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
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|3904| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3906|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3907|3907| };
|3908|3908| 
|3909|3909| 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
|3903|3903| 	if (msg.tag == this.losRangeQuery)
|3904|3904| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3905|3905| 	else if (msg.tag == this.losHealRangeQuery)
|3906|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3906|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3907|3907| };
|3908|3908| 
|3909|3909| 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
|3908|3908| 
|3909|3909| UnitAI.prototype.OnPackFinished = function(msg)
|3910|3910| {
|3911|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3911|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3912|3912| };
|3913|3913| 
|3914|3914| //// 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
|3908|3908| 
|3909|3909| UnitAI.prototype.OnPackFinished = function(msg)
|3910|3910| {
|3911|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3911|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3912|3912| };
|3913|3913| 
|3914|3914| //// 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
|3911|3911| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3912|3912| };
|3913|3913| 
|3914|    |-//// Helper functions to be called by the FSM ////
|    |3914|+// // Helper functions to be called by the FSM ////
|3915|3915| 
|3916|3916| UnitAI.prototype.GetWalkSpeed = function()
|3917|3917| {
|    | [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
|4013|4013| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4014|4014| 		return undefined;
|4015|4015| 
|4016|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4016|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4017|4017| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4018|4018| 		return undefined;
|4019|4019| 
|    | [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
|4098|4098| 			PlaySound(name, member);
|4099|4099| 	}
|4100|4100| 	else
|4101|    |-	{
|    |4101|+	
|4102|4102| 		// Otherwise use our own sounds
|4103|4103| 		PlaySound(name, this.entity);
|4104|    |-	}
|    |4104|+	
|4105|4105| };
|4106|4106| 
|4107|4107| /*
|    | [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
|4443|4443| 	if (this.IsFormationMember())
|4444|4444| 	{
|4445|4445| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4446|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4447|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4446|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4447|+			cmpFormationUnitAI.order.data.target == target)
|4448|4448| 			return true;
|4449|4449| 	}
|4450|4450| 
|    | [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| 	if (this.IsFormationMember())
|4504|4504| 	{
|4505|4505| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4506|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4507|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4506|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4507|+			cmpFormationUnitAI.order.data.target == target)
|4508|4508| 			return true;
|4509|4509| 	}
|4510|4510| 
|    | [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
|4649|4649| UnitAI.prototype.AttackEntityInZone = function(ents)
|4650|4650| {
|4651|4651| 	var target = ents.find(target =>
|4652|    |-		this.CanAttack(target)
|4653|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4652|+		this.CanAttack(target) &&
|    |4653|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4654|4654| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4655|4655| 	);
|4656|4656| 	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
|4650|4650| {
|4651|4651| 	var target = ents.find(target =>
|4652|4652| 		this.CanAttack(target)
|4653|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4654|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4653|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4654|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4655|4655| 	);
|4656|4656| 	if (!target)
|4657|4657| 		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
|4714|4714| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4715|4715| 	if (this.isGuardOf)
|4716|4716| 	{
|4717|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4717|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4718|4718| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4719|4719| 		if (cmpUnitAI && cmpAttack &&
|4720|4720| 		    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
|4718|4718| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4719|4719| 		if (cmpUnitAI && cmpAttack &&
|4720|4720| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4721|    |-				return false;
|    |4721|+			return false;
|4722|4722| 	}
|4723|4723| 
|4724|4724| 	// 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
|4723|4723| 
|4724|4724| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4725|4725| 	if (this.GetStance().respondHoldGround)
|4726|    |-	{
|    |4726|+	
|4727|4727| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4728|4728| 			return true;
|4729|    |-	}
|    |4729|+	
|4730|4730| 
|4731|4731| 	// Stop if it's left our vision range, unless we're especially persistent
|4732|4732| 	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
|4730|4730| 
|4731|4731| 	// Stop if it's left our vision range, unless we're especially persistent
|4732|4732| 	if (!this.GetStance().respondChaseBeyondVision)
|4733|    |-	{
|    |4733|+	
|4734|4734| 		if (!this.CheckTargetIsInVisionRange(target))
|4735|4735| 			return true;
|4736|    |-	}
|    |4736|+	
|4737|4737| 
|4738|4738| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4739|4739| 	// 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
|4757|4757| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4758|4758| 	if (this.isGuardOf)
|4759|4759| 	{
|4760|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4760|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4761|4761| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4762|4762| 		if (cmpUnitAI && cmpAttack &&
|4763|4763| 		    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
|4770|4770| 	return false;
|4771|4771| };
|4772|4772| 
|4773|    |-//// External interface functions ////
|    |4773|+// // External interface functions ////
|4774|4774| 
|4775|4775| UnitAI.prototype.SetFormationController = function(ent)
|4776|4776| {
|    | [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
|4780|4780| 	// of our own formation (or ourself if not in formation)
|4781|4781| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4782|4782| 	if (cmpObstruction)
|4783|    |-	{
|    |4783|+	
|4784|4784| 		if (ent == INVALID_ENTITY)
|4785|4785| 			cmpObstruction.SetControlGroup(this.entity);
|4786|4786| 		else
|4787|4787| 			cmpObstruction.SetControlGroup(ent);
|4788|    |-	}
|    |4788|+	
|4789|4789| 
|4790|4790| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4791|4791| 	if (ent == INVALID_ENTITY)
|    | [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
|4833|4833| 		return undefined;
|4834|4834| 
|4835|4835| 	return cmpTargetPosition.GetPosition();
|4836|    |-}
|    |4836|+};
|4837|4837| 
|4838|4838| /*
|4839|4839|  * Returns the 2D target position.
|    | [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
|4850|4850| 		return undefined;
|4851|4851| 
|4852|4852| 	return cmpTargetPosition.GetPosition2D();
|4853|    |-}
|    |4853|+};
|4854|4854| 
|4855|4855| UnitAI.prototype.GetTargetPositions = function()
|4856|4856| {
|    | [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
|4961|4961| 	// if we already had an old guard order, do nothing if the target is the same
|4962|4962| 	// and the order is running, otherwise remove the previous order
|4963|4963| 	if (this.isGuardOf)
|4964|    |-	{
|    |4964|+	
|4965|4965| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4966|4966| 			return;
|4967|4967| 		else
|4968|4968| 			this.RemoveGuard();
|4969|    |-	}
|    |4969|+	
|4970|4970| 
|4971|4971| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4972|4972| };
|    | [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
|4964|4964| 	{
|4965|4965| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4966|4966| 			return;
|4967|    |-		else
|4968|    |-			this.RemoveGuard();
|    |4967|+		this.RemoveGuard();
|4969|4968| 	}
|4970|4969| 
|4971|4970| 	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
|5135|5135| 			this.WalkToTarget(target, queued);
|5136|5136| 		return;
|5137|5137| 	}
|5138|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5138|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5139|5139| };
|5140|5140| 
|5141|5141| /**
|    | [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
|5296|5296| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5297|5297| 	{
|5298|5298| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5299|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5299|+		if (cmpTrader.HasBothMarkets() &&
|5300|5300| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5301|5301| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5302|5302| 		{
|    | [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
|5577|5577| 				{
|5578|5578| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5579|5579| 					var targetClasses = this.order.data.targetClasses;
|5580|    |-					if (targetClasses.attack && cmpIdentity
|5581|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5580|+					if (targetClasses.attack && cmpIdentity &&
|    |5581|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5582|5582| 						continue;
|5583|5583| 					if (targetClasses.avoid && cmpIdentity
|5584|5584| 						&& 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
|5580|5580| 					if (targetClasses.attack && cmpIdentity
|5581|5581| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5582|5582| 						continue;
|5583|    |-					if (targetClasses.avoid && cmpIdentity
|5584|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5583|+					if (targetClasses.avoid && cmpIdentity &&
|    |5584|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5585|5585| 						continue;
|5586|5586| 					// Only used by the AIs to prevent some choices of targets
|5587|5587| 					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
|5603|5603| 		{
|5604|5604| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5605|5605| 			var targetClasses = this.order.data.targetClasses;
|5606|    |-			if (cmpIdentity && targetClasses.attack
|5607|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5606|+			if (cmpIdentity && targetClasses.attack &&
|    |5607|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5608|5608| 				continue;
|5609|5609| 			if (cmpIdentity && targetClasses.avoid
|5610|5610| 				&& 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
|5606|5606| 			if (cmpIdentity && targetClasses.attack
|5607|5607| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5608|5608| 				continue;
|5609|    |-			if (cmpIdentity && targetClasses.avoid
|5610|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5609|+			if (cmpIdentity && targetClasses.avoid &&
|    |5610|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5611|5611| 				continue;
|5612|5612| 			// Only used by the AIs to prevent some choices of targets
|5613|5613| 			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
|5749|5749| 
|5750|5750| UnitAI.prototype.SetHeldPosition = function(x, z)
|5751|5751| {
|5752|    |-	this.heldPosition = {"x": x, "z": z};
|    |5752|+	this.heldPosition = { "x": x, "z": z};
|5753|5753| };
|5754|5754| 
|5755|5755| 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
|5749|5749| 
|5750|5750| UnitAI.prototype.SetHeldPosition = function(x, z)
|5751|5751| {
|5752|    |-	this.heldPosition = {"x": x, "z": z};
|    |5752|+	this.heldPosition = {"x": x, "z": z };
|5753|5753| };
|5754|5754| 
|5755|5755| 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
|5776|5776| 	return false;
|5777|5777| };
|5778|5778| 
|5779|    |-//// Helper functions ////
|    |5779|+// // Helper functions ////
|5780|5780| 
|5781|5781| UnitAI.prototype.CanAttack = function(target)
|5782|5782| {
|    | [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
|5980|5980| 	return cmpPack && cmpPack.IsPacking();
|5981|5981| };
|5982|5982| 
|5983|    |-//// Formation specific functions ////
|    |5983|+// // Formation specific functions ////
|5984|5984| 
|5985|5985| UnitAI.prototype.IsAttackingAsFormation = function()
|5986|5986| {
|    | [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
|5985|5985| UnitAI.prototype.IsAttackingAsFormation = function()
|5986|5986| {
|5987|5987| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5988|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5989|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5988|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5989|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5990|5990| };
|5991|5991| 
|5992|5992| //// 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
|5989|5989| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5990|5990| };
|5991|5991| 
|5992|    |-//// Animal specific functions ////
|    |5992|+// // Animal specific functions ////
|5993|5993| 
|5994|5994| UnitAI.prototype.MoveRandomly = function(distance)
|5995|5995| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
| 898| »   »   »   "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
| 967| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1030| »   »   »   »   "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
|1065| »   »   »   "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
|1097| »   »   »   »   "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
|1119| »   »   »   »   »   attackGround·?·this.CallMemberFunction("AttackGround",·[target,·false])·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1141| »   »   »   »   »   »   »   attackGround·?·this.PushOrderFront("AttackGround",·{·"target":·target,·"force":·false·})·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1170| »   »   »   »   »   »   »   attackGround·?·this.PushOrderFront("AttackGround",·{·"target":·target,·"force":·false·})·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1325| »   »   »   "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
|1508| »   »   »   "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
|1529| »   »   »   "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
|1559| »   »   »   "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
|1714| »   »   »   "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
|1802| »   »   »   »   "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
|1879| »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2062| »   »   »   »   "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
|2152| »   »   »   »   "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
|2321| »   »   »   »   »   »   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
|2376| »   »   »   »   "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
|2494| »   »   »   »   "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
|2559| »   »   »   »   "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
|2599| »   »   »   »   "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
|2803| »   »   »   »   "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
|2987| »   »   »   »   "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
|3718| »   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
|4636| »   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
|4651| »   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
|4697| »   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
|4720| »   »   ····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
|5227| »   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
| 354| »   »   ····&&·(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
|1120| »   »   »   »   »   »   this.CallMemberFunction("Attack",·[target,·this.order.data.allowCapture,·false]);
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1142| »   »   »   »   »   »   »   »   this.PushOrderFront("Attack",·{·"target":·target,·"force":·false,·"allowCapture":·allowCapture·});
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1171| »   »   »   »   »   »   »   »   this.PushOrderFront("Attack",·{·"target":·target,·"force":·false,·"allowCapture":·allowCapture·});
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4447| »   »   »   &&·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| »   »   »   &&·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
|4653| »   »   &&·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
|4654| »   »   &&·(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
|4836| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5989| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.
Executing section cli...

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

Stan added inline comments.Sat, Jun 22, 12:06 PM
binaries/data/mods/public/gui/session/unit_actions.js
249

Maybe we should create something else. I don't know what the other games do :)

binaries/data/mods/public/simulation/components/Attack.js
273

Does it make sense to pass an attacktype at all, since the .some would do the trick anyway ?

566

I guess you could use only one variable ?

567

I wonder if we can merge those two ifs...

binaries/data/mods/public/simulation/components/FormationAttack.js
26–31

Maybe on multiple lines for readability ?

binaries/data/mods/public/simulation/components/UnitAI.js
436

ternary ?

Krinkle added inline comments.Sat, Jun 22, 8:15 PM
binaries/data/mods/public/simulation/components/Attack.js
567

Yeah, but even if we keep them separate, I think it would help to use the same structure as applied to the other block, which is to assign from if/else, like so:

let predictedPosition;
if (attackGround) {
  predictedPosition = targetPosition
}
else
{
  
  predictedPosition = 
}
Freagarach marked 6 inline comments as done.Sun, Jun 23, 5:01 PM
Freagarach added inline comments.
binaries/data/mods/public/gui/session/unit_actions.js
249

The marker itself is not *that* important IMHO, the cursor *is*. The icon of rallypointfocus is perfect for this I guess.

binaries/data/mods/public/simulation/components/Attack.js
273

Yes, sometimes one would like to know whether the specific attack type can be used to attack ground. (See "GetBestAttackAgainst"-fuction.)

Freagarach updated this revision to Diff 8583.Sun, Jun 23, 5:04 PM
Freagarach marked an inline comment as done and an inline comment as not done.
Freagarach edited the summary of this revision. (Show Details)
  • Added radius to Attack ground area.
    • Can scroll, but no visual feedback yet (besides the testing warnings).
    • Radius is remembered during the game.
  • Simplification in Attack.js.
  • Data on multiple lines in FormationaAttack.js
  • Some other minor stuff.

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  23|  23| 	let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|    |-			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|    |  26|+		(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|    |-			0,
|    |  27|+		0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|    |-			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|    |  28|+		(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|  31|  31| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 114| 114| 
| 115| 115| 	// Do this first in case the direct hit kills the target
| 116| 116| 	if (data.isSplash)
| 117|    |-	{
|    | 117|+	
| 118| 118| 		this.CauseSplashDamage({
| 119| 119| 			"attacker": data.attacker,
| 120| 120| 			"origin": Vector2D.from3D(data.position),
| 127| 127| 			"type": data.type,
| 128| 128| 			"attackerOwner": data.attackerOwner
| 129| 129| 		});
| 130|    |-	}
|    | 130|+	
| 131| 131| 
| 132| 132| 	let cmpProjectileManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ProjectileManager);
| 133| 133| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/Damage.js
| 225| 225| 				damageMultiplier = 0;
| 226| 226| 		}
| 227| 227| 		else // In case someone calls this function with an invalid shape.
| 228|    |-		{
|    | 228|+		
| 229| 229| 			warn("The " + data.shape + " splash damage shape is not implemented!");
| 230|    |-		}
|    | 230|+		
| 231| 231| 
| 232| 232| 		if (data.splashBonus)
| 233| 233| 			damageMultiplier *= GetDamageBonus(data.attacker, ent, data.type, data.splashBonus);

binaries/data/mods/public/gui/session/unit_actions.js
| 591| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 416| 416| 
| 417| 417| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For units, take the range in front of it, no spread. So angle = 0
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423| 423| 			{
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421| 421| 			}
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426|    |-			}
|    | 426|+			
| 427| 427| 			else
| 428| 428| 			{
| 429| 429| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426| 426| 			}
| 427| 427| 			else
| 428|    |-			{
|    | 428|+			
| 429| 429| 				// not in world, set a default?
| 430| 430| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 431|    |-			}
|    | 431|+			
| 432| 432| 		}
| 433| 433| 
| 434| 434| 		ret.attack.attackGround = cmpAttack.CanAttackGround();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
| 798| 798| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 799| 799| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 800| 800| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 801|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 801|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 802| 802| 	}
| 803| 803| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 804| 804| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1317|1317| 		}
|1318|1318| 	}
|1319|1319| 	else
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1322|1322| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1323|1323| 		// wall piece.
|1338|1338| 			"pos": start.pos,
|1339|1339| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1340|1340| 		});
|1341|    |-	}
|    |1341|+	
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|1344| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1341|1341| 	}
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|    |-	{
|    |1344|+	
|1345|1345| 		// Analogous to the starting side case above
|1346|1346| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1347|1347| 		{
|1379|1379| 				"pos": end.pos,
|1380|1380| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1381|1381| 			});
|1382|    |-	}
|    |1382|+	
|1383|1383| 
|1384|1384| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1385|1385| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1557|1557| 
|1558|1558| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1559|1559| 		if (cmpVisual)
|1560|    |-		{
|    |1560|+		
|1561|1561| 			if (!allPiecesValid || !canAfford)
|1562|1562| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1563|1563| 			else
|1564|1564| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1565|    |-		}
|    |1565|+		
|1566|1566| 
|1567|1567| 		++entPool.numUsed;
|1568|1568| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1631|1631| 			{
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|    |-						"x": pos.x,
|    |1634|+					"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|    |-						"z": pos.z,
|    |1635|+					"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|    |-						"angle": cmpPosition.GetRotation().y,
|    |1636|+					"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|    |-						"ent": ent
|    |1637|+					"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|1640|1640| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1780|1780| 	}
|1781|1781| 	else if (data.target === secondMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = {
|1784|1784| 			"type": "is second",
|1785|1785| 			"gain": cmpEntityTrader.GetGoods().amount,
|1786|1786| 		};
|1787|    |-	}
|    |1787|+	
|1788|1788| 	else if (!firstMarket)
|1789|1789| 	{
|1790|1790| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1786|1786| 		};
|1787|1787| 	}
|1788|1788| 	else if (!firstMarket)
|1789|    |-	{
|    |1789|+	
|1790|1790| 		result = { "type": "set first" };
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else if (!secondMarket)
|1793|1793| 	{
|1794|1794| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		result = { "type": "set first" };
|1791|1791| 	}
|1792|1792| 	else if (!secondMarket)
|1793|    |-	{
|    |1793|+	
|1794|1794| 		result = {
|1795|1795| 			"type": "set second",
|1796|1796| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1797|1797| 		};
|1798|    |-	}
|    |1798|+	
|1799|1799| 	else
|1800|1800| 	{
|1801|1801| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/GuiInterface.js
|1797|1797| 		};
|1798|1798| 	}
|1799|1799| 	else
|1800|    |-	{
|    |1800|+	
|1801|1801| 		// Else both markets are not null and target is different from them
|1802|1802| 		result = { "type": "set first" };
|1803|    |-	}
|    |1803|+	
|1804|1804| 	return result;
|1805|1805| };
|1806|1806| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 394| 394| function getRepairTimeTooltip(entState)
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397|    |-			"label": headerFont(translate("Number of repairers:")),
|    | 397|+		"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398|    |-			"details": entState.repairable.numBuilders
|    | 398|+		"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399|    |-		}) + "\n" + (entState.repairable.numBuilders ?
|    | 399|+	}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
| 402| 402| 			"Add another worker to speed up the repairs by %(second)s seconds.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 416| 416| function getBuildTimeTooltip(entState)
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419|    |-			"label": headerFont(translate("Number of builders:")),
|    | 419|+		"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420|    |-			"details": entState.foundation.numBuilders
|    | 420|+		"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/common/tooltips.js
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421|    |-		}) + "\n" + (entState.foundation.numBuilders ?
|    | 421|+	}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
| 424| 424| 			"Add another worker to speed up the construction by %(second)s seconds.",
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 345| 345| 			{
| 346| 346| 				var list = queue.GetEntitiesList();
| 347| 347| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 348|    |-				{
|    | 348|+				
| 349| 349| 					for (var promoted of cmd.promoted)
| 350| 350| 					{
| 351| 351| 						if (list.indexOf(promoted) === -1)
| 353| 353| 						cmd.template = promoted;
| 354| 354| 						break;
| 355| 355| 					}
| 356|    |-				}
|    | 356|+				
| 357| 357| 			}
| 358| 358| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 359| 359| 				if ("metadata" in cmd)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 552| 552| 			if (cmpGarrisonHolder)
| 553| 553| 			{
| 554| 554| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 555|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 556|    |-				    && player != +cmd.owner)
|    | 555|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 556|+				    player != +cmd.owner)
| 557| 557| 						continue;
| 558| 558| 
| 559| 559| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 554| 554| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 555| 555| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 556| 556| 				    && player != +cmd.owner)
| 557|    |-						continue;
|    | 557|+					continue;
| 558| 558| 
| 559| 559| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 560| 560| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 964| 964| 		{
| 965| 965| 			var count = 0;
| 966| 966| 			for (let j = 0; j < length - 1; ++j)
| 967|    |-			{
|    | 967|+			
| 968| 968| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 969| 969| 					++count;
| 970| 970| 				else
| 971| 971| 					break;
| 972|    |-			}
|    | 972|+			
| 973| 973| 			consec[i] = count;
| 974| 974| 		}
| 975| 975| 		var start = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-in'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
| 975| 975| 		var start = 0;
| 976| 976| 		var count = 0;
| 977| 977| 		for (var c in consec)
| 978|    |-		{
|    | 978|+		
| 979| 979| 			if (consec[c] > count)
| 980| 980| 			{
| 981| 981| 				start = c;
| 982| 982| 				count = consec[c];
| 983| 983| 			}
| 984|    |-		}
|    | 984|+		
| 985| 985| 
| 986| 986| 		// If we've found a shoreline, stop searching
| 987| 987| 		if (count != numPoints-1)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|1165|    |-	{
|    |1165|+	
|1166|1166| 		ProcessCommand(player, {
|1167|1167| 			"type": "repair",
|1168|1168| 			"entities": entities,
|1170|1170| 			"autocontinue": cmd.autocontinue,
|1171|1171| 			"queued": cmd.queued
|1172|1172| 		});
|1173|    |-	}
|    |1173|+	
|1174|1174| 
|1175|1175| 	return ent;
|1176|1176| }
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1266|1266| 		}
|1267|1267| 
|1268|1268| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1269|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1269|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1270|1270| 	}
|1271|1271| 
|1272|1272| 	var i = 0;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/helpers/Commands.js
|1283|1283| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1284|1284| 		// start position snapping (implying that