Page MenuHomeWildfire Games

Support attack-ground for ranged units.
Needs ReviewPublic

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

Details

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

Depends on D2014, D2015.
This patch aims at giving ranged entities the ability to attack-ground.
ToDo:

  • Allow buildings to attack-ground as well (Probably wait for D1958).
    • Sure? Because we can't order buildings to attack something yet,,,
  • Assign a hotkey?
  • Ask someone to create an icon and cursor for this.
  • Give better visual feedback on the increase/decrease of the bombard radius.

Deserialisation issue: #4698.

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.
One can in-/decrease the bombarding radius using the PageUp/PageDown hotkeys.

Diff Detail

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

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Stan added inline comments.Jun 22 2019, 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
281

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

579

I guess you could use only one variable ?

580

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
441

ternary ?

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

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.Jun 23 2019, 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
281

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.Jun 23 2019, 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 the first entity we build must be a tower)
|1285|1285| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1286|    |-		{
|    |1286|+		
|1287|1287| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1288|1288| 			{
|1289|1289|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1290|1290|     			break;
|1291|1291| 			}
|1292|    |-		}
|    |1292|+		
|1293|1293| 
|1294|1294| 		var constructPieceCmd = {
|1295|1295| 			"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
|1330|1330| 
|1331|1331| 				if (i > 0)
|1332|1332| 				{
|1333|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1333|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1334|1334| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1335|1335| 					// TODO: ensure that cmpPreviousObstruction exists
|1336|1336| 					// 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
|1388|1388| 		}
|1389|1389| 
|1390|1390| 		if (piece.template == cmd.wallSet.templates.tower)
|1391|    |-		{
|    |1391|+		
|1392|1392| 			// encountered a tower entity, update the last tower control group
|1393|1393| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1394|    |-		}
|    |1394|+		
|1395|1395| 		else
|1396|1396| 		{
|1397|1397| 			// 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
|1402|1402| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1403|1403| 			{
|1404|1404| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1405|    |-				{
|    |1405|+				
|1406|1406| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1407|    |-				}
|    |1407|+				
|1408|1408| 			}
|1409|1409| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1410|1410| 			{
|    | [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
|1477|1477| 	}
|1478|1478| 
|1479|1479| 	if (formedEnts.length == 0)
|1480|    |-	{
|    |1480|+	
|1481|1481| 		// No units support the formation - return all the others
|1482|1482| 		return nonformedUnitAIs;
|1483|    |-	}
|    |1483|+	
|1484|1484| 
|1485|1485| 	// Find what formations the formationable selected entities are currently in
|1486|1486| 	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
|1493|1493| 		// Check that all its members are selected
|1494|1494| 		var fid = formationIds[0];
|1495|1495| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1496|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1497|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1496|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1497|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1498|1498| 		{
|1499|1499| 			cmpFormation.DeleteTwinFormations();
|1500|1500| 			// 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
|1525|1525| 					{
|1526|1526| 						var template = cmpUnitAI.GetFormationTemplate();
|1527|1527| 						if (lastFormationTemplate === undefined)
|1528|    |-						{
|    |1528|+						
|1529|1529| 							lastFormationTemplate = template;
|1530|    |-						}
|    |1530|+						
|1531|1531| 						else if (lastFormationTemplate != template)
|1532|1532| 						{
|1533|1533| 							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
|1601|1601| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1602|1602| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1603|1603| 				if (matrix[i][j] < distSq)
|1604|    |-					closeClusters = [i,j];
|    |1604|+					closeClusters = [i, j];
|1605|1605| 
|1606|1606| 		// if no more close clusters found, just return all found clusters so far
|1607|1607| 		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
|1623|1623| 		}
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|    |-		clusters.splice(closeClusters[0],1);
|    |1626|+		clusters.splice(closeClusters[0], 1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		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
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|    |-		clusters.splice(closeClusters[1],1);
|    |1627|+		clusters.splice(closeClusters[1], 1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		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
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|    |-		matrix.splice(closeClusters[0],1);
|    |1628|+		matrix.splice(closeClusters[0], 1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|    | [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| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|    |-		matrix.splice(closeClusters[1],1);
|    |1629|+		matrix.splice(closeClusters[1], 1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			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
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|    |-				matrix[i].splice(closeClusters[0],1);
|    |1633|+				matrix[i].splice(closeClusters[0], 1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|1635| 				matrix[i].splice(closeClusters[1],1);
|1636|1636| 		}
|    | [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| 			if (matrix[i].length > closeClusters[0])
|1633|1633| 				matrix[i].splice(closeClusters[0],1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|    |-				matrix[i].splice(closeClusters[1],1);
|    |1635|+				matrix[i].splice(closeClusters[1], 1);
|1636|1636| 		}
|1637|1637| 		// add a new row of distances to the matrix and the new cluster
|1638|1638| 		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
| 804| »   »   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
|1289| ····»   »   »   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
|1290| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1520| »   »   »   »   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
|1599| »   »   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
|1616| »   »   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
|1630| »   »   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
| 556| »   »   »   »   ····&&·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
| 744| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1497| »   »   »   &&·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
|1523| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' 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
| 600| 600| 		// TODO: Use unit rotation to implement x/z offsets.
| 601| 601| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 602| 602| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 603|    |-		
|    | 603|+
| 604| 604| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 605| 605| 		if (cmpVisual)
| 606| 606| 		{
|    | [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
| 672| 672| 			});
| 673| 673| 	}
| 674| 674| 	else
| 675|    |-	{
|    | 675|+	
| 676| 676| 		// Melee attack - hurt the target immediately
| 677| 677| 		cmpDamage.CauseDamage({
| 678| 678| 			"strengths": this.GetAttackStrengths(type),
| 682| 682| 			"type": type,
| 683| 683| 			"attackerOwner": attackerOwner
| 684| 684| 		});
| 685|    |-	}
|    | 685|+	
| 686| 686| };
| 687| 687| 
| 688| 688| /**

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
| 647| »   »   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
|1061|1061| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1062|1062| 
|1063|1063| 			if (placementSupport.mode === "wall")
|1064|    |-			{
|    |1064|+			
|1065|1065| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1066|1066| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1067|1067| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1068|1068| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1069|    |-			}
|    |1069|+			
|1070|1070| 			else
|1071|1071| 			{
|1072|1072| 				// 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
|1333|1333| 	if (templateData.attack &&
|1334|1334| 		templateData.attack.Ranged &&
|1335|1335| 		templateData.attack.Ranged.maxRange)
|1336|    |-	{
|    |1336|+	
|1337|1337| 		// add attack information to display a good tooltip
|1338|1338| 		placementSupport.attack = templateData.attack;
|1339|    |-	}
|    |1339|+	
|1340|1340| }
|1341|1341| 
|1342|1342| // Attack ground:
|    | [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
|1449|1449| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1450|1450| 	{
|1451|1451| 		if (inputState == INPUT_BATCHTRAINING)
|1452|    |-		{
|    |1452|+		
|1453|1453| 			// Check if we are training in the same building(s) as the last batch
|1454|1454| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1455|1455| 			// If the order changed, we have a new selection and we should create a new batch.
|1482|1482| 			else if (!decrement)
|1483|1483| 				flushTrainingBatch();
|1484|1484| 				// fall through to create the new batch
|1485|    |-		}
|    |1485|+		
|1486|1486| 
|1487|1487| 		// Don't start a new batch if decrementing or unable to afford it.
|1488|1488| 		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
|1481|1481| 			// Otherwise start a new one
|1482|1482| 			else if (!decrement)
|1483|1483| 				flushTrainingBatch();
|1484|    |-				// fall through to create the new batch
|    |1484|+			// fall through to create the new batch
|1485|1485| 		}
|1486|1486| 
|1487|1487| 		// 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
|1559|1559| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1560|1560| 	{
|1561|1561| 		// Train as many full batches as we can
|1562|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1562|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1563|1563| 		Engine.PostNetworkCommand({
|1564|1564| 			"type": "train",
|1565|1565| 			"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
|1638|1638| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1639|1639| 
|1640|1640| 	// Reset the last idle unit, etc., if the selection type has changed.
|1641|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1641|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1642|1642| 		resetIdleUnit();
|1643|1643| 	lastIdleClasses = classes;
|1644|1644| 

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
| 905| »   »   »   »   »   action.radius·=·g_AttackGroundSize;
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

binaries/data/mods/public/gui/session/input.js
| 925| »   »   »   »   warn("Called·down!·"·+·uneval(g_AttackGroundSize));
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

binaries/data/mods/public/gui/session/input.js
| 930| »   »   »   »   warn("Called·up!·"·+·uneval(g_AttackGroundSize));
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

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

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

binaries/data/mods/public/gui/session/input.js
|1048| »   »   »   »   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
|1057| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

binaries/data/mods/public/gui/session/input.js
|1589| »   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
| 919| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

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

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

binaries/data/mods/public/gui/session/input.js
|1344| var·g_AttackGroundSize·=·getDefaultAttackGroundSize();
|    | [NORMAL] JSHintBear:
|    | 'g_AttackGroundSize' was used before it was 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
| 515| 515| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 516| 516| 				}
| 517| 517| 				else
| 518|    |-				{
|    | 518|+				
| 519| 519| 					// We couldn't move there, or the target moved away
| 520| 520| 					this.FinishOrder();
| 521|    |-				}
|    | 521|+				
| 522| 522| 				return;
| 523| 523| 			}
| 524| 524| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/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
|5297|5297| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5298|5298| 	{
|5299|5299| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5300|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5300|+		if (cmpTrader.HasBothMarkets() &&
|5301|5301| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5302|5302| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5303|5303| 		{
|    | [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
|5578|5578| 				{
|5579|5579| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5580|5580| 					var targetClasses = this.order.data.targetClasses;
|5581|    |-					if (targetClasses.attack && cmpIdentity
|5582|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5581|+					if (targetClasses.attack && cmpIdentity &&
|    |5582|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5583|5583| 						continue;
|5584|5584| 					if (targetClasses.avoid && cmpIdentity
|5585|5585| 						&& 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
|5581|5581| 					if (targetClasses.attack && cmpIdentity
|5582|5582| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5583|5583| 						continue;
|5584|    |-					if (targetClasses.avoid && cmpIdentity
|5585|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5584|+					if (targetClasses.avoid && cmpIdentity &&
|    |5585|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5586|5586| 						continue;
|5587|5587| 					// Only used by the AIs to prevent some choices of targets
|5588|5588| 					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
|5604|5604| 		{
|5605|5605| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5606|5606| 			var targetClasses = this.order.data.targetClasses;
|5607|    |-			if (cmpIdentity && targetClasses.attack
|5608|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5607|+			if (cmpIdentity && targetClasses.attack &&
|    |5608|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5609|5609| 				continue;
|5610|5610| 			if (cmpIdentity && targetClasses.avoid
|5611|5611| 				&& 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
|5607|5607| 			if (cmpIdentity && targetClasses.attack
|5608|5608| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5609|5609| 				continue;
|5610|    |-			if (cmpIdentity && targetClasses.avoid
|5611|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5610|+			if (cmpIdentity && targetClasses.avoid &&
|    |5611|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5612|5612| 				continue;
|5613|5613| 			// Only used by the AIs to prevent some choices of targets
|5614|5614| 			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
|5750|5750| 
|5751|5751| UnitAI.prototype.SetHeldPosition = function(x, z)
|5752|5752| {
|5753|    |-	this.heldPosition = {"x": x, "z": z};
|    |5753|+	this.heldPosition = { "x": x, "z": z};
|5754|5754| };
|5755|5755| 
|5756|5756| 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
|5750|5750| 
|5751|5751| UnitAI.prototype.SetHeldPosition = function(x, z)
|5752|5752| {
|5753|    |-	this.heldPosition = {"x": x, "z": z};
|    |5753|+	this.heldPosition = {"x": x, "z": z };
|5754|5754| };
|5755|5755| 
|5756|5756| 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
|5777|5777| 	return false;
|5778|5778| };
|5779|5779| 
|5780|    |-//// Helper functions ////
|    |5780|+// // Helper functions ////
|5781|5781| 
|5782|5782| UnitAI.prototype.CanAttack = function(target)
|5783|5783| {
|    | [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
|5981|5981| 	return cmpPack && cmpPack.IsPacking();
|5982|5982| };
|5983|5983| 
|5984|    |-//// Formation specific functions ////
|    |5984|+// // Formation specific functions ////
|5985|5985| 
|5986|5986| UnitAI.prototype.IsAttackingAsFormation = function()
|5987|5987| {
|    | [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
|5986|5986| UnitAI.prototype.IsAttackingAsFormation = function()
|5987|5987| {
|5988|5988| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5989|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5990|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5989|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5990|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5991|5991| };
|5992|5992| 
|5993|5993| //// 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
|5990|5990| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5991|5991| };
|5992|5992| 
|5993|    |-//// Animal specific functions ////
|    |5993|+// // Animal specific functions ////
|5994|5994| 
|5995|5995| UnitAI.prototype.MoveRandomly = function(distance)
|5996|5996| {

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
| 417| »   »   »   this.IsAnimal()·?·this.SetNextState("ANIMAL.COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 422| »   »   this.IsAnimal()·?·this.SetNextState("ANIMAL.COMBAT.APPROACHING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 719| »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 734| »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

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
|5228| »   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
| 418| »   »   »   »   this.SetNextState("INDIVIDUAL.COMBAT");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 423| »   »   »   this.SetNextState("INDIVIDUAL.COMBAT");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 720| »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 735| »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

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
|5228| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5711| »   »   var·range·=·cmpVision.GetRange();
|    | [MAJOR] JSHintBear:
|    | Too many errors. (93% scanned).
Executing section cli...

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

Freagarach updated this revision to Diff 8584.EditedJun 23 2019, 5:26 PM
Freagarach edited the summary of this revision. (Show Details)

Tried to make Vulcan a tad happier.

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);
|    | [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/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
|1061|1061| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1062|1062| 
|1063|1063| 			if (placementSupport.mode === "wall")
|1064|    |-			{
|    |1064|+			
|1065|1065| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1066|1066| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1067|1067| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1068|1068| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1069|    |-			}
|    |1069|+			
|1070|1070| 			else
|1071|1071| 			{
|1072|1072| 				// 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
|1333|1333| 	if (templateData.attack &&
|1334|1334| 		templateData.attack.Ranged &&
|1335|1335| 		templateData.attack.Ranged.maxRange)
|1336|    |-	{
|    |1336|+	
|1337|1337| 		// add attack information to display a good tooltip
|1338|1338| 		placementSupport.attack = templateData.attack;
|1339|    |-	}
|    |1339|+	
|1340|1340| }
|1341|1341| 
|1342|1342| // Attack ground:
|    | [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
|1449|1449| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1450|1450| 	{
|1451|1451| 		if (inputState == INPUT_BATCHTRAINING)
|1452|    |-		{
|    |1452|+		
|1453|1453| 			// Check if we are training in the same building(s) as the last batch
|1454|1454| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1455|1455| 			// If the order changed, we have a new selection and we should create a new batch.
|1482|1482| 			else if (!decrement)
|1483|1483| 				flushTrainingBatch();
|1484|1484| 				// fall through to create the new batch
|1485|    |-		}
|    |1485|+		
|1486|1486| 
|1487|1487| 		// Don't start a new batch if decrementing or unable to afford it.
|1488|1488| 		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
|1481|1481| 			// Otherwise start a new one
|1482|1482| 			else if (!decrement)
|1483|1483| 				flushTrainingBatch();
|1484|    |-				// fall through to create the new batch
|    |1484|+			// fall through to create the new batch
|1485|1485| 		}
|1486|1486| 
|1487|1487| 		// 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
|1559|1559| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1560|1560| 	{
|1561|1561| 		// Train as many full batches as we can
|1562|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1562|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1563|1563| 		Engine.PostNetworkCommand({
|1564|1564| 			"type": "train",
|1565|1565| 			"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
|1638|1638| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1639|1639| 
|1640|1640| 	// Reset the last idle unit, etc., if the selection type has changed.
|1641|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1641|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1642|1642| 		resetIdleUnit();
|1643|1643| 	lastIdleClasses = classes;
|1644|1644| 

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
| 905| »   »   »   »   »   action.radius·=·g_AttackGroundSize;
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

binaries/data/mods/public/gui/session/input.js
| 925| »   »   »   »   warn("Called·down!·"·+·uneval(g_AttackGroundSize));
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

binaries/data/mods/public/gui/session/input.js
| 930| »   »   »   »   warn("Called·up!·"·+·uneval(g_AttackGroundSize));
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

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

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

binaries/data/mods/public/gui/session/input.js
|1048| »   »   »   »   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
|1057| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

binaries/data/mods/public/gui/session/input.js
|1589| »   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
| 919| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

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

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

binaries/data/mods/public/gui/session/input.js
|1344| var·g_AttackGroundSize·=·getDefaultAttackGroundSize();
|    | [NORMAL] JSHintBear:
|    | 'g_AttackGroundSize' was used before it was defined.
|    | [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
| 600| 600| 		// TODO: Use unit rotation to implement x/z offsets.
| 601| 601| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 602| 602| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 603|    |-		
|    | 603|+
| 604| 604| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 605| 605| 		if (cmpVisual)
| 606| 606| 		{
|    | [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
| 672| 672| 			});
| 673| 673| 	}
| 674| 674| 	else
| 675|    |-	{
|    | 675|+	
| 676| 676| 		// Melee attack - hurt the target immediately
| 677| 677| 		cmpDamage.CauseDamage({
| 678| 678| 			"strengths": this.GetAttackStrengths(type),
| 682| 682| 			"type": type,
| 683| 683| 			"attackerOwner": attackerOwner
| 684| 684| 		});
| 685|    |-	}
|    | 685|+	
| 686| 686| };
| 687| 687| 
| 688| 688| /**

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
| 647| »   »   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| 

binaries/data/mods/public/gui/session/unit_actions.js
| 245| »   »   »   »   "target":·target,,
|    | [MAJOR] ESLintBear:
|    | Parsing error: Unexpected token ,

binaries/data/mods/public/gui/session/unit_actions.js
| 245| »   »   »   »   "target":·target,,
|    | [NORMAL] JSHintBear:
|    | Extra comma. (it breaks older versions of IE)

binaries/data/mods/public/gui/session/unit_actions.js
| 245| »   »   »   »   "target":·target,,
|    | [MAJOR] JSHintBear:
|    | Expected '}' to match '{' from line 242 and instead saw ','.

binaries/data/mods/public/gui/session/unit_actions.js
| 246| »   »   »   »   "radius":·action.radius
|    | [NORMAL] JSHintBear:
|    | Expected ')' and instead saw 'radius'.

binaries/data/mods/public/gui/session/unit_actions.js
| 246| »   »   »   »   "radius":·action.radius
|    | [MAJOR] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/gui/session/unit_actions.js
| 246| »   »   »   »   "radius":·action.radius
|    | [MAJOR] JSHintBear:
|    | Expected '}' to match '{' from line 241 and instead saw ':'.

binaries/data/mods/public/gui/session/unit_actions.js
| 246| »   »   »   »   "radius":·action.radius
|    | [MAJOR] JSHintBear:
|    | Expected '}' to match '{' from line 239 and instead saw 'action'.

binaries/data/mods/public/gui/session/unit_actions.js
| 247| »   »   »   »   "queued":·queued
|    | [MAJOR] JSHintBear:
|    | Expected '}' to match '{' from line 43 and instead saw 'queued'.

binaries/data/mods/public/gui/session/unit_actions.js
| 247| »   »   »   »   "queued":·queued
|    | [MAJOR] JSHintBear:
|    | Missing semicolon.

binaries/data/mods/public/gui/session/unit_actions.js
| 247| »   »   »   »   "queued":·queued
|    | [MAJOR] JSHintBear:
|    | Unrecoverable syntax error. (15% scanned).
|    | [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 the first entity we build must be a tower)
|1285|1285| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1286|    |-		{
|    |1286|+		
|1287|1287| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1288|1288| 			{
|1289|1289|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1290|1290|     			break;
|1291|1291| 			}
|1292|    |-		}
|    |1292|+		
|1293|1293| 
|1294|1294| 		var constructPieceCmd = {
|1295|1295| 			"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
|1330|1330| 
|1331|1331| 				if (i > 0)
|1332|1332| 				{
|1333|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1333|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1334|1334| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1335|1335| 					// TODO: ensure that cmpPreviousObstruction exists
|1336|1336| 					// 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
|1388|1388| 		}
|1389|1389| 
|1390|1390| 		if (piece.template == cmd.wallSet.templates.tower)
|1391|    |-		{
|    |1391|+		
|1392|1392| 			// encountered a tower entity, update the last tower control group
|1393|1393| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1394|    |-		}
|    |1394|+		
|1395|1395| 		else
|1396|1396| 		{
|1397|1397| 			// 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
|1402|1402| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1403|1403| 			{
|1404|1404| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1405|    |-				{
|    |1405|+				
|1406|1406| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1407|    |-				}
|    |1407|+				
|1408|1408| 			}
|1409|1409| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1410|1410| 			{
|    | [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
|1477|1477| 	}
|1478|1478| 
|1479|1479| 	if (formedEnts.length == 0)
|1480|    |-	{
|    |1480|+	
|1481|1481| 		// No units support the formation - return all the others
|1482|1482| 		return nonformedUnitAIs;
|1483|    |-	}
|    |1483|+	
|1484|1484| 
|1485|1485| 	// Find what formations the formationable selected entities are currently in
|1486|1486| 	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
|1493|1493| 		// Check that all its members are selected
|1494|1494| 		var fid = formationIds[0];
|1495|1495| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1496|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1497|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1496|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1497|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1498|1498| 		{
|1499|1499| 			cmpFormation.DeleteTwinFormations();
|1500|1500| 			// 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
|1525|1525| 					{
|1526|1526| 						var template = cmpUnitAI.GetFormationTemplate();
|1527|1527| 						if (lastFormationTemplate === undefined)
|1528|    |-						{
|    |1528|+						
|1529|1529| 							lastFormationTemplate = template;
|1530|    |-						}
|    |1530|+						
|1531|1531| 						else if (lastFormationTemplate != template)
|1532|1532| 						{
|1533|1533| 							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
|1601|1601| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1602|1602| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1603|1603| 				if (matrix[i][j] < distSq)
|1604|    |-					closeClusters = [i,j];
|    |1604|+					closeClusters = [i, j];
|1605|1605| 
|1606|1606| 		// if no more close clusters found, just return all found clusters so far
|1607|1607| 		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
|1623|1623| 		}
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|    |-		clusters.splice(closeClusters[0],1);
|    |1626|+		clusters.splice(closeClusters[0], 1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		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
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|    |-		clusters.splice(closeClusters[1],1);
|    |1627|+		clusters.splice(closeClusters[1], 1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		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
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|    |-		matrix.splice(closeClusters[0],1);
|    |1628|+		matrix.splice(closeClusters[0], 1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|    | [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| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|    |-		matrix.splice(closeClusters[1],1);
|    |1629|+		matrix.splice(closeClusters[1], 1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			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
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|    |-				matrix[i].splice(closeClusters[0],1);
|    |1633|+				matrix[i].splice(closeClusters[0], 1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|1635| 				matrix[i].splice(closeClusters[1],1);
|1636|1636| 		}
|    | [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| 			if (matrix[i].length > closeClusters[0])
|1633|1633| 				matrix[i].splice(closeClusters[0],1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|    |-				matrix[i].splice(closeClusters[1],1);
|    |1635|+				matrix[i].splice(closeClusters[1], 1);
|1636|1636| 		}
|1637|1637| 		// add a new row of distances to the matrix and the new cluster
|1638|1638| 		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
| 804| »   »   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
|1289| ····»   »   »   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
|1290| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1520| »   »   »   »   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
|1599| »   »   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
|1616| »   »   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
|1630| »   »   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
| 556| »   »   »   »   ····&&·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
| 744| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1497| »   »   »   &&·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
|1523| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   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
| 515| 515| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 516| 516| 				}
| 517| 517| 				else
| 518|    |-				{
|    | 518|+				
| 519| 519| 					// We couldn't move there, or the target moved away
| 520| 520| 					this.FinishOrder();
| 521|    |-				}
|    | 521|+				
| 522| 522| 				return;
| 523| 523| 			}
| 524| 524| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/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 (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/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
|5297|5297| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5298|5298| 	{
|5299|5299| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5300|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5300|+		if (cmpTrader.HasBothMarkets() &&
|5301|5301| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5302|5302| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5303|5303| 		{
|    | [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
|5578|5578| 				{
|5579|5579| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5580|5580| 					var targetClasses = this.order.data.targetClasses;
|5581|    |-					if (targetClasses.attack && cmpIdentity
|5582|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5581|+					if (targetClasses.attack && cmpIdentity &&
|    |5582|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5583|5583| 						continue;
|5584|5584| 					if (targetClasses.avoid && cmpIdentity
|5585|5585| 						&& 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
|5581|5581| 					if (targetClasses.attack && cmpIdentity
|5582|5582| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5583|5583| 						continue;
|5584|    |-					if (targetClasses.avoid && cmpIdentity
|5585|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5584|+					if (targetClasses.avoid && cmpIdentity &&
|    |5585|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5586|5586| 						continue;
|5587|5587| 					// Only used by the AIs to prevent some choices of targets
|5588|5588| 					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
|5604|5604| 		{
|5605|5605| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5606|5606| 			var targetClasses = this.order.data.targetClasses;
|5607|    |-			if (cmpIdentity && targetClasses.attack
|5608|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5607|+			if (cmpIdentity && targetClasses.attack &&
|    |5608|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5609|5609| 				continue;
|5610|5610| 			if (cmpIdentity && targetClasses.avoid
|5611|5611| 				&& 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
|5607|5607| 			if (cmpIdentity && targetClasses.attack
|5608|5608| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5609|5609| 				continue;
|5610|    |-			if (cmpIdentity && targetClasses.avoid
|5611|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5610|+			if (cmpIdentity && targetClasses.avoid &&
|    |5611|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5612|5612| 				continue;
|5613|5613| 			// Only used by the AIs to prevent some choices of targets
|5614|5614| 			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
|5750|5750| 
|5751|5751| UnitAI.prototype.SetHeldPosition = function(x, z)
|5752|5752| {
|5753|    |-	this.heldPosition = {"x": x, "z": z};
|    |5753|+	this.heldPosition = { "x": x, "z": z};
|5754|5754| };
|5755|5755| 
|5756|5756| 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
|5750|5750| 
|5751|5751| UnitAI.prototype.SetHeldPosition = function(x, z)
|5752|5752| {
|5753|    |-	this.heldPosition = {"x": x, "z": z};
|    |5753|+	this.heldPosition = {"x": x, "z": z };
|5754|5754| };
|5755|5755| 
|5756|5756| 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
|5777|5777| 	return false;
|5778|5778| };
|5779|5779| 
|5780|    |-//// Helper functions ////
|    |5780|+// // Helper functions ////
|5781|5781| 
|5782|5782| UnitAI.prototype.CanAttack = function(target)
|5783|5783| {
|    | [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
|5981|5981| 	return cmpPack && cmpPack.IsPacking();
|5982|5982| };
|5983|5983| 
|5984|    |-//// Formation specific functions ////
|    |5984|+// // Formation specific functions ////
|5985|5985| 
|5986|5986| UnitAI.prototype.IsAttackingAsFormation = function()
|5987|5987| {
|    | [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
|5986|5986| UnitAI.prototype.IsAttackingAsFormation = function()
|5987|5987| {
|5988|5988| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5989|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5990|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5989|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5990|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5991|5991| };
|5992|5992| 
|5993|5993| //// 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
|5990|5990| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5991|5991| };
|5992|5992| 
|5993|    |-//// Animal specific functions ////
|    |5993|+// // Animal specific functions ////
|5994|5994| 
|5995|5995| UnitAI.prototype.MoveRandomly = function(distance)
|5996|5996| {

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
| 417| »   »   »   this.IsAnimal()·?·this.SetNextState("ANIMAL.COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 422| »   »   this.IsAnimal()·?·this.SetNextState("ANIMAL.COMBAT.APPROACHING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 719| »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 734| »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

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
|5228| »   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
| 418| »   »   »   »   this.SetNextState("INDIVIDUAL.COMBAT");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 423| »   »   »   this.SetNextState("INDIVIDUAL.COMBAT");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 720| »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 735| »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

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
|5228| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5990| »   »   &&·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/1796/display/redirect

Stan added inline comments.Jun 23 2019, 5:31 PM
binaries/data/mods/public/gui/session/unit_actions.js
249

Yeah maybe a rally point would make sense !

Freagarach updated this revision to Diff 8588.Jun 23 2019, 8:00 PM

Formations and attackground radius.

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [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
| 600| 600| 		// TODO: Use unit rotation to implement x/z offsets.
| 601| 601| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 602| 602| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 603|    |-		
|    | 603|+
| 604| 604| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 605| 605| 		if (cmpVisual)
| 606| 606| 		{
|    | [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
| 672| 672| 			});
| 673| 673| 	}
| 674| 674| 	else
| 675|    |-	{
|    | 675|+	
| 676| 676| 		// Melee attack - hurt the target immediately
| 677| 677| 		cmpDamage.CauseDamage({
| 678| 678| 			"strengths": this.GetAttackStrengths(type),
| 682| 682| 			"type": type,
| 683| 683| 			"attackerOwner": attackerOwner
| 684| 684| 		});
| 685|    |-	}
|    | 685|+	
| 686| 686| };
| 687| 687| 
| 688| 688| /**

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
| 647| »   »   cmpTimer.SetTimeout(SYSTEM_ENTITY,·IID_Damage,·"MissileHit",·timeToTarget·*·1000·+·+this.template[type].Delay,·data);
|    | [NORMAL] JSHintBear:
|    | Confusing plusses.
|    | [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
| 591| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [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/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
| 515| 515| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 516| 516| 				}
| 517| 517| 				else
| 518|    |-				{
|    | 518|+				
| 519| 519| 					// We couldn't move there, or the target moved away
| 520| 520| 					this.FinishOrder();
| 521|    |-				}
|    | 521|+				
| 522| 522| 				return;
| 523| 523| 			}
| 524| 524| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/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 (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
|1165|1165| 						if (this.TargetIsAlive(target) && this.CheckTargetVisible(target))
|1166|1166| 						{
|1167|1167| 							this.FinishOrder();
|1168|    |-							attackGround ? this.PushOrderFront("AttackGround", { "target": target, "radius": this.order.data.radius,"force": false }) :
|    |1168|+							attackGround ? this.PushOrderFront("AttackGround", { "target": target, "radius": this.order.data.radius, "force": false }) :
|1169|1169| 								this.PushOrderFront("Attack", { "target": target, "force": false, "allowCapture": allowCapture });
|1170|1170| 							return;
|1171|1171| 						}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1230|1230| 			// If the controller handled an order but some members rejected it,
|1231|1231| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1232|1232| 			if (this.orderQueue.length)
|1233|    |-			{
|    |1233|+			
|1234|1234| 				// We're leaving the formation, so stop our FormationWalk order
|1235|1235| 				if (this.FinishOrder())
|1236|1236| 					return;
|1237|    |-			}
|    |1237|+			
|1238|1238| 
|1239|1239| 			// No orders left, we're an individual now
|1240|1240| 			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
|1258|1258| 			// Move a tile outside the building
|1259|1259| 			let range = 4;
|1260|1260| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1261|    |-			{
|    |1261|+			
|1262|1262| 				// We are already at the target, or can't move at all
|1263|1263| 				this.FinishOrder();
|1264|    |-			}
|    |1264|+			
|1265|1265| 			else
|1266|1266| 			{
|1267|1267| 				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
|1479|1479| 
|1480|1480| 			"LosRangeUpdate": function(msg) {
|1481|1481| 				if (this.GetStance().targetVisibleEnemies)
|1482|    |-				{
|    |1482|+				
|1483|1483| 					// Start attacking one of the newly-seen enemy (if any)
|1484|1484| 					this.AttackEntitiesByPreference(msg.data.added);
|1485|    |-				}
|    |1485|+				
|1486|1486| 			},
|1487|1487| 
|1488|1488| 			"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
|1512|1512| 				this.SelectAnimation("move");
|1513|1513| 			},
|1514|1514| 
|1515|    |-			"leave": function () {
|    |1515|+			"leave": function() {
|1516|1516| 				this.SelectAnimation("idle");
|1517|1517| 				this.StopMoving();
|1518|1518| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1692|1692| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1693|1693| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1694|1694| 						if (cmpHealth && cmpHealth.IsInjured())
|1695|    |-						{
|    |1695|+						
|1696|1696| 							if (this.CanHeal(this.isGuardOf))
|1697|1697| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1698|1698| 							else if (this.CanRepair(this.isGuardOf))
|1699|1699| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1700|    |-						}
|    |1700|+						
|1701|1701| 					}
|1702|1702| 				},
|1703|1703| 
|    | [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
|1908|1908| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1909|1909| 
|1910|1910| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1911|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1911|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1912|1912| 
|1913|1913| 					this.FaceTowardsTarget(this.order.data.target);
|1914|1914| 
|    | [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
|2050|2050| 
|2051|2051| 				"Attacked": function(msg) {
|2052|2052| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2053|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2054|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2053|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2054|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2055|2055| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2056|2056| 				},
|2057|2057| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2070|2070| 					this.SelectAnimation("move");
|2071|2071| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2072|2072| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2073|    |-					{
|    |2073|+					
|2074|2074| 						// Run after a fleeing target
|2075|2075| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2076|    |-					}
|    |2076|+					
|2077|2077| 					this.StartTimer(1000, 1000);
|2078|2078| 				},
|2079|2079| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2252|2252| 
|2253|2253| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2254|2254| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2255|    |-					{
|    |2255|+					
|2256|2256| 						// Check we can still reach and gather from the target
|2257|2257| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2258|2258| 						{
|2303|2303| 								return;
|2304|2304| 							}
|2305|2305| 						}
|2306|    |-					}
|    |2306|+					
|2307|2307| 
|2308|2308| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2309|2309| 
|    | [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
|2295|2295| 								return;
|2296|2296| 						}
|2297|2297| 						else
|2298|    |-						{
|    |2298|+						
|2299|2299| 							// Try to follow the target
|2300|2300| 							if (this.MoveToTargetRange(this.gatheringTarget, IID_ResourceGatherer))
|2301|2301| 							{
|2302|2302| 								this.SetNextState("APPROACHING");
|2303|2303| 								return;
|2304|2304| 							}
|2305|    |-						}
|    |2305|+						
|2306|2306| 					}
|2307|2307| 
|2308|2308| 					// 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
|2329|2329| 					// Also don't switch to a different type of huntable animal
|2330|2330| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2331|2331| 						return (
|2332|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2333|    |-							|| (type.specific == resourceType.specific
|    |2332|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2333|+							(type.specific == resourceType.specific
|2334|2334| 							&& (type.specific != "meat" || resourceTemplate == template))
|2335|2335| 						);
|2336|2336| 					});
|    | [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
|2330|2330| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2331|2331| 						return (
|2332|2332| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2333|    |-							|| (type.specific == resourceType.specific
|2334|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2333|+							|| (type.specific == resourceType.specific &&
|    |2334|+							(type.specific != "meat" || resourceTemplate == template))
|2335|2335| 						);
|2336|2336| 					});
|2337|2337| 					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
|2395|2395| 
|2396|2396| 				"Timer": function(msg) {
|2397|2397| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2398|    |-					{
|    |2398|+					
|2399|2399| 						// Return to our original position unless we have a better order.
|2400|2400| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2401|2401| 							this.WalkToHeldPosition();
|2402|    |-					}
|    |2402|+					
|2403|2403| 				},
|2404|2404| 
|2405|2405| 				"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
|2429|2429| 					this.StartTimer(prepare, this.healTimers.repeat);
|2430|2430| 
|2431|2431| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2432|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2432|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2433|2433| 
|2434|2434| 					this.FaceTowardsTarget(this.order.data.target);
|2435|2435| 				},
|    | [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
|2642|2642| 					{
|2643|2643| 						// The building was already finished/fully repaired before we arrived;
|2644|2644| 						// let the ConstructionFinished handler handle this.
|2645|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2645|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2646|2646| 						return true;
|2647|2647| 					}
|2648|2648| 
|    | [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
|2642|2642| 					{
|2643|2643| 						// The building was already finished/fully repaired before we arrived;
|2644|2644| 						// let the ConstructionFinished handler handle this.
|2645|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2645|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2646|2646| 						return true;
|2647|2647| 					}
|2648|2648| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2769|2769| 
|2770|2770| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2771|2771| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2772|    |-				{
|    |2772|+				
|2773|2773| 					// We're already walking to the given point, so add this as a order.
|2774|2774| 					this.WalkToTarget(msg.data.newentity, true);
|2775|    |-				}
|    |2775|+				
|2776|2776| 			},
|2777|2777| 		},
|2778|2778| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2832|2832| 
|2833|2833| 					// Check that we can garrison here
|2834|2834| 					if (this.CanGarrison(target))
|2835|    |-					{
|    |2835|+					
|2836|2836| 						// Check that we're in range of the garrison target
|2837|2837| 						if (this.CheckGarrisonRange(target))
|2838|2838| 						{
|2908|2908| 								return false;
|2909|2909| 							}
|2910|2910| 						}
|2911|    |-					}
|    |2911|+					
|2912|2912| 					// Garrisoning failed for some reason, so finish the order
|2913|2913| 					this.FinishOrder();
|2914|2914| 					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
|3030|3030| 		"Attacked": function(msg) {
|3031|3031| 			if (this.template.NaturalBehaviour == "skittish" ||
|3032|3032| 			    this.template.NaturalBehaviour == "passive")
|3033|    |-			{
|    |3033|+			
|3034|3034| 				this.Flee(msg.data.attacker, false);
|3035|    |-			}
|    |3035|+			
|3036|3036| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3037|3037| 			{
|3038|3038| 				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
|3039|3039| 					this.Attack(msg.data.attacker, false);
|3040|3040| 			}
|3041|3041| 			else if (this.template.NaturalBehaviour == "domestic")
|3042|    |-			{
|    |3042|+			
|3043|3043| 				// Never flee, stop what we were doing
|3044|3044| 				this.SetNextState("IDLE");
|3045|    |-			}
|    |3045|+			
|3046|3046| 		},
|3047|3047| 
|3048|3048| 		"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
|3053|3053| 				this.FinishOrder();
|3054|3054| 				return;
|3055|3055| 			}
|3056|    |-			else
|3057|    |-			{
|    |3056|+			
|3058|3057| 				this.order.data.min = range;
|3059|3058| 				this.SetNextState("WALKING");
|3060|    |-			}
|    |3059|+			
|3061|3060| 		},
|3062|3061| 
|3063|3062| 		"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
|3097|3097| 				}
|3098|3098| 				// Start attacking one of the newly-seen enemy (if any)
|3099|3099| 				else if (this.IsDangerousAnimal())
|3100|    |-				{
|    |3100|+				
|3101|3101| 					this.AttackVisibleEntity(msg.data.added);
|3102|    |-				}
|    |3102|+				
|3103|3103| 
|3104|3104| 				// TODO: if two units enter our range together, we'll attack the
|3105|3105| 				// 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
|3140|3140| 				}
|3141|3141| 				// Start attacking one of the newly-seen enemy (if any)
|3142|3142| 				else if (this.template.NaturalBehaviour == "violent")
|3143|    |-				{
|    |3143|+				
|3144|3144| 					this.AttackVisibleEntity(msg.data.added);
|3145|    |-				}
|    |3145|+				
|3146|3146| 			},
|3147|3147| 
|3148|3148| 			"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
|3155|3155| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3156|3156| 
|3157|3157| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3158|    |-							// only used for domestic animals
|    |3158|+		// only used for domestic animals
|3159|3159| 	},
|3160|3160| };
|3161|3161| 
|    | [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
|3212|3212| 
|3213|3213| UnitAI.prototype.IsAnimal = function()
|3214|3214| {
|3215|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3215|+	return (!!this.template.NaturalBehaviour);
|3216|3216| };
|3217|3217| 
|3218|3218| 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
|3250|3250| UnitAI.prototype.GetGarrisonHolder = function()
|3251|3251| {
|3252|3252| 	if (this.IsGarrisoned())
|3253|    |-	{
|    |3253|+	
|3254|3254| 		for (let order of this.orderQueue)
|3255|3255| 			if (order.type == "Garrison")
|3256|3256| 				return order.data.target;
|3257|    |-	}
|    |3257|+	
|3258|3258| 	return INVALID_ENTITY;
|3259|3259| };
|3260|3260| 
|    | [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
|3328|3328| 		{
|3329|3329| 			let index = this.GetCurrentState().indexOf(".");
|3330|3330| 			if (index != -1)
|3331|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3331|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3332|3332| 			this.Stop(false);
|3333|3333| 		}
|3334|3334| 
|    | [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
|3384|3384| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3385|3385| 			continue;
|3386|3386| 		if (i == 0)
|3387|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3387|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3388|3388| 		else
|3389|3389| 			this.orderQueue.splice(i, 1);
|3390|3390| 		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
|3384|3384| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3385|3385| 			continue;
|3386|3386| 		if (i == 0)
|3387|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3387|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3388|3388| 		else
|3389|3389| 			this.orderQueue.splice(i, 1);
|3390|3390| 		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
|3468|3468| };
|3469|3469| 
|3470|3470| 
|3471|    |-//// FSM linkage functions ////
|    |3471|+// // FSM linkage functions ////
|3472|3472| 
|3473|3473| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3474|3474| 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
|3640|3640| 				continue;
|3641|3641| 			if (this.orderQueue[i].type == type)
|3642|3642| 				continue;
|3643|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3643|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3644|3644| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3645|3645| 			return;
|3646|3646| 		}
|    | [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
|3640|3640| 				continue;
|3641|3641| 			if (this.orderQueue[i].type == type)
|3642|3642| 				continue;
|3643|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3643|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3644|3644| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3645|3645| 			return;
|3646|3646| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3654|3654| {
|3655|3655| 	// Remember the previous work orders to be able to go back to them later if required
|3656|3656| 	if (data && data.force)
|3657|    |-	{
|    |3657|+	
|3658|3658| 		if (this.IsFormationController())
|3659|3659| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3660|3660| 		else
|3661|3661| 			this.UpdateWorkOrders(type);
|3662|    |-	}
|    |3662|+	
|3663|3663| 
|3664|3664| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3665|3665| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3731|3731| 	{
|3732|3732| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3733|3733| 		if (cmpUnitAI)
|3734|    |-		{
|    |3734|+		
|3735|3735| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3736|3736| 			{
|3737|3737| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3740|3740| 					return;
|3741|3741| 				}
|3742|3742| 			}
|3743|    |-		}
|    |3743|+		
|3744|3744| 	}
|3745|3745| 
|3746|3746| 	// 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
|3733|3733| 		if (cmpUnitAI)
|3734|3734| 		{
|3735|3735| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3736|    |-			{
|    |3736|+			
|3737|3737| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3738|3738| 				{
|3739|3739| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3740|3740| 					return;
|3741|3741| 				}
|3742|    |-			}
|    |3742|+			
|3743|3743| 		}
|3744|3744| 	}
|3745|3745| 
|    | [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
|3745|3745| 
|3746|3746| 	// If nothing found, take the unit orders
|3747|3747| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3748|    |-	{
|    |3748|+	
|3749|3749| 		if (isWorkType(this.orderQueue[i].type))
|3750|3750| 		{
|3751|3751| 			this.workOrders = this.orderQueue.slice(i);
|3752|3752| 			return;
|3753|3753| 		}
|3754|    |-	}
|    |3754|+	
|3755|3755| };
|3756|3756| 
|3757|3757| 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
|3811|3811| 	if (data.timerRepeat === undefined)
|3812|3812| 		this.timer = undefined;
|3813|3813| 
|3814|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3814|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3815|3815| };
|3816|3816| 
|3817|3817| /**
|    | [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
|3811|3811| 	if (data.timerRepeat === undefined)
|3812|3812| 		this.timer = undefined;
|3813|3813| 
|3814|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3814|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3815|3815| };
|3816|3816| 
|3817|3817| /**
|    | [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
|3846|3846| 	this.timer = undefined;
|3847|3847| };
|3848|3848| 
|3849|    |-//// Message handlers /////
|    |3849|+// // Message handlers /////
|3850|3850| 
|3851|3851| UnitAI.prototype.OnMotionChanged = function(msg)
|3852|3852| {
|    | [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
|3858|3858| 	// TODO: This is a bit inefficient since every unit listens to every
|3859|3859| 	// construction message - ideally we could scope it to only the one we're building
|3860|3860| 
|3861|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3861|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3862|3862| };
|3863|3863| 
|3864|3864| 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
|3858|3858| 	// TODO: This is a bit inefficient since every unit listens to every
|3859|3859| 	// construction message - ideally we could scope it to only the one we're building
|3860|3860| 
|3861|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3861|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3862|3862| };
|3863|3863| 
|3864|3864| 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
|3883|3883| 
|3884|3884| UnitAI.prototype.OnAttacked = function(msg)
|3885|3885| {
|3886|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3886|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3887|3887| };
|3888|3888| 
|3889|3889| 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
|3883|3883| 
|3884|3884| UnitAI.prototype.OnAttacked = function(msg)
|3885|3885| {
|3886|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3886|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3887|3887| };
|3888|3888| 
|3889|3889| 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
|3888|3888| 
|3889|3889| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3890|3890| {
|3891|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3891|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3892|3892| };
|3893|3893| 
|3894|3894| 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
|3888|3888| 
|3889|3889| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3890|3890| {
|3891|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3891|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3892|3892| };
|3893|3893| 
|3894|3894| 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
|3893|3893| 
|3894|3894| UnitAI.prototype.OnHealthChanged = function(msg)
|3895|3895| {
|3896|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3896|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3897|3897| };
|3898|3898| 
|3899|3899| 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
|3893|3893| 
|3894|3894| UnitAI.prototype.OnHealthChanged = function(msg)
|3895|3895| {
|3896|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3896|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3897|3897| };
|3898|3898| 
|3899|3899| 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
|3899|3899| UnitAI.prototype.OnRangeUpdate = function(msg)
|3900|3900| {
|3901|3901| 	if (msg.tag == this.losRangeQuery)
|3902|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3902|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3903|3903| 	else if (msg.tag == this.losHealRangeQuery)
|3904|3904| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3905|3905| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3899|3899| UnitAI.prototype.OnRangeUpdate = function(msg)
|3900|3900| {
|3901|3901| 	if (msg.tag == this.losRangeQuery)
|3902|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3902|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3903|3903| 	else if (msg.tag == this.losHealRangeQuery)
|3904|3904| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3905|3905| };
|    | [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| 	if (msg.tag == this.losRangeQuery)
|3902|3902| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3903|3903| 	else if (msg.tag == this.losHealRangeQuery)
|3904|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3904|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3905|3905| };
|3906|3906| 
|3907|3907| 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
|3901|3901| 	if (msg.tag == this.losRangeQuery)
|3902|3902| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3903|3903| 	else if (msg.tag == this.losHealRangeQuery)
|3904|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3904|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3905|3905| };
|3906|3906| 
|3907|3907| 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
|3906|3906| 
|3907|3907| UnitAI.prototype.OnPackFinished = function(msg)
|3908|3908| {
|3909|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3909|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3910|3910| };
|3911|3911| 
|3912|3912| //// 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
|3906|3906| 
|3907|3907| UnitAI.prototype.OnPackFinished = function(msg)
|3908|3908| {
|3909|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3909|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3910|3910| };
|3911|3911| 
|3912|3912| //// 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
|3909|3909| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3910|3910| };
|3911|3911| 
|3912|    |-//// Helper functions to be called by the FSM ////
|    |3912|+// // Helper functions to be called by the FSM ////
|3913|3913| 
|3914|3914| UnitAI.prototype.GetWalkSpeed = function()
|3915|3915| {
|    | [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
|4011|4011| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4012|4012| 		return undefined;
|4013|4013| 
|4014|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4014|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4015|4015| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4016|4016| 		return undefined;
|4017|4017| 
|    | [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
|4096|4096| 			PlaySound(name, member);
|4097|4097| 	}
|4098|4098| 	else
|4099|    |-	{
|    |4099|+	
|4100|4100| 		// Otherwise use our own sounds
|4101|4101| 		PlaySound(name, this.entity);
|4102|    |-	}
|    |4102|+	
|4103|4103| };
|4104|4104| 
|4105|4105| /*
|    | [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
|4441|4441| 	if (this.IsFormationMember())
|4442|4442| 	{
|4443|4443| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4444|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4445|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4444|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4445|+			cmpFormationUnitAI.order.data.target == target)
|4446|4446| 			return true;
|4447|4447| 	}
|4448|4448| 
|    | [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
|4501|4501| 	if (this.IsFormationMember())
|4502|4502| 	{
|4503|4503| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4504|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4505|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4504|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4505|+			cmpFormationUnitAI.order.data.target == target)
|4506|4506| 			return true;
|4507|4507| 	}
|4508|4508| 
|    | [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
|4647|4647| UnitAI.prototype.AttackEntityInZone = function(ents)
|4648|4648| {
|4649|4649| 	var target = ents.find(target =>
|4650|    |-		this.CanAttack(target)
|4651|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4650|+		this.CanAttack(target) &&
|    |4651|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4652|4652| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4653|4653| 	);
|4654|4654| 	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
|4648|4648| {
|4649|4649| 	var target = ents.find(target =>
|4650|4650| 		this.CanAttack(target)
|4651|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4652|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4651|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4652|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4653|4653| 	);
|4654|4654| 	if (!target)
|4655|4655| 		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
|4712|4712| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4713|4713| 	if (this.isGuardOf)
|4714|4714| 	{
|4715|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4715|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4716|4716| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4717|4717| 		if (cmpUnitAI && cmpAttack &&
|4718|4718| 		    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
|4716|4716| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4717|4717| 		if (cmpUnitAI && cmpAttack &&
|4718|4718| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4719|    |-				return false;
|    |4719|+			return false;
|4720|4720| 	}
|4721|4721| 
|4722|4722| 	// 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
|4721|4721| 
|4722|4722| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4723|4723| 	if (this.GetStance().respondHoldGround)
|4724|    |-	{
|    |4724|+	
|4725|4725| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4726|4726| 			return true;
|4727|    |-	}
|    |4727|+	
|4728|4728| 
|4729|4729| 	// Stop if it's left our vision range, unless we're especially persistent
|4730|4730| 	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
|4728|4728| 
|4729|4729| 	// Stop if it's left our vision range, unless we're especially persistent
|4730|4730| 	if (!this.GetStance().respondChaseBeyondVision)
|4731|    |-	{
|    |4731|+	
|4732|4732| 		if (!this.CheckTargetIsInVisionRange(target))
|4733|4733| 			return true;
|4734|    |-	}
|    |4734|+	
|4735|4735| 
|4736|4736| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4737|4737| 	// 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
|4755|4755| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4756|4756| 	if (this.isGuardOf)
|4757|4757| 	{
|4758|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4758|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4759|4759| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4760|4760| 		if (cmpUnitAI && cmpAttack &&
|4761|4761| 		    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
|4768|4768| 	return false;
|4769|4769| };
|4770|4770| 
|4771|    |-//// External interface functions ////
|    |4771|+// // External interface functions ////
|4772|4772| 
|4773|4773| UnitAI.prototype.SetFormationController = function(ent)
|4774|4774| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4778|4778| 	// of our own formation (or ourself if not in formation)
|4779|4779| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4780|4780| 	if (cmpObstruction)
|4781|    |-	{
|    |4781|+	
|4782|4782| 		if (ent == INVALID_ENTITY)
|4783|4783| 			cmpObstruction.SetControlGroup(this.entity);
|4784|4784| 		else
|4785|4785| 			cmpObstruction.SetControlGroup(ent);
|4786|    |-	}
|    |4786|+	
|4787|4787| 
|4788|4788| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4789|4789| 	if (ent == INVALID_ENTITY)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4959|4959| 	// if we already had an old guard order, do nothing if the target is the same
|4960|4960| 	// and the order is running, otherwise remove the previous order
|4961|4961| 	if (this.isGuardOf)
|4962|    |-	{
|    |4962|+	
|4963|4963| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4964|4964| 			return;
|4965|4965| 		else
|4966|4966| 			this.RemoveGuard();
|4967|    |-	}
|    |4967|+	
|4968|4968| 
|4969|4969| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4970|4970| };
|    | [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
|4962|4962| 	{
|4963|4963| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4964|4964| 			return;
|4965|    |-		else
|4966|    |-			this.RemoveGuard();
|    |4965|+		this.RemoveGuard();
|4967|4966| 	}
|4968|4967| 
|4969|4968| 	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
|5133|5133| 			this.WalkToTarget(target, queued);
|5134|5134| 		return;
|5135|5135| 	}
|5136|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5136|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5137|5137| };
|5138|5138| 
|5139|5139| /**
|    | [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
|5295|5295| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5296|5296| 	{
|5297|5297| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5298|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5298|+		if (cmpTrader.HasBothMarkets() &&
|5299|5299| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5300|5300| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5301|5301| 		{
|    | [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
|5576|5576| 				{
|5577|5577| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5578|5578| 					var targetClasses = this.order.data.targetClasses;
|5579|    |-					if (targetClasses.attack && cmpIdentity
|5580|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5579|+					if (targetClasses.attack && cmpIdentity &&
|    |5580|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5581|5581| 						continue;
|5582|5582| 					if (targetClasses.avoid && cmpIdentity
|5583|5583| 						&& 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
|5579|5579| 					if (targetClasses.attack && cmpIdentity
|5580|5580| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5581|5581| 						continue;
|5582|    |-					if (targetClasses.avoid && cmpIdentity
|5583|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5582|+					if (targetClasses.avoid && cmpIdentity &&
|    |5583|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5584|5584| 						continue;
|5585|5585| 					// Only used by the AIs to prevent some choices of targets
|5586|5586| 					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
|5602|5602| 		{
|5603|5603| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5604|5604| 			var targetClasses = this.order.data.targetClasses;
|5605|    |-			if (cmpIdentity && targetClasses.attack
|5606|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5605|+			if (cmpIdentity && targetClasses.attack &&
|    |5606|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5607|5607| 				continue;
|5608|5608| 			if (cmpIdentity && targetClasses.avoid
|5609|5609| 				&& 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
|5605|5605| 			if (cmpIdentity && targetClasses.attack
|5606|5606| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5607|5607| 				continue;
|5608|    |-			if (cmpIdentity && targetClasses.avoid
|5609|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5608|+			if (cmpIdentity && targetClasses.avoid &&
|    |5609|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5610|5610| 				continue;
|5611|5611| 			// Only used by the AIs to prevent some choices of targets
|5612|5612| 			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
|5748|5748| 
|5749|5749| UnitAI.prototype.SetHeldPosition = function(x, z)
|5750|5750| {
|5751|    |-	this.heldPosition = {"x": x, "z": z};
|    |5751|+	this.heldPosition = { "x": x, "z": z};
|5752|5752| };
|5753|5753| 
|5754|5754| 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
|5748|5748| 
|5749|5749| UnitAI.prototype.SetHeldPosition = function(x, z)
|5750|5750| {
|5751|    |-	this.heldPosition = {"x": x, "z": z};
|    |5751|+	this.heldPosition = {"x": x, "z": z };
|5752|5752| };
|5753|5753| 
|5754|5754| 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
|5775|5775| 	return false;
|5776|5776| };
|5777|5777| 
|5778|    |-//// Helper functions ////
|    |5778|+// // Helper functions ////
|5779|5779| 
|5780|5780| UnitAI.prototype.CanAttack = function(target)
|5781|5781| {
|    | [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
|5979|5979| 	return cmpPack && cmpPack.IsPacking();
|5980|5980| };
|5981|5981| 
|5982|    |-//// Formation specific functions ////
|    |5982|+// // Formation specific functions ////
|5983|5983| 
|5984|5984| UnitAI.prototype.IsAttackingAsFormation = function()
|5985|5985| {
|    | [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
|5984|5984| UnitAI.prototype.IsAttackingAsFormation = function()
|5985|5985| {
|5986|5986| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5987|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5988|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5987|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5988|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5989|5989| };
|5990|5990| 
|5991|5991| //// 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
|5988|5988| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5989|5989| };
|5990|5990| 
|5991|    |-//// Animal specific functions ////
|    |5991|+// // Animal specific functions ////
|5992|5992| 
|5993|5993| UnitAI.prototype.MoveRandomly = function(distance)
|5994|5994| {

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
| 417| »   »   »   this.IsAnimal()·?·this.SetNextState("ANIMAL.COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 422| »   »   this.IsAnimal()·?·this.SetNextState("ANIMAL.COMBAT.APPROACHING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 719| »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 734| »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

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,·this.order.data.radius,·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
|1122| »   »   »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1139| »   »   »   »   »   »   »   attackGround·?·this.PushOrderFront("AttackGround",·{·"target":·target,·"radius":·this.order.data.radius,·"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
|1168| »   »   »   »   »   »   »   attackGround·?·this.PushOrderFront("AttackGround",·{·"target":·target,·"radius":·this.order.data.radius,"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
|1323| »   »   »   "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
|1506| »   »   »   "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
|1527| »   »   »   "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
|1557| »   »   »   "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
|1712| »   »   »   "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
|1800| »   »   »   »   "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
|1877| »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2060| »   »   »   »   "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
|2150| »   »   »   »   "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
|2319| »   »   »   »   »   »   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
|2374| »   »   »   »   "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
|2492| »   »   »   »   "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
|2557| »   »   »   »   "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
|2597| »   »   »   »   "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
|2801| »   »   »   »   "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
|2985| »   »   »   »   "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
|3716| »   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
|4634| »   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
|4649| »   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
|4695| »   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
|4718| »   »   ····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
|5226| »   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
| 418| »   »   »   »   this.SetNextState("INDIVIDUAL.COMBAT");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 423| »   »   »   this.SetNextState("INDIVIDUAL.COMBAT");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 720| »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 735| »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

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
|1123| »   »   »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4445| »   »   »   &&·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
|4505| »   »   »   &&·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
|4651| »   »   &&·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
|4652| »   »   &&·(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
|5226| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5988| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [MAJOR] JSHintBear:
|    | Too many errors. (97% scanned).
|    | [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
|1061|1061| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1062|1062| 
|1063|1063| 			if (placementSupport.mode === "wall")
|1064|    |-			{
|    |1064|+			
|1065|1065| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1066|1066| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1067|1067| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1068|1068| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1069|    |-			}
|    |1069|+			
|1070|1070| 			else
|1071|1071| 			{
|1072|1072| 				// 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
|1333|1333| 	if (templateData.attack &&
|1334|1334| 		templateData.attack.Ranged &&
|1335|1335| 		templateData.attack.Ranged.maxRange)
|1336|    |-	{
|    |1336|+	
|1337|1337| 		// add attack information to display a good tooltip
|1338|1338| 		placementSupport.attack = templateData.attack;
|1339|    |-	}
|    |1339|+	
|1340|1340| }
|1341|1341| 
|1342|1342| // Attack ground:
|    | [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
|1449|1449| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1450|1450| 	{
|1451|1451| 		if (inputState == INPUT_BATCHTRAINING)
|1452|    |-		{
|    |1452|+		
|1453|1453| 			// Check if we are training in the same building(s) as the last batch
|1454|1454| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1455|1455| 			// If the order changed, we have a new selection and we should create a new batch.
|1482|1482| 			else if (!decrement)
|1483|1483| 				flushTrainingBatch();
|1484|1484| 				// fall through to create the new batch
|1485|    |-		}
|    |1485|+		
|1486|1486| 
|1487|1487| 		// Don't start a new batch if decrementing or unable to afford it.
|1488|1488| 		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
|1481|1481| 			// Otherwise start a new one
|1482|1482| 			else if (!decrement)
|1483|1483| 				flushTrainingBatch();
|1484|    |-				// fall through to create the new batch
|    |1484|+			// fall through to create the new batch
|1485|1485| 		}
|1486|1486| 
|1487|1487| 		// 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
|1559|1559| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1560|1560| 	{
|1561|1561| 		// Train as many full batches as we can
|1562|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1562|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1563|1563| 		Engine.PostNetworkCommand({
|1564|1564| 			"type": "train",
|1565|1565| 			"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
|1638|1638| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1639|1639| 
|1640|1640| 	// Reset the last idle unit, etc., if the selection type has changed.
|1641|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1641|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1642|1642| 		resetIdleUnit();
|1643|1643| 	lastIdleClasses = classes;
|1644|1644| 

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
| 905| »   »   »   »   »   action.radius·=·g_AttackGroundSize;
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

binaries/data/mods/public/gui/session/input.js
| 925| »   »   »   »   warn("Called·down!·"·+·uneval(g_AttackGroundSize));
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

binaries/data/mods/public/gui/session/input.js
| 930| »   »   »   »   warn("Called·up!·"·+·uneval(g_AttackGroundSize));
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

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

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

binaries/data/mods/public/gui/session/input.js
|1048| »   »   »   »   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
|1057| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

binaries/data/mods/public/gui/session/input.js
|1589| »   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
| 919| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

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

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

binaries/data/mods/public/gui/session/input.js
|1344| var·g_AttackGroundSize·=·getDefaultAttackGroundSize();
|    | [NORMAL] JSHintBear:
|    | 'g_AttackGroundSize' was used before it was defined.
|    | [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 the first entity we build must be a tower)
|1285|1285| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1286|    |-		{
|    |1286|+		
|1287|1287| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1288|1288| 			{
|1289|1289|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1290|1290|     			break;
|1291|1291| 			}
|1292|    |-		}
|    |1292|+		
|1293|1293| 
|1294|1294| 		var constructPieceCmd = {
|1295|1295| 			"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
|1330|1330| 
|1331|1331| 				if (i > 0)
|1332|1332| 				{
|1333|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1333|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1334|1334| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1335|1335| 					// TODO: ensure that cmpPreviousObstruction exists
|1336|1336| 					// 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
|1388|1388| 		}
|1389|1389| 
|1390|1390| 		if (piece.template == cmd.wallSet.templates.tower)
|1391|    |-		{
|    |1391|+		
|1392|1392| 			// encountered a tower entity, update the last tower control group
|1393|1393| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1394|    |-		}
|    |1394|+		
|1395|1395| 		else
|1396|1396| 		{
|1397|1397| 			// 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
|1402|1402| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1403|1403| 			{
|1404|1404| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1405|    |-				{
|    |1405|+				
|1406|1406| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1407|    |-				}
|    |1407|+				
|1408|1408| 			}
|1409|1409| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1410|1410| 			{
|    | [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
|1477|1477| 	}
|1478|1478| 
|1479|1479| 	if (formedEnts.length == 0)
|1480|    |-	{
|    |1480|+	
|1481|1481| 		// No units support the formation - return all the others
|1482|1482| 		return nonformedUnitAIs;
|1483|    |-	}
|    |1483|+	
|1484|1484| 
|1485|1485| 	// Find what formations the formationable selected entities are currently in
|1486|1486| 	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
|1493|1493| 		// Check that all its members are selected
|1494|1494| 		var fid = formationIds[0];
|1495|1495| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1496|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1497|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1496|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1497|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1498|1498| 		{
|1499|1499| 			cmpFormation.DeleteTwinFormations();
|1500|1500| 			// 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
|1525|1525| 					{
|1526|1526| 						var template = cmpUnitAI.GetFormationTemplate();
|1527|1527| 						if (lastFormationTemplate === undefined)
|1528|    |-						{
|    |1528|+						
|1529|1529| 							lastFormationTemplate = template;
|1530|    |-						}
|    |1530|+						
|1531|1531| 						else if (lastFormationTemplate != template)
|1532|1532| 						{
|1533|1533| 							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
|1601|1601| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1602|1602| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1603|1603| 				if (matrix[i][j] < distSq)
|1604|    |-					closeClusters = [i,j];
|    |1604|+					closeClusters = [i, j];
|1605|1605| 
|1606|1606| 		// if no more close clusters found, just return all found clusters so far
|1607|1607| 		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
|1623|1623| 		}
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|    |-		clusters.splice(closeClusters[0],1);
|    |1626|+		clusters.splice(closeClusters[0], 1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		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
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|    |-		clusters.splice(closeClusters[1],1);
|    |1627|+		clusters.splice(closeClusters[1], 1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		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
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|    |-		matrix.splice(closeClusters[0],1);
|    |1628|+		matrix.splice(closeClusters[0], 1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|    | [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| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|    |-		matrix.splice(closeClusters[1],1);
|    |1629|+		matrix.splice(closeClusters[1], 1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			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
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|    |-				matrix[i].splice(closeClusters[0],1);
|    |1633|+				matrix[i].splice(closeClusters[0], 1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|1635| 				matrix[i].splice(closeClusters[1],1);
|1636|1636| 		}
|    | [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| 			if (matrix[i].length > closeClusters[0])
|1633|1633| 				matrix[i].splice(closeClusters[0],1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|    |-				matrix[i].splice(closeClusters[1],1);
|    |1635|+				matrix[i].splice(closeClusters[1], 1);
|1636|1636| 		}
|1637|1637| 		// add a new row of distances to the matrix and the new cluster
|1638|1638| 		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
| 804| »   »   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
|1289| ····»   »   »   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
|1290| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1520| »   »   »   »   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
|1599| »   »   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
|1616| »   »   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
|1630| »   »   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
| 556| »   »   »   »   ····&&·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
| 744| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1497| »   »   »   &&·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
|1523| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   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/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| 
Executing section cli...

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

Stan added inline comments.Jun 23 2019, 8:31 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1194–1205

Here and below, maybe split the object across multiple lines ?

1234–1245

maybe split the object across multiple lines ?

I think some changes I made in this diff should be moved to seperate minor diffs:

  • GetTargetPosition2D/3D-functions.
  • FaceTowardsTarget to be like in D1958.
  • Formation target/move ranges seperated from the normal function calls.

What do you think, @Stan, @wraitii?

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

|| AttackGround

Stan added a comment.Jun 24 2019, 5:39 PM

Well it's up to wraitii to review those, so I guess up to him then.

Freagarach added a comment.EditedJun 24 2019, 7:01 PM

Also, there are quite a few lines of these:

let attackGround = target instanceof Vector3D;
	if (!attackGround)

Would it not be better to instead check for what it *should* be? So typeof target == "number" -> do entity-related stuff.
This would also circumvent the problem that during saving/loading the fact that the target is a Vector3D is lost.

Freagarach updated this revision to Diff 8599.Jun 24 2019, 8:40 PM
Freagarach marked 2 inline comments as done.
Freagarach retitled this revision from Support for attack-ground for ranged units. to Support attack-ground for ranged units..
  • Some target instanceof Vector3D -> `typeof target == "number".
  • Some objects split over multiple lines in "UnitAI.js".

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.",

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/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
| 112| 112| 
| 113| 113| 	// Do this first in case the direct hit kills the target
| 114| 114| 	if (data.isSplash)
| 115|    |-	{
|    | 115|+	
| 116| 116| 		this.CauseSplashDamage({
| 117| 117| 			"attacker": data.attacker,
| 118| 118| 			"origin": Vector2D.from3D(data.position),
| 125| 125| 			"type": data.type,
| 126| 126| 			"attackerOwner": data.attackerOwner
| 127| 127| 		});
| 128|    |-	}
|    | 128|+	
| 129| 129| 
| 130| 130| 	let cmpProjectileManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ProjectileManager);
| 131| 131| 
|    | [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
| 224| 224| 				damageMultiplier = 0;
| 225| 225| 		}
| 226| 226| 		else // In case someone calls this function with an invalid shape.
| 227|    |-		{
|    | 227|+		
| 228| 228| 			warn("The " + data.shape + " splash damage shape is not implemented!");
| 229|    |-		}
|    | 229|+		
| 230| 230| 
| 231| 231| 		if (data.splashBonus)
| 232| 232| 			damageMultiplier *= GetDamageBonus(data.attacker, ent, data.type, data.splashBonus);
|    | [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
| 545| 545| 
| 546| 546| 		let horizSpeed = +this.template[type].Projectile.Speed;
| 547| 547| 		let gravity = +this.template[type].Projectile.Gravity;
| 548|    |-		//horizSpeed /= 2; gravity /= 2; // slow it down for testing
|    | 548|+		// horizSpeed /= 2; gravity /= 2; // slow it down for testing
| 549| 549| 
| 550| 550| 		let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 551| 551| 		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
| 599| 599| 		// TODO: Use unit rotation to implement x/z offsets.
| 600| 600| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 601| 601| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 602|    |-		
|    | 602|+
| 603| 603| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 604| 604| 		if (cmpVisual)
| 605| 605| 		{
|    | [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
| 671| 671| 			});
| 672| 672| 	}
| 673| 673| 	else
| 674|    |-	{
|    | 674|+	
| 675| 675| 		// Melee attack - hurt the target immediately
| 676| 676| 		cmpDamage.CauseDamage({
| 677| 677| 			"strengths": this.GetAttackStrengths(type),
| 681| 681| 			"type": type,
| 682| 682| 			"attackerOwner": attackerOwner
| 683| 683| 		});
| 684|    |-	}
|    | 684|+	
| 685| 685| };
| 686| 686| 
| 687| 687| /**

binaries/data/mods/public/simulation/components/Attack.js
| 535| ·»   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
| 646| »   »   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/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 the first entity we build must be a tower)
|1285|1285| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1286|    |-		{
|    |1286|+		
|1287|1287| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1288|1288| 			{
|1289|1289|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1290|1290|     			break;
|1291|1291| 			}
|1292|    |-		}
|    |1292|+		
|1293|1293| 
|1294|1294| 		var constructPieceCmd = {
|1295|1295| 			"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
|1330|1330| 
|1331|1331| 				if (i > 0)
|1332|1332| 				{
|1333|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1333|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1334|1334| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1335|1335| 					// TODO: ensure that cmpPreviousObstruction exists
|1336|1336| 					// 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
|1388|1388| 		}
|1389|1389| 
|1390|1390| 		if (piece.template == cmd.wallSet.templates.tower)
|1391|    |-		{
|    |1391|+		
|1392|1392| 			// encountered a tower entity, update the last tower control group
|1393|1393| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1394|    |-		}
|    |1394|+		
|1395|1395| 		else
|1396|1396| 		{
|1397|1397| 			// 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
|1402|1402| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1403|1403| 			{
|1404|1404| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1405|    |-				{
|    |1405|+				
|1406|1406| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1407|    |-				}
|    |1407|+				
|1408|1408| 			}
|1409|1409| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1410|1410| 			{
|    | [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
|1477|1477| 	}
|1478|1478| 
|1479|1479| 	if (formedEnts.length == 0)
|1480|    |-	{
|    |1480|+	
|1481|1481| 		// No units support the formation - return all the others
|1482|1482| 		return nonformedUnitAIs;
|1483|    |-	}
|    |1483|+	
|1484|1484| 
|1485|1485| 	// Find what formations the formationable selected entities are currently in
|1486|1486| 	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
|1493|1493| 		// Check that all its members are selected
|1494|1494| 		var fid = formationIds[0];
|1495|1495| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1496|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1497|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1496|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1497|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1498|1498| 		{
|1499|1499| 			cmpFormation.DeleteTwinFormations();
|1500|1500| 			// 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
|1525|1525| 					{
|1526|1526| 						var template = cmpUnitAI.GetFormationTemplate();
|1527|1527| 						if (lastFormationTemplate === undefined)
|1528|    |-						{
|    |1528|+						
|1529|1529| 							lastFormationTemplate = template;
|1530|    |-						}
|    |1530|+						
|1531|1531| 						else if (lastFormationTemplate != template)
|1532|1532| 						{
|1533|1533| 							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
|1601|1601| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1602|1602| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1603|1603| 				if (matrix[i][j] < distSq)
|1604|    |-					closeClusters = [i,j];
|    |1604|+					closeClusters = [i, j];
|1605|1605| 
|1606|1606| 		// if no more close clusters found, just return all found clusters so far
|1607|1607| 		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
|1623|1623| 		}
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|    |-		clusters.splice(closeClusters[0],1);
|    |1626|+		clusters.splice(closeClusters[0], 1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		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
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|    |-		clusters.splice(closeClusters[1],1);
|    |1627|+		clusters.splice(closeClusters[1], 1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		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
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|    |-		matrix.splice(closeClusters[0],1);
|    |1628|+		matrix.splice(closeClusters[0], 1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|    | [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| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|    |-		matrix.splice(closeClusters[1],1);
|    |1629|+		matrix.splice(closeClusters[1], 1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			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
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|    |-				matrix[i].splice(closeClusters[0],1);
|    |1633|+				matrix[i].splice(closeClusters[0], 1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|1635| 				matrix[i].splice(closeClusters[1],1);
|1636|1636| 		}
|    | [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| 			if (matrix[i].length > closeClusters[0])
|1633|1633| 				matrix[i].splice(closeClusters[0],1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|    |-				matrix[i].splice(closeClusters[1],1);
|    |1635|+				matrix[i].splice(closeClusters[1], 1);
|1636|1636| 		}
|1637|1637| 		// add a new row of distances to the matrix and the new cluster
|1638|1638| 		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
| 804| »   »   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
|1289| ····»   »   »   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
|1290| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1520| »   »   »   »   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
|1599| »   »   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
|1616| »   »   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
|1630| »   »   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
| 556| »   »   »   »   ····&&·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
| 744| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1497| »   »   »   &&·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
|1523| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   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
|1061|1061| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1062|1062| 
|1063|1063| 			if (placementSupport.mode === "wall")
|1064|    |-			{
|    |1064|+			
|1065|1065| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1066|1066| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1067|1067| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1068|1068| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1069|    |-			}
|    |1069|+			
|1070|1070| 			else
|1071|1071| 			{
|1072|1072| 				// 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
|1333|1333| 	if (templateData.attack &&
|1334|1334| 		templateData.attack.Ranged &&
|1335|1335| 		templateData.attack.Ranged.maxRange)
|1336|    |-	{
|    |1336|+	
|1337|1337| 		// add attack information to display a good tooltip
|1338|1338| 		placementSupport.attack = templateData.attack;
|1339|    |-	}
|    |1339|+	
|1340|1340| }
|1341|1341| 
|1342|1342| // Attack ground:
|    | [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
|1449|1449| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1450|1450| 	{
|1451|1451| 		if (inputState == INPUT_BATCHTRAINING)
|1452|    |-		{
|    |1452|+		
|1453|1453| 			// Check if we are training in the same building(s) as the last batch
|1454|1454| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1455|1455| 			// If the order changed, we have a new selection and we should create a new batch.
|1482|1482| 			else if (!decrement)
|1483|1483| 				flushTrainingBatch();
|1484|1484| 				// fall through to create the new batch
|1485|    |-		}
|    |1485|+		
|1486|1486| 
|1487|1487| 		// Don't start a new batch if decrementing or unable to afford it.
|1488|1488| 		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
|1481|1481| 			// Otherwise start a new one
|1482|1482| 			else if (!decrement)
|1483|1483| 				flushTrainingBatch();
|1484|    |-				// fall through to create the new batch
|    |1484|+			// fall through to create the new batch
|1485|1485| 		}
|1486|1486| 
|1487|1487| 		// 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
|1559|1559| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1560|1560| 	{
|1561|1561| 		// Train as many full batches as we can
|1562|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1562|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1563|1563| 		Engine.PostNetworkCommand({
|1564|1564| 			"type": "train",
|1565|1565| 			"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
|1638|1638| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1639|1639| 
|1640|1640| 	// Reset the last idle unit, etc., if the selection type has changed.
|1641|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1641|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1642|1642| 		resetIdleUnit();
|1643|1643| 	lastIdleClasses = classes;
|1644|1644| 

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
| 905| »   »   »   »   »   action.radius·=·g_AttackGroundSize;
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

binaries/data/mods/public/gui/session/input.js
| 925| »   »   »   »   warn("Called·down!·"·+·uneval(g_AttackGroundSize));
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

binaries/data/mods/public/gui/session/input.js
| 930| »   »   »   »   warn("Called·up!·"·+·uneval(g_AttackGroundSize));
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

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

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

binaries/data/mods/public/gui/session/input.js
|1048| »   »   »   »   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
|1057| »   »   switch·(ev.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.

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

binaries/data/mods/public/gui/session/input.js
|1589| »   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
| 919| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Expected a 'break' statement before 'case'.

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

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

binaries/data/mods/public/gui/session/input.js
|1344| var·g_AttackGroundSize·=·getDefaultAttackGroundSize();
|    | [NORMAL] JSHintBear:
|    | 'g_AttackGroundSize' was used before it was 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
| 515| 515| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 516| 516| 				}
| 517| 517| 				else
| 518|    |-				{
|    | 518|+				
| 519| 519| 					// We couldn't move there, or the target moved away
| 520| 520| 					this.FinishOrder();
| 521|    |-				}
|    | 521|+				
| 522| 522| 				return;
| 523| 523| 			}
| 524| 524| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/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 (indent):
|    | Expected indentation of 8 tabs but found 10.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1137|1137| 						{
|1138|1138| 							this.FinishOrder();
|1139|1139| 							attackEntity ? this.PushOrderFront("Attack", {
|1140|    |-										"target": target,
|    |1140|+								"target": target,
|1141|1141| 										"force": false,
|1142|1142| 										"allowCapture": allowCapture
|1143|1143| 									}) :
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 10.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1138|1138| 							this.FinishOrder();
|1139|1139| 							attackEntity ? this.PushOrderFront("Attack", {
|1140|1140| 										"target": target,
|1141|    |-										"force": false,
|    |1141|+								"force": false,
|1142|1142| 										"allowCapture": allowCapture
|1143|1143| 									}) :
|1144|1144| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 10.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1139|1139| 							attackEntity ? this.PushOrderFront("Attack", {
|1140|1140| 										"target": target,
|1141|1141| 										"force": false,
|1142|    |-										"allowCapture": allowCapture
|    |1142|+								"allowCapture": allowCapture
|1143|1143| 									}) :
|1144|1144| 								this.PushOrderFront("AttackGround", {
|1145|1145| 									"target": target,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 9.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1140|1140| 										"target": target,
|1141|1141| 										"force": false,
|1142|1142| 										"allowCapture": allowCapture
|1143|    |-									}) :
|    |1143|+							}) :
|1144|1144| 								this.PushOrderFront("AttackGround", {
|1145|1145| 									"target": target,
|1146|1146| 									"radius": this.order.data.radius,
|    | [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
|1174|1174| 						{
|1175|1175| 							this.FinishOrder();
|1176|1176| 							attackEntity ? this.PushOrderFront("Attack", { "target": target, "force": false, "allowCapture": allowCapture }) :
|1177|    |-								this.PushOrderFront("AttackGround", { "target": target, "radius": this.order.data.radius,"force": false });
|    |1177|+								this.PushOrderFront("AttackGround", { "target": target, "radius": this.order.data.radius, "force": false });
|1178|1178| 							return;
|1179|1179| 						}
|1180|1180| 						this.FinishOrder();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1238|1238| 			// If the controller handled an order but some members rejected it,
|1239|1239| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1240|1240| 			if (this.orderQueue.length)
|1241|    |-			{
|    |1241|+			
|1242|1242| 				// We're leaving the formation, so stop our FormationWalk order
|1243|1243| 				if (this.FinishOrder())
|1244|1244| 					return;
|1245|    |-			}
|    |1245|+			
|1246|1246| 
|1247|1247| 			// No orders left, we're an individual now
|1248|1248| 			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
|1266|1266| 			// Move a tile outside the building
|1267|1267| 			let range = 4;
|1268|1268| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1269|    |-			{
|    |1269|+			
|1270|1270| 				// We are already at the target, or can't move at all
|1271|1271| 				this.FinishOrder();
|1272|    |-			}
|    |1272|+			
|1273|1273| 			else
|1274|1274| 			{
|1275|1275| 				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
|1487|1487| 
|1488|1488| 			"LosRangeUpdate": function(msg) {
|1489|1489| 				if (this.GetStance().targetVisibleEnemies)
|1490|    |-				{
|    |1490|+				
|1491|1491| 					// Start attacking one of the newly-seen enemy (if any)
|1492|1492| 					this.AttackEntitiesByPreference(msg.data.added);
|1493|    |-				}
|    |1493|+				
|1494|1494| 			},
|1495|1495| 
|1496|1496| 			"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
|1520|1520| 				this.SelectAnimation("move");
|1521|1521| 			},
|1522|1522| 
|1523|    |-			"leave": function () {
|    |1523|+			"leave": function() {
|1524|1524| 				this.SelectAnimation("idle");
|1525|1525| 				this.StopMoving();
|1526|1526| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1700|1700| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1701|1701| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1702|1702| 						if (cmpHealth && cmpHealth.IsInjured())
|1703|    |-						{
|    |1703|+						
|1704|1704| 							if (this.CanHeal(this.isGuardOf))
|1705|1705| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1706|1706| 							else if (this.CanRepair(this.isGuardOf))
|1707|1707| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1708|    |-						}
|    |1708|+						
|1709|1709| 					}
|1710|1710| 				},
|1711|1711| 
|    | [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
|1916|1916| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1917|1917| 
|1918|1918| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1919|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1919|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1920|1920| 
|1921|1921| 					this.FaceTowardsTarget(this.order.data.target);
|1922|1922| 
|    | [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
|2058|2058| 
|2059|2059| 				"Attacked": function(msg) {
|2060|2060| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2061|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2062|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2061|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2062|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2063|2063| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2064|2064| 				},
|2065|2065| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2078|2078| 					this.SelectAnimation("move");
|2079|2079| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2080|2080| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2081|    |-					{
|    |2081|+					
|2082|2082| 						// Run after a fleeing target
|2083|2083| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2084|    |-					}
|    |2084|+					
|2085|2085| 					this.StartTimer(1000, 1000);
|2086|2086| 				},
|2087|2087| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2260|2260| 
|2261|2261| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2262|2262| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2263|    |-					{
|    |2263|+					
|2264|2264| 						// Check we can still reach and gather from the target
|2265|2265| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2266|2266| 						{
|2311|2311| 								return;
|2312|2312| 							}
|2313|2313| 						}
|2314|    |-					}
|    |2314|+					
|2315|2315| 
|2316|2316| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2317|2317| 
|    | [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
|2303|2303| 								return;
|2304|2304| 						}
|2305|2305| 						else
|2306|    |-						{
|    |2306|+						
|2307|2307| 							// Try to follow the target
|2308|2308| 							if (this.MoveToTargetRange(this.gatheringTarget, IID_ResourceGatherer))
|2309|2309| 							{
|2310|2310| 								this.SetNextState("APPROACHING");
|2311|2311| 								return;
|2312|2312| 							}
|2313|    |-						}
|    |2313|+						
|2314|2314| 					}
|2315|2315| 
|2316|2316| 					// 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
|2337|2337| 					// Also don't switch to a different type of huntable animal
|2338|2338| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2339|2339| 						return (
|2340|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2341|    |-							|| (type.specific == resourceType.specific
|    |2340|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2341|+							(type.specific == resourceType.specific
|2342|2342| 							&& (type.specific != "meat" || resourceTemplate == template))
|2343|2343| 						);
|2344|2344| 					});
|    | [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
|2338|2338| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2339|2339| 						return (
|2340|2340| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2341|    |-							|| (type.specific == resourceType.specific
|2342|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2341|+							|| (type.specific == resourceType.specific &&
|    |2342|+							(type.specific != "meat" || resourceTemplate == template))
|2343|2343| 						);
|2344|2344| 					});
|2345|2345| 					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
|2403|2403| 
|2404|2404| 				"Timer": function(msg) {
|2405|2405| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2406|    |-					{
|    |2406|+					
|2407|2407| 						// Return to our original position unless we have a better order.
|2408|2408| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2409|2409| 							this.WalkToHeldPosition();
|2410|    |-					}
|    |2410|+					
|2411|2411| 				},
|2412|2412| 
|2413|2413| 				"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
|2437|2437| 					this.StartTimer(prepare, this.healTimers.repeat);
|2438|2438| 
|2439|2439| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2440|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2440|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2441|2441| 
|2442|2442| 					this.FaceTowardsTarget(this.order.data.target);
|2443|2443| 				},
|    | [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
|2650|2650| 					{
|2651|2651| 						// The building was already finished/fully repaired before we arrived;
|2652|2652| 						// let the ConstructionFinished handler handle this.
|2653|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2653|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2654|2654| 						return true;
|2655|2655| 					}
|2656|2656| 
|    | [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
|2650|2650| 					{
|2651|2651| 						// The building was already finished/fully repaired before we arrived;
|2652|2652| 						// let the ConstructionFinished handler handle this.
|2653|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2653|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2654|2654| 						return true;
|2655|2655| 					}
|2656|2656| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2777|2777| 
|2778|2778| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2779|2779| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2780|    |-				{
|    |2780|+				
|2781|2781| 					// We're already walking to the given point, so add this as a order.
|2782|2782| 					this.WalkToTarget(msg.data.newentity, true);
|2783|    |-				}
|    |2783|+				
|2784|2784| 			},
|2785|2785| 		},
|2786|2786| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/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| 					// Check that we can garrison here
|2842|2842| 					if (this.CanGarrison(target))
|2843|    |-					{
|    |2843|+					
|2844|2844| 						// Check that we're in range of the garrison target
|2845|2845| 						if (this.CheckGarrisonRange(target))
|2846|2846| 						{
|2916|2916| 								return false;
|2917|2917| 							}
|2918|2918| 						}
|2919|    |-					}
|    |2919|+					
|2920|2920| 					// Garrisoning failed for some reason, so finish the order
|2921|2921| 					this.FinishOrder();
|2922|2922| 					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
|3038|3038| 		"Attacked": function(msg) {
|3039|3039| 			if (this.template.NaturalBehaviour == "skittish" ||
|3040|3040| 			    this.template.NaturalBehaviour == "passive")
|3041|    |-			{
|    |3041|+			
|3042|3042| 				this.Flee(msg.data.attacker, false);
|3043|    |-			}
|    |3043|+			
|3044|3044| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3045|3045| 			{
|3046|3046| 				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
|3047|3047| 					this.Attack(msg.data.attacker, false);
|3048|3048| 			}
|3049|3049| 			else if (this.template.NaturalBehaviour == "domestic")
|3050|    |-			{
|    |3050|+			
|3051|3051| 				// Never flee, stop what we were doing
|3052|3052| 				this.SetNextState("IDLE");
|3053|    |-			}
|    |3053|+			
|3054|3054| 		},
|3055|3055| 
|3056|3056| 		"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
|3061|3061| 				this.FinishOrder();
|3062|3062| 				return;
|3063|3063| 			}
|3064|    |-			else
|3065|    |-			{
|    |3064|+			
|3066|3065| 				this.order.data.min = range;
|3067|3066| 				this.SetNextState("WALKING");
|3068|    |-			}
|    |3067|+			
|3069|3068| 		},
|3070|3069| 
|3071|3070| 		"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
|3105|3105| 				}
|3106|3106| 				// Start attacking one of the newly-seen enemy (if any)
|3107|3107| 				else if (this.IsDangerousAnimal())
|3108|    |-				{
|    |3108|+				
|3109|3109| 					this.AttackVisibleEntity(msg.data.added);
|3110|    |-				}
|    |3110|+				
|3111|3111| 
|3112|3112| 				// TODO: if two units enter our range together, we'll attack the
|3113|3113| 				// 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
|3148|3148| 				}
|3149|3149| 				// Start attacking one of the newly-seen enemy (if any)
|3150|3150| 				else if (this.template.NaturalBehaviour == "violent")
|3151|    |-				{
|    |3151|+				
|3152|3152| 					this.AttackVisibleEntity(msg.data.added);
|3153|    |-				}
|    |3153|+				
|3154|3154| 			},
|3155|3155| 
|3156|3156| 			"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
|3163|3163| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3164|3164| 
|3165|3165| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3166|    |-							// only used for domestic animals
|    |3166|+		// only used for domestic animals
|3167|3167| 	},
|3168|3168| };
|3169|3169| 
|    | [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
|3220|3220| 
|3221|3221| UnitAI.prototype.IsAnimal = function()
|3222|3222| {
|3223|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3223|+	return (!!this.template.NaturalBehaviour);
|3224|3224| };
|3225|3225| 
|3226|3226| 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
|3258|3258| UnitAI.prototype.GetGarrisonHolder = function()
|3259|3259| {
|3260|3260| 	if (this.IsGarrisoned())
|3261|    |-	{
|    |3261|+	
|3262|3262| 		for (let order of this.orderQueue)
|3263|3263| 			if (order.type == "Garrison")
|3264|3264| 				return order.data.target;
|3265|    |-	}
|    |3265|+	
|3266|3266| 	return INVALID_ENTITY;
|3267|3267| };
|3268|3268| 
|    | [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
|3336|3336| 		{
|3337|3337| 			let index = this.GetCurrentState().indexOf(".");
|3338|3338| 			if (index != -1)
|3339|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3339|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3340|3340| 			this.Stop(false);
|3341|3341| 		}
|3342|3342| 
|    | [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
|3392|3392| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3393|3393| 			continue;
|3394|3394| 		if (i == 0)
|3395|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3395|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3396|3396| 		else
|3397|3397| 			this.orderQueue.splice(i, 1);
|3398|3398| 		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
|3392|3392| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3393|3393| 			continue;
|3394|3394| 		if (i == 0)
|3395|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3395|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3396|3396| 		else
|3397|3397| 			this.orderQueue.splice(i, 1);
|3398|3398| 		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
|3476|3476| };
|3477|3477| 
|3478|3478| 
|3479|    |-//// FSM linkage functions ////
|    |3479|+// // FSM linkage functions ////
|3480|3480| 
|3481|3481| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3482|3482| 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
|3648|3648| 				continue;
|3649|3649| 			if (this.orderQueue[i].type == type)
|3650|3650| 				continue;
|3651|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3651|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3652|3652| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3653|3653| 			return;
|3654|3654| 		}
|    | [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
|3648|3648| 				continue;
|3649|3649| 			if (this.orderQueue[i].type == type)
|3650|3650| 				continue;
|3651|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3651|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3652|3652| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3653|3653| 			return;
|3654|3654| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3662|3662| {
|3663|3663| 	// Remember the previous work orders to be able to go back to them later if required
|3664|3664| 	if (data && data.force)
|3665|    |-	{
|    |3665|+	
|3666|3666| 		if (this.IsFormationController())
|3667|3667| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3668|3668| 		else
|3669|3669| 			this.UpdateWorkOrders(type);
|3670|    |-	}
|    |3670|+	
|3671|3671| 
|3672|3672| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3673|3673| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3739|3739| 	{
|3740|3740| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3741|3741| 		if (cmpUnitAI)
|3742|    |-		{
|    |3742|+		
|3743|3743| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3744|3744| 			{
|3745|3745| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3748|3748| 					return;
|3749|3749| 				}
|3750|3750| 			}
|3751|    |-		}
|    |3751|+		
|3752|3752| 	}
|3753|3753| 
|3754|3754| 	// 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
|3741|3741| 		if (cmpUnitAI)
|3742|3742| 		{
|3743|3743| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3744|    |-			{
|    |3744|+			
|3745|3745| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3746|3746| 				{
|3747|3747| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3748|3748| 					return;
|3749|3749| 				}
|3750|    |-			}
|    |3750|+			
|3751|3751| 		}
|3752|3752| 	}
|3753|3753| 
|    | [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
|3753|3753| 
|3754|3754| 	// If nothing found, take the unit orders
|3755|3755| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3756|    |-	{
|    |3756|+	
|3757|3757| 		if (isWorkType(this.orderQueue[i].type))
|3758|3758| 		{
|3759|3759| 			this.workOrders = this.orderQueue.slice(i);
|3760|3760| 			return;
|3761|3761| 		}
|3762|    |-	}
|    |3762|+	
|3763|3763| };
|3764|3764| 
|3765|3765| 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
|3819|3819| 	if (data.timerRepeat === undefined)
|3820|3820| 		this.timer = undefined;
|3821|3821| 
|3822|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3822|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3823|3823| };
|3824|3824| 
|3825|3825| /**
|    | [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
|3819|3819| 	if (data.timerRepeat === undefined)
|3820|3820| 		this.timer = undefined;
|3821|3821| 
|3822|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3822|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3823|3823| };
|3824|3824| 
|3825|3825| /**
|    | [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
|3854|3854| 	this.timer = undefined;
|3855|3855| };
|3856|3856| 
|3857|    |-//// Message handlers /////
|    |3857|+// // Message handlers /////
|3858|3858| 
|3859|3859| UnitAI.prototype.OnMotionChanged = function(msg)
|3860|3860| {
|    | [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
|3866|3866| 	// TODO: This is a bit inefficient since every unit listens to every
|3867|3867| 	// construction message - ideally we could scope it to only the one we're building
|3868|3868| 
|3869|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3869|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3870|3870| };
|3871|3871| 
|3872|3872| 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
|3866|3866| 	// TODO: This is a bit inefficient since every unit listens to every
|3867|3867| 	// construction message - ideally we could scope it to only the one we're building
|3868|3868| 
|3869|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3869|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3870|3870| };
|3871|3871| 
|3872|3872| 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
|3891|3891| 
|3892|3892| UnitAI.prototype.OnAttacked = function(msg)
|3893|3893| {
|3894|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3894|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3895|3895| };
|3896|3896| 
|3897|3897| 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
|3891|3891| 
|3892|3892| UnitAI.prototype.OnAttacked = function(msg)
|3893|3893| {
|3894|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3894|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3895|3895| };
|3896|3896| 
|3897|3897| 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
|3896|3896| 
|3897|3897| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3898|3898| {
|3899|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3899|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3900|3900| };
|3901|3901| 
|3902|3902| 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
|3896|3896| 
|3897|3897| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3898|3898| {
|3899|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3899|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3900|3900| };
|3901|3901| 
|3902|3902| 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
|3901|3901| 
|3902|3902| UnitAI.prototype.OnHealthChanged = function(msg)
|3903|3903| {
|3904|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3904|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3905|3905| };
|3906|3906| 
|3907|3907| 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
|3901|3901| 
|3902|3902| UnitAI.prototype.OnHealthChanged = function(msg)
|3903|3903| {
|3904|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3904|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3905|3905| };
|3906|3906| 
|3907|3907| 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
|3907|3907| UnitAI.prototype.OnRangeUpdate = function(msg)
|3908|3908| {
|3909|3909| 	if (msg.tag == this.losRangeQuery)
|3910|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3910|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3911|3911| 	else if (msg.tag == this.losHealRangeQuery)
|3912|3912| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3913|3913| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3907|3907| UnitAI.prototype.OnRangeUpdate = function(msg)
|3908|3908| {
|3909|3909| 	if (msg.tag == this.losRangeQuery)
|3910|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3910|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3911|3911| 	else if (msg.tag == this.losHealRangeQuery)
|3912|3912| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3913|3913| };
|    | [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
|3909|3909| 	if (msg.tag == this.losRangeQuery)
|3910|3910| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3911|3911| 	else if (msg.tag == this.losHealRangeQuery)
|3912|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3912|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3913|3913| };
|3914|3914| 
|3915|3915| 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
|3909|3909| 	if (msg.tag == this.losRangeQuery)
|3910|3910| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3911|3911| 	else if (msg.tag == this.losHealRangeQuery)
|3912|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3912|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3913|3913| };
|3914|3914| 
|3915|3915| 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
|3914|3914| 
|3915|3915| UnitAI.prototype.OnPackFinished = function(msg)
|3916|3916| {
|3917|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3917|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3918|3918| };
|3919|3919| 
|3920|3920| //// 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
|3914|3914| 
|3915|3915| UnitAI.prototype.OnPackFinished = function(msg)
|3916|3916| {
|3917|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3917|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3918|3918| };
|3919|3919| 
|3920|3920| //// 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
|3917|3917| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3918|3918| };
|3919|3919| 
|3920|    |-//// Helper functions to be called by the FSM ////
|    |3920|+// // Helper functions to be called by the FSM ////
|3921|3921| 
|3922|3922| UnitAI.prototype.GetWalkSpeed = function()
|3923|3923| {
|    | [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
|4019|4019| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4020|4020| 		return undefined;
|4021|4021| 
|4022|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4022|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4023|4023| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4024|4024| 		return undefined;
|4025|4025| 
|    | [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
|4104|4104| 			PlaySound(name, member);
|4105|4105| 	}
|4106|4106| 	else
|4107|    |-	{
|    |4107|+	
|4108|4108| 		// Otherwise use our own sounds
|4109|4109| 		PlaySound(name, this.entity);
|4110|    |-	}
|    |4110|+	
|4111|4111| };
|4112|4112| 
|4113|4113| /*
|    | [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
|4449|4449| 	if (this.IsFormationMember())
|4450|4450| 	{
|4451|4451| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4452|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4453|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4452|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4453|+			cmpFormationUnitAI.order.data.target == target)
|4454|4454| 			return true;
|4455|4455| 	}
|4456|4456| 
|    | [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
|4509|4509| 	if (this.IsFormationMember())
|4510|4510| 	{
|4511|4511| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4512|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4513|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4512|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4513|+			cmpFormationUnitAI.order.data.target == target)
|4514|4514| 			return true;
|4515|4515| 	}
|4516|4516| 
|    | [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
|4655|4655| UnitAI.prototype.AttackEntityInZone = function(ents)
|4656|4656| {
|4657|4657| 	var target = ents.find(target =>
|4658|    |-		this.CanAttack(target)
|4659|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4658|+		this.CanAttack(target) &&
|    |4659|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4660|4660| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4661|4661| 	);
|4662|4662| 	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
|4656|4656| {
|4657|4657| 	var target = ents.find(target =>
|4658|4658| 		this.CanAttack(target)
|4659|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4660|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4659|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4660|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4661|4661| 	);
|4662|4662| 	if (!target)
|4663|4663| 		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
|4720|4720| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4721|4721| 	if (this.isGuardOf)
|4722|4722| 	{
|4723|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4723|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4724|4724| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4725|4725| 		if (cmpUnitAI && cmpAttack &&
|4726|4726| 		    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
|4724|4724| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4725|4725| 		if (cmpUnitAI && cmpAttack &&
|4726|4726| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4727|    |-				return false;
|    |4727|+			return false;
|4728|4728| 	}
|4729|4729| 
|4730|4730| 	// 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
|4729|4729| 
|4730|4730| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4731|4731| 	if (this.GetStance().respondHoldGround)
|4732|    |-	{
|    |4732|+	
|4733|4733| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4734|4734| 			return true;
|4735|    |-	}
|    |4735|+	
|4736|4736| 
|4737|4737| 	// Stop if it's left our vision range, unless we're especially persistent
|4738|4738| 	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
|4736|4736| 
|4737|4737| 	// Stop if it's left our vision range, unless we're especially persistent
|4738|4738| 	if (!this.GetStance().respondChaseBeyondVision)
|4739|    |-	{
|    |4739|+	
|4740|4740| 		if (!this.CheckTargetIsInVisionRange(target))
|4741|4741| 			return true;
|4742|    |-	}
|    |4742|+	
|4743|4743| 
|4744|4744| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4745|4745| 	// 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
|4763|4763| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4764|4764| 	if (this.isGuardOf)
|4765|4765| 	{
|4766|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4766|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4767|4767| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4768|4768| 		if (cmpUnitAI && cmpAttack &&
|4769|4769| 		    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
|4776|4776| 	return false;
|4777|4777| };
|4778|4778| 
|4779|    |-//// External interface functions ////
|    |4779|+// // External interface functions ////
|4780|4780| 
|4781|4781| UnitAI.prototype.SetFormationController = function(ent)
|4782|4782| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4786|4786| 	// of our own formation (or ourself if not in formation)
|4787|4787| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4788|4788| 	if (cmpObstruction)
|4789|    |-	{
|    |4789|+	
|4790|4790| 		if (ent == INVALID_ENTITY)
|4791|4791| 			cmpObstruction.SetControlGroup(this.entity);
|4792|4792| 		else
|4793|4793| 			cmpObstruction.SetControlGroup(ent);
|4794|    |-	}
|    |4794|+	
|4795|4795| 
|4796|4796| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4797|4797| 	if (ent == INVALID_ENTITY)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4970|4970| 	// if we already had an old guard order, do nothing if the target is the same
|4971|4971| 	// and the order is running, otherwise remove the previous order
|4972|4972| 	if (this.isGuardOf)
|4973|    |-	{
|    |4973|+	
|4974|4974| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4975|4975| 			return;
|4976|4976| 		else
|4977|4977| 			this.RemoveGuard();
|4978|    |-	}
|    |4978|+	
|4979|4979| 
|4980|4980| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4981|4981| };
|    | [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
|4973|4973| 	{
|4974|4974| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4975|4975| 			return;
|4976|    |-		else
|4977|    |-			this.RemoveGuard();
|    |4976|+		this.RemoveGuard();
|4978|4977| 	}
|4979|4978| 
|4980|4979| 	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
|5144|5144| 			this.WalkToTarget(target, queued);
|5145|5145| 		return;
|5146|5146| 	}
|5147|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |5147|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|5148|5148| };
|5149|5149| 
|5150|5150| /**
|    | [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
|5310|5310| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5311|5311| 	{
|5312|5312| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5313|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5313|+		if (cmpTrader.HasBothMarkets() &&
|5314|5314| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5315|5315| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5316|5316| 		{
|    | [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
|5591|5591| 				{
|5592|5592| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5593|5593| 					var targetClasses = this.order.data.targetClasses;
|5594|    |-					if (targetClasses.attack && cmpIdentity
|5595|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5594|+					if (targetClasses.attack && cmpIdentity &&
|    |5595|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5596|5596| 						continue;
|5597|5597| 					if (targetClasses.avoid && cmpIdentity
|5598|5598| 						&& 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
|5594|5594| 					if (targetClasses.attack && cmpIdentity
|5595|5595| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5596|5596| 						continue;
|5597|    |-					if (targetClasses.avoid && cmpIdentity
|5598|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5597|+					if (targetClasses.avoid && cmpIdentity &&
|    |5598|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5599|5599| 						continue;
|5600|5600| 					// Only used by the AIs to prevent some choices of targets
|5601|5601| 					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
|5617|5617| 		{
|5618|5618| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5619|5619| 			var targetClasses = this.order.data.targetClasses;
|5620|    |-			if (cmpIdentity && targetClasses.attack
|5621|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5620|+			if (cmpIdentity && targetClasses.attack &&
|    |5621|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5622|5622| 				continue;
|5623|5623| 			if (cmpIdentity && targetClasses.avoid
|5624|5624| 				&& 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
|5620|5620| 			if (cmpIdentity && targetClasses.attack
|5621|5621| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5622|5622| 				continue;
|5623|    |-			if (cmpIdentity && targetClasses.avoid
|5624|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5623|+			if (cmpIdentity && targetClasses.avoid &&
|    |5624|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5625|5625| 				continue;
|5626|5626| 			// Only used by the AIs to prevent some choices of targets
|5627|5627| 			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
|5763|5763| 
|5764|5764| UnitAI.prototype.SetHeldPosition = function(x, z)
|5765|5765| {
|5766|    |-	this.heldPosition = {"x": x, "z": z};
|    |5766|+	this.heldPosition = { "x": x, "z": z};
|5767|5767| };
|5768|5768| 
|5769|5769| 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
|5763|5763| 
|5764|5764| UnitAI.prototype.SetHeldPosition = function(x, z)
|5765|5765| {
|5766|    |-	this.heldPosition = {"x": x, "z": z};
|    |5766|+	this.heldPosition = {"x": x, "z": z };
|5767|5767| };
|5768|5768| 
|5769|5769| 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
|5790|5790| 	return false;
|5791|5791| };
|5792|5792| 
|5793|    |-//// Helper functions ////
|    |5793|+// // Helper functions ////
|5794|5794| 
|5795|5795| UnitAI.prototype.CanAttack = function(target)
|5796|5796| {
|    | [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
|5994|5994| 	return cmpPack && cmpPack.IsPacking();
|5995|5995| };
|5996|5996| 
|5997|    |-//// Formation specific functions ////
|    |5997|+// // Formation specific functions ////
|5998|5998| 
|5999|5999| UnitAI.prototype.IsAttackingAsFormation = function()
|6000|6000| {
|    | [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
|5999|5999| UnitAI.prototype.IsAttackingAsFormation = function()
|6000|6000| {
|6001|6001| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6002|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6003|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6002|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6003|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6004|6004| };
|6005|6005| 
|6006|6006| //// 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
|6003|6003| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6004|6004| };
|6005|6005| 
|6006|    |-//// Animal specific functions ////
|    |6006|+// // Animal specific functions ////
|6007|6007| 
|6008|6008| UnitAI.prototype.MoveRandomly = function(distance)
|6009|6009| {

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
| 417| »   »   »   this.IsAnimal()·?·this.SetNextState("ANIMAL.COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 422| »   »   this.IsAnimal()·?·this.SetNextState("ANIMAL.COMBAT.APPROACHING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 719| »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 734| »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

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
|1118| »   »   »   »   »   typeof·target·==·"number"·?·this.CallMemberFunction("Attack",·[target,·this.order.data.allowCapture,·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
|1121| »   »   »   »   »   cmpAttack.CanAttackAsFormation()·?·this.SetNextState("COMBAT.ATTACKING")·:
|    | [NORMAL] ESLintBear (no-unused-expressions):
|    | Expected an assignment or function call and instead saw an expression.

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2605| »   »   »   »   "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
|2809| »   »   »   »   "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
|2993| »   »   »   »   "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
|3724| »   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
|4642| »   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
|4657| »   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
|4703| »   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
|4726| »   »   ····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
|5241| »   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
| 418| »   »   »   »   this.SetNextState("INDIVIDUAL.COMBAT");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 423| »   »   »   this.SetNextState("INDIVIDUAL.COMBAT");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 720| »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
| 735| »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1119| »   »   »   »   »   »   this.CallMemberFunction("AttackGround",·[target,·this.order.data.radius,·false]);
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1122| »   »   »   »   »   »   this.SetNextState("MEMBER");
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

binaries/data/mods/public/simulation/components/UnitAI.js
|1148| »   »   »   »   »   »   »   »   });
|    | [NORMAL] JSHintBear:
|    | Expected an assignment or function call and instead saw an expression.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4453| »   »   »   &&·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
|4513| »   »   »   &&·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
|4659| »   »   &&·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
|4660| »   »   &&·(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
|5241| »   var·lastPos·=·undefined;
|    | [NORMAL] JSHintBear:
|    | It's not necessary to initialize 'lastPos' to 'undefined'.

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|6003| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [MAJOR] JSHintBear:
|    | Too many errors. (97% scanned).
Executing section cli...

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

Stan added a comment.Jun 24 2019, 8:57 PM

If you have some time, maybe it would be nice to have a small video on youtube demonstrating the feature. Nothing fancy.

I don't understand the point of g_AttackGroundSize?

This seems to mostly work when testing.

I'm wondering if it would be worth having an Attack.js helper that exports a "TargetIsEntity" function that you can use everywhere instead of the various uses of instance of

I think some changes I made in this diff should be moved to seperate minor diffs:

  • GetTargetPosition2D/3D-functions.

Related to this change imo.

  • FaceTowardsTarget to be like in D1958.

Probably separated.

  • Formation target/move ranges seperated from the normal function calls.

Could be separated.

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

make a "TargetIsEntity" function and use this for this and the two target instanceof Vector3D above.

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

meh, more readable before imo.

761

same here, more readable before imo.

1858

I don't think you remove this from the order anymore, so it shouldn't be here.

I don't understand the point of g_AttackGroundSize?

It is the area in which multiple entities choose their attack location.
If you have ~50 archers and want to attack ground, it seems highly unlikely that one would like all the arrows to be landing in the spread area of the exact point you clicked on. The g_AttackGroundSize is a variable to add artificial spread to the attacks of the archers (not to the spread of the missiles), meaning that one can bombard an area rather then a point.

This seems to mostly work when testing.

Great :) But mostly? Are there things not working? Besides deserialising, which I know does not work.

I'm wondering if it would be worth having an Attack.js helper that exports a "TargetIsEntity" function that you can use everywhere instead of the various uses of instance of

To me that sounds like a welcome addition, what are the merits of that?

  • FaceTowardsTarget to be like in D1958.

Probably separated.

D2014.

  • Formation target/move ranges seperated from the normal function calls.

Could be separated.

D2015.

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

I do not fully understand you here, I am afraid. I read either of two possibilities:

  • I did not remove this (the current enter-state) from the order (which I did, as far as was possible) and thus the code is duplicated here.
  • I *did* remove this from the order, but it is not a good change and should be reverted.

But maybe even something else is meant?

wraitii added a subscriber: elexis.Jun 26 2019, 9:40 AM

It is the area in which multiple entities choose their attack location.

Right, makes sense. TBH I think this needs to be more obvious to the player, and it sounds like more advanced functionality, so I would suggest splitting this in another patch, that depends on this one.

Great :) But mostly? Are there things not working? Besides deserialising, which I know does not work.

That - also it might be because of the attack ground size thing but I found units didn't always hit the ground where I ordered them (tested with skirmishers).

To me that sounds like a welcome addition, what are the merits of that?

What I dislike is that it's kind of specific to a feature, which isn't awesome - but that's the trouble with having target be one of two types. Maybe someone (@elexis?) has a better idea on how to handle this. Perhaps this global function should be in Attack.js and not a helper? Not sure...

Freagarach marked 4 inline comments as done.EditedJun 26 2019, 10:51 AM

Right, makes sense. TBH I think this needs to be more obvious to the player, and it sounds like more advanced functionality, so I would suggest splitting this in another patch, that depends on this one.

From the summary's ToDo-list: Give visual feedback on the increase/decrease of the bombard radius. ;) I have not yet found out how to add a overlay with the range to the cursor.
I partly agree on the advanced part, while it is not directly necessary for attack ground to work, it is necessary to be able to use it, IMHO. It has little (not "no") value to attack ground a very specific location I think. If one could attack-ground a radius whilst the enemy is "dancing" he can be pretty sure the dancing entity is hit more often than when directly targeted.
Nevertheless, I don't really mind splitting this, but I have not found out yet how to upload a patch as part of a dependency ;)

That - also it might be because of the attack ground size thing but I found units didn't always hit the ground where I ordered them (tested with skirmishers).

That is indeed a consequence of the size-thing. If you activate the attack ground button and scroll the mouse-wheel (or use +/-) you can increase/decrease the radius. Note that you will be zoomed in/out as well, so that ought to be fixed.

What I dislike is that it's kind of specific to a feature, which isn't awesome - but that's the trouble with having target be one of two types. Maybe someone (@elexis?) has a better idea on how to handle this. Perhaps this global function should be in Attack.js and not a helper? Not sure...

Good point, but isn't this feature aspecific to 0 A.D.? I mean the support for attack ground should be engine-wise I guess?

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

Why do we have a different "Animal"-state anyway? As far as I can see it is easily combinable.

4762
Freagarach updated this revision to Diff 8617.EditedJun 26 2019, 11:01 AM
Freagarach marked an inline comment as done.
Freagarach edited the summary of this revision. (Show Details)
  • Reverted FaceTowardsTarget change. (In favour of D2014.)
  • Allow 0 radius in bombard-area.

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
| 112| 112| 
| 113| 113| 	// Do this first in case the direct hit kills the target
| 114| 114| 	if (data.isSplash)
| 115|    |-	{
|    | 115|+	
| 116| 116| 		this.CauseSplashDamage({
| 117| 117| 			"attacker": data.attacker,
| 118| 118| 			"origin": Vector2D.from3D(data.position),
| 125| 125| 			"type": data.type,
| 126| 126| 			"attackerOwner": data.attackerOwner
| 127| 127| 		});
| 128|    |-	}
|    | 128|+	
| 129| 129| 
| 130| 130| 	let cmpProjectileManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ProjectileManager);
| 131| 131| 
|    | [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
| 224| 224| 				damageMultiplier = 0;
| 225| 225| 		}
| 226| 226| 		else // In case someone calls this function with an invalid shape.
| 227|    |-		{
|    | 227|+		
| 228| 228| 			warn("The " + data.shape + " splash damage shape is not implemented!");
| 229|    |-		}
|    | 229|+		
| 230| 230| 
| 231| 231| 		if (data.splashBonus)
| 232| 232| 			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/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 the first entity we build must be a tower)
|1285|1285| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1286|    |-		{
|    |1286|+		
|1287|1287| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1288|1288| 			{
|1289|1289|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1290|1290|     			break;
|1291|1291| 			}
|1292|    |-		}
|    |1292|+		
|1293|1293| 
|1294|1294| 		var constructPieceCmd = {
|1295|1295| 			"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
|1330|1330| 
|1331|1331| 				if (i > 0)
|1332|1332| 				{
|1333|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1333|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1334|1334| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1335|1335| 					// TODO: ensure that cmpPreviousObstruction exists
|1336|1336| 					// 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
|1388|1388| 		}
|1389|1389| 
|1390|1390| 		if (piece.template == cmd.wallSet.templates.tower)
|1391|    |-		{
|    |1391|+		
|1392|1392| 			// encountered a tower entity, update the last tower control group
|1393|1393| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1394|    |-		}
|    |1394|+		
|1395|1395| 		else
|1396|1396| 		{
|1397|1397| 			// 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
|1402|1402| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1403|1403| 			{
|1404|1404| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1405|    |-				{
|    |1405|+				
|1406|1406| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1407|    |-				}
|    |1407|+				
|1408|1408| 			}
|1409|1409| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1410|1410| 			{
|    | [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
|1477|1477| 	}
|1478|1478| 
|1479|1479| 	if (formedEnts.length == 0)
|1480|    |-	{
|    |1480|+	
|1481|1481| 		// No units support the formation - return all the others
|1482|1482| 		return nonformedUnitAIs;
|1483|    |-	}
|    |1483|+	
|1484|1484| 
|1485|1485| 	// Find what formations the formationable selected entities are currently in
|1486|1486| 	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
|1493|1493| 		// Check that all its members are selected
|1494|1494| 		var fid = formationIds[0];
|1495|1495| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1496|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1497|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1496|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1497|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1498|1498| 		{
|1499|1499| 			cmpFormation.DeleteTwinFormations();
|1500|1500| 			// 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
|1525|1525| 					{
|1526|1526| 						var template = cmpUnitAI.GetFormationTemplate();
|1527|1527| 						if (lastFormationTemplate === undefined)
|1528|    |-						{
|    |1528|+						
|1529|1529| 							lastFormationTemplate = template;
|1530|    |-						}
|    |1530|+						
|1531|1531| 						else if (lastFormationTemplate != template)
|1532|1532| 						{
|1533|1533| 							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
|1601|1601| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1602|1602| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1603|1603| 				if (matrix[i][j] < distSq)
|1604|    |-					closeClusters = [i,j];
|    |1604|+					closeClusters = [i, j];
|1605|1605| 
|1606|1606| 		// if no more close clusters found, just return all found clusters so far
|1607|1607| 		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
|1623|1623| 		}
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|    |-		clusters.splice(closeClusters[0],1);
|    |1626|+		clusters.splice(closeClusters[0], 1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		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
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|    |-		clusters.splice(closeClusters[1],1);
|    |1627|+		clusters.splice(closeClusters[1], 1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		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
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|    |-		matrix.splice(closeClusters[0],1);
|    |1628|+		matrix.splice(closeClusters[0], 1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|    | [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| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|    |-		matrix.splice(closeClusters[1],1);
|    |1629|+		matrix.splice(closeClusters[1], 1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			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
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|    |-				matrix[i].splice(closeClusters[0],1);
|    |1633|+				matrix[i].splice(closeClusters[0], 1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|1635| 				matrix[i].splice(closeClusters[1],1);
|1636|1636| 		}
|    | [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| 			if (matrix[i].length > closeClusters[0])
|1633|1633| 				matrix[i].splice(closeClusters[0],1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|    |-				matrix[i].splice(closeClusters[1],1);
|    |1635|+				matrix[i].splice(closeClusters[1], 1);
|1636|1636| 		}
|1637|1637| 		// add a new row of distances to the matrix and the new cluster
|1638|1638| 		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
| 804| »   »   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
|1289| ····»   »   »   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
|1290| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1520| »   »   »   »   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
|1599| »   »   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
|1616| »   »   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
|1630| »   »   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
| 556| »   »   »   »   ····&&·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
| 744| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1497| »   »   »   &&·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
|1523| »   »   »   »   »   var·cmpUnitAI·=·Engine.QueryInterface(ent,·IID_UnitAI);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitAI' is already defined.

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   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 = updateBuildingPlacementPr