Page MenuHomeWildfire Games

Add call-to-arms button.
Needs ReviewPublic

Authored by Freagarach on May 8 2019, 4:46 PM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Trac Tickets
#1364
Summary

This adds a button to units carrying resources to return their resources to the closest viable dropsite or abort any other current order and attack-move the location specified. (The ctrl-Q only attack units-hotkey should also work.)
Cf. this topic.
It would be nice:

  • to have a proper icon for this;
  • to remember the work the unit was doing so "back-to-work" can be called.

This is good for lazy people like me who want to react to an enemy attack with all units but without their resources. If units without resources are also selected, they stop current orders and attack-move directly.

Test Plan

Let a unit gather some resources, click the button that has appeared, and click the location the unit has to attack-move towards.

Diff Detail

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

Event Timeline

Freagarach created this revision.May 8 2019, 4:46 PM
Owners added a subscriber: Restricted Owners Package.May 8 2019, 4:46 PM
Vulcan added a comment.May 8 2019, 4:48 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for-of'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels_helpers.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/selection_panels_helpers.js
| 429| 429| 	let otherEnts = [];
| 430| 430| 
| 431| 431| 	for (let ent of garrisonHolders)
| 432|    |-	{
|    | 432|+	
| 433| 433| 		if (controlsPlayer(GetEntityState(ent).player))
| 434| 434| 			ownEnts.push(ent);
| 435| 435| 		else
| 436| 436| 			otherEnts.push(ent);
| 437|    |-	}
|    | 437|+	
| 438| 438| 
| 439| 439| 	if (ownEnts.length)
| 440| 440| 		Engine.PostNetworkCommand({

binaries/data/mods/public/gui/session/unit_actions.js
| 557| »   »   »   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
| 337| 337| 			{
| 338| 338| 				var list = queue.GetEntitiesList();
| 339| 339| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 340|    |-				{
|    | 340|+				
| 341| 341| 					for (var promoted of cmd.promoted)
| 342| 342| 					{
| 343| 343| 						if (list.indexOf(promoted) === -1)
| 345| 345| 						cmd.template = promoted;
| 346| 346| 						break;
| 347| 347| 					}
| 348|    |-				}
|    | 348|+				
| 349| 349| 			}
| 350| 350| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 351| 351| 				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
| 544| 544| 			if (cmpGarrisonHolder)
| 545| 545| 			{
| 546| 546| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 547|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 548|    |-				    && player != +cmd.owner)
|    | 547|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 548|+				    player != +cmd.owner)
| 549| 549| 						continue;
| 550| 550| 
| 551| 551| 				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
| 546| 546| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 547| 547| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 548| 548| 				    && player != +cmd.owner)
| 549|    |-						continue;
|    | 549|+					continue;
| 550| 550| 
| 551| 551| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 552| 552| 					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
| 956| 956| 		{
| 957| 957| 			var count = 0;
| 958| 958| 			for (let j = 0; j < length - 1; ++j)
| 959|    |-			{
|    | 959|+			
| 960| 960| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 961| 961| 					++count;
| 962| 962| 				else
| 963| 963| 					break;
| 964|    |-			}
|    | 964|+			
| 965| 965| 			consec[i] = count;
| 966| 966| 		}
| 967| 967| 		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
| 967| 967| 		var start = 0;
| 968| 968| 		var count = 0;
| 969| 969| 		for (var c in consec)
| 970|    |-		{
|    | 970|+		
| 971| 971| 			if (consec[c] > count)
| 972| 972| 			{
| 973| 973| 				start = c;
| 974| 974| 				count = consec[c];
| 975| 975| 			}
| 976|    |-		}
|    | 976|+		
| 977| 977| 
| 978| 978| 		// If we've found a shoreline, stop searching
| 979| 979| 		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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	if (cmd.autorepair)
|1157|    |-	{
|    |1157|+	
|1158|1158| 		ProcessCommand(player, {
|1159|1159| 			"type": "repair",
|1160|1160| 			"entities": entities,
|1162|1162| 			"autocontinue": cmd.autocontinue,
|1163|1163| 			"queued": cmd.queued
|1164|1164| 		});
|1165|    |-	}
|    |1165|+	
|1166|1166| 
|1167|1167| 	return ent;
|1168|1168| }
|    | [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
|1258|1258| 		}
|1259|1259| 
|1260|1260| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1261|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1261|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1262|1262| 	}
|1263|1263| 
|1264|1264| 	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
|1275|1275| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1276|1276| 		// start position snapping (implying that the first entity we build must be a tower)
|1277|1277| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1278|    |-		{
|    |1278|+		
|1279|1279| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1280|1280| 			{
|1281|1281|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1282|1282|     			break;
|1283|1283| 			}
|1284|    |-		}
|    |1284|+		
|1285|1285| 
|1286|1286| 		var constructPieceCmd = {
|1287|1287| 			"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
|1322|1322| 
|1323|1323| 				if (i > 0)
|1324|1324| 				{
|1325|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1325|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1326|1326| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1327|1327| 					// TODO: ensure that cmpPreviousObstruction exists
|1328|1328| 					// 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
|1380|1380| 		}
|1381|1381| 
|1382|1382| 		if (piece.template == cmd.wallSet.templates.tower)
|1383|    |-		{
|    |1383|+		
|1384|1384| 			// encountered a tower entity, update the last tower control group
|1385|1385| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1386|    |-		}
|    |1386|+		
|1387|1387| 		else
|1388|1388| 		{
|1389|1389| 			// 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
|1394|1394| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1395|1395| 			{
|1396|1396| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1397|    |-				{
|    |1397|+				
|1398|1398| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1399|    |-				}
|    |1399|+				
|1400|1400| 			}
|1401|1401| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1402|1402| 			{
|    | [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
|1469|1469| 	}
|1470|1470| 
|1471|1471| 	if (formedEnts.length == 0)
|1472|    |-	{
|    |1472|+	
|1473|1473| 		// No units support the formation - return all the others
|1474|1474| 		return nonformedUnitAIs;
|1475|    |-	}
|    |1475|+	
|1476|1476| 
|1477|1477| 	// Find what formations the formationable selected entities are currently in
|1478|1478| 	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
|1485|1485| 		// Check that all its members are selected
|1486|1486| 		var fid = formationIds[0];
|1487|1487| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1488|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1489|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1488|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1489|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1490|1490| 		{
|1491|1491| 			cmpFormation.DeleteTwinFormations();
|1492|1492| 			// 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
|1517|1517| 					{
|1518|1518| 						var template = cmpUnitAI.GetFormationTemplate();
|1519|1519| 						if (lastFormationTemplate === undefined)
|1520|    |-						{
|    |1520|+						
|1521|1521| 							lastFormationTemplate = template;
|1522|    |-						}
|    |1522|+						
|1523|1523| 						else if (lastFormationTemplate != template)
|1524|1524| 						{
|1525|1525| 							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
|1593|1593| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1594|1594| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1595|1595| 				if (matrix[i][j] < distSq)
|1596|    |-					closeClusters = [i,j];
|    |1596|+					closeClusters = [i, j];
|1597|1597| 
|1598|1598| 		// if no more close clusters found, just return all found clusters so far
|1599|1599| 		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
|1615|1615| 		}
|1616|1616| 		// remove the rows and columns in the matrix for the merged clusters,
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|    |-		clusters.splice(closeClusters[0],1);
|    |1618|+		clusters.splice(closeClusters[0], 1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|1621| 		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
|1616|1616| 		// remove the rows and columns in the matrix for the merged clusters,
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|    |-		clusters.splice(closeClusters[1],1);
|    |1619|+		clusters.splice(closeClusters[1], 1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|1621| 		matrix.splice(closeClusters[1],1);
|1622|1622| 		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
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|    |-		matrix.splice(closeClusters[0],1);
|    |1620|+		matrix.splice(closeClusters[0], 1);
|1621|1621| 		matrix.splice(closeClusters[1],1);
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|    | [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
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|    |-		matrix.splice(closeClusters[1],1);
|    |1621|+		matrix.splice(closeClusters[1], 1);
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|1624|1624| 			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
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|1624|1624| 			if (matrix[i].length > closeClusters[0])
|1625|    |-				matrix[i].splice(closeClusters[0],1);
|    |1625|+				matrix[i].splice(closeClusters[0], 1);
|1626|1626| 			if (matrix[i].length > closeClusters[1])
|1627|1627| 				matrix[i].splice(closeClusters[1],1);
|1628|1628| 		}
|    | [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| 			if (matrix[i].length > closeClusters[0])
|1625|1625| 				matrix[i].splice(closeClusters[0],1);
|1626|1626| 			if (matrix[i].length > closeClusters[1])
|1627|    |-				matrix[i].splice(closeClusters[1],1);
|    |1627|+				matrix[i].splice(closeClusters[1], 1);
|1628|1628| 		}
|1629|1629| 		// add a new row of distances to the matrix and the new cluster
|1630|1630| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
| 796| »   »   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
|1281| ····»   »   »   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
|1282| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1512| »   »   »   »   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
|1591| »   »   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
|1608| »   »   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
|1622| »   »   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
| 548| »   »   »   »   ····&&·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
| 736| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Angen added a subscriber: Angen.May 8 2019, 4:51 PM
Angen added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
4907

if forced by player you should pass "force": true

Stan added a subscriber: Stan.May 8 2019, 4:51 PM

About the patch itself, I'm not sure it is a wanted a feature.

binaries/data/mods/public/gui/session/unit_actions.js
1137

!a || !b == a && b

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

I guess that function is duplicated elsewhere, would be nice to unify the calls.

In D1868#77236, @Stan wrote:

About the patch itself, I'm not sure it is a wanted a feature.

At least in 2012 it was ;)

Stan added a comment.May 8 2019, 5:03 PM

Oh yeah, I misread the ticket. That's just a side effect of calling units to arms.

Stan added a reviewer: Restricted Owners Package.May 8 2019, 5:03 PM
In D1868#77241, @Stan wrote:

Oh yeah, I misread the ticket. That's just a side effect of calling units to arms.

Ah, I think I understand the difference. I mainly got my information from the thread, wheras you probably got it from the ticket?

Stan added a comment.May 8 2019, 5:32 PM

Usually one should refer to the tickets :)

In D1868#77244, @Stan wrote:

Usually one should refer to the tickets :)

Okay, what do you recommend now: fix the suggestions and leave it be, or convert this to a button which you can click on the map to attack-move all your soldiers to that point? (Which would make it, IMHO, a real call-to-arms-button, thus adressing the ticket.) Or something compleatly different? ;)

Stan added a comment.May 10 2019, 7:03 PM

Well addressing the ticket sounds like a good idea :)

Freagarach updated this revision to Diff 7964.May 10 2019, 11:09 PM
Freagarach retitled this revision from Add button to drop off resources at nearby dropsite. to Add call-to-arms button..
Freagarach edited the summary of this revision. (Show Details)
Freagarach edited the test plan for this revision. (Show Details)
Freagarach updated the Trac tickets for this revision.
  • Converted to call-to-arms button (so lots of changes).

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

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

binaries/data/mods/public/gui/session/unit_actions.js
| 592| »   »   »   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
| 337| 337| 			{
| 338| 338| 				var list = queue.GetEntitiesList();
| 339| 339| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 340|    |-				{
|    | 340|+				
| 341| 341| 					for (var promoted of cmd.promoted)
| 342| 342| 					{
| 343| 343| 						if (list.indexOf(promoted) === -1)
| 345| 345| 						cmd.template = promoted;
| 346| 346| 						break;
| 347| 347| 					}
| 348|    |-				}
|    | 348|+				
| 349| 349| 			}
| 350| 350| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 351| 351| 				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
| 544| 544| 			if (cmpGarrisonHolder)
| 545| 545| 			{
| 546| 546| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 547|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 548|    |-				    && player != +cmd.owner)
|    | 547|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 548|+				    player != +cmd.owner)
| 549| 549| 						continue;
| 550| 550| 
| 551| 551| 				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
| 546| 546| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 547| 547| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 548| 548| 				    && player != +cmd.owner)
| 549|    |-						continue;
|    | 549|+					continue;
| 550| 550| 
| 551| 551| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 552| 552| 					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
| 956| 956| 		{
| 957| 957| 			var count = 0;
| 958| 958| 			for (let j = 0; j < length - 1; ++j)
| 959|    |-			{
|    | 959|+			
| 960| 960| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 961| 961| 					++count;
| 962| 962| 				else
| 963| 963| 					break;
| 964|    |-			}
|    | 964|+			
| 965| 965| 			consec[i] = count;
| 966| 966| 		}
| 967| 967| 		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
| 967| 967| 		var start = 0;
| 968| 968| 		var count = 0;
| 969| 969| 		for (var c in consec)
| 970|    |-		{
|    | 970|+		
| 971| 971| 			if (consec[c] > count)
| 972| 972| 			{
| 973| 973| 				start = c;
| 974| 974| 				count = consec[c];
| 975| 975| 			}
| 976|    |-		}
|    | 976|+		
| 977| 977| 
| 978| 978| 		// If we've found a shoreline, stop searching
| 979| 979| 		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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	if (cmd.autorepair)
|1157|    |-	{
|    |1157|+	
|1158|1158| 		ProcessCommand(player, {
|1159|1159| 			"type": "repair",
|1160|1160| 			"entities": entities,
|1162|1162| 			"autocontinue": cmd.autocontinue,
|1163|1163| 			"queued": cmd.queued
|1164|1164| 		});
|1165|    |-	}
|    |1165|+	
|1166|1166| 
|1167|1167| 	return ent;
|1168|1168| }
|    | [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
|1258|1258| 		}
|1259|1259| 
|1260|1260| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1261|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1261|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1262|1262| 	}
|1263|1263| 
|1264|1264| 	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
|1275|1275| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1276|1276| 		// start position snapping (implying that the first entity we build must be a tower)
|1277|1277| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1278|    |-		{
|    |1278|+		
|1279|1279| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1280|1280| 			{
|1281|1281|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1282|1282|     			break;
|1283|1283| 			}
|1284|    |-		}
|    |1284|+		
|1285|1285| 
|1286|1286| 		var constructPieceCmd = {
|1287|1287| 			"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
|1322|1322| 
|1323|1323| 				if (i > 0)
|1324|1324| 				{
|1325|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1325|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1326|1326| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1327|1327| 					// TODO: ensure that cmpPreviousObstruction exists
|1328|1328| 					// 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
|1380|1380| 		}
|1381|1381| 
|1382|1382| 		if (piece.template == cmd.wallSet.templates.tower)
|1383|    |-		{
|    |1383|+		
|1384|1384| 			// encountered a tower entity, update the last tower control group
|1385|1385| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1386|    |-		}
|    |1386|+		
|1387|1387| 		else
|1388|1388| 		{
|1389|1389| 			// 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
|1394|1394| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1395|1395| 			{
|1396|1396| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1397|    |-				{
|    |1397|+				
|1398|1398| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1399|    |-				}
|    |1399|+				
|1400|1400| 			}
|1401|1401| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1402|1402| 			{
|    | [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
|1469|1469| 	}
|1470|1470| 
|1471|1471| 	if (formedEnts.length == 0)
|1472|    |-	{
|    |1472|+	
|1473|1473| 		// No units support the formation - return all the others
|1474|1474| 		return nonformedUnitAIs;
|1475|    |-	}
|    |1475|+	
|1476|1476| 
|1477|1477| 	// Find what formations the formationable selected entities are currently in
|1478|1478| 	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
|1485|1485| 		// Check that all its members are selected
|1486|1486| 		var fid = formationIds[0];
|1487|1487| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1488|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1489|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1488|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1489|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1490|1490| 		{
|1491|1491| 			cmpFormation.DeleteTwinFormations();
|1492|1492| 			// 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
|1517|1517| 					{
|1518|1518| 						var template = cmpUnitAI.GetFormationTemplate();
|1519|1519| 						if (lastFormationTemplate === undefined)
|1520|    |-						{
|    |1520|+						
|1521|1521| 							lastFormationTemplate = template;
|1522|    |-						}
|    |1522|+						
|1523|1523| 						else if (lastFormationTemplate != template)
|1524|1524| 						{
|1525|1525| 							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
|1593|1593| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1594|1594| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1595|1595| 				if (matrix[i][j] < distSq)
|1596|    |-					closeClusters = [i,j];
|    |1596|+					closeClusters = [i, j];
|1597|1597| 
|1598|1598| 		// if no more close clusters found, just return all found clusters so far
|1599|1599| 		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
|1615|1615| 		}
|1616|1616| 		// remove the rows and columns in the matrix for the merged clusters,
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|    |-		clusters.splice(closeClusters[0],1);
|    |1618|+		clusters.splice(closeClusters[0], 1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|1621| 		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
|1616|1616| 		// remove the rows and columns in the matrix for the merged clusters,
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|    |-		clusters.splice(closeClusters[1],1);
|    |1619|+		clusters.splice(closeClusters[1], 1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|1621| 		matrix.splice(closeClusters[1],1);
|1622|1622| 		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
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|    |-		matrix.splice(closeClusters[0],1);
|    |1620|+		matrix.splice(closeClusters[0], 1);
|1621|1621| 		matrix.splice(closeClusters[1],1);
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|    | [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
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|    |-		matrix.splice(closeClusters[1],1);
|    |1621|+		matrix.splice(closeClusters[1], 1);
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|1624|1624| 			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
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|1624|1624| 			if (matrix[i].length > closeClusters[0])
|1625|    |-				matrix[i].splice(closeClusters[0],1);
|    |1625|+				matrix[i].splice(closeClusters[0], 1);
|1626|1626| 			if (matrix[i].length > closeClusters[1])
|1627|1627| 				matrix[i].splice(closeClusters[1],1);
|1628|1628| 		}
|    | [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| 			if (matrix[i].length > closeClusters[0])
|1625|1625| 				matrix[i].splice(closeClusters[0],1);
|1626|1626| 			if (matrix[i].length > closeClusters[1])
|1627|    |-				matrix[i].splice(closeClusters[1],1);
|    |1627|+				matrix[i].splice(closeClusters[1], 1);
|1628|1628| 		}
|1629|1629| 		// add a new row of distances to the matrix and the new cluster
|1630|1630| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
| 796| »   »   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
|1281| ····»   »   »   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
|1282| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1512| »   »   »   »   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
|1591| »   »   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
|1608| »   »   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
|1622| »   »   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
| 548| »   »   »   »   ····&&·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
| 736| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1548| »   »   »   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 && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 801|    |-	{
|    | 801|+	
| 802| 802| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 803| 803| 			Engine.SetSimRate(20.0);
| 804| 804| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 805| 805| 			Engine.SetSimRate(1.0);
| 806| 806| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 807| 807| 			Engine.RewindTimeWarp();
| 808|    |-	}
|    | 808|+	
| 809| 809| 
| 810| 810| 	if (ev.hotkey == "session.highlightguarding")
| 811| 811| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 857| 857| 			break;
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 860|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861|    |-				{
|    | 861|+			{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862|    |-					let now = Date.now();
|    | 862|+				let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 863|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 865|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866|    |-						{
|    | 866|+					{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867|    |-							var sptr = ev.hotkey.split(".");
|    | 867|+						var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868|    |-							performGroup("snap", sptr[3]);
|    | 868|+						performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869|    |-						}
|    | 869|+					}
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870|    |-					}
|    | 870|+				}
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871|    |-					else
|    | 871|+				else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
| 872|    |-					{
|    | 872|+				{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
| 873|    |-						var sptr = ev.hotkey.split(".");
|    | 873|+					var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874|    |-						performGroup(sptr[2], sptr[3]);
|    | 874|+					performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876|    |-						doublePressTimer = now;
|    | 876|+					doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877|    |-						prevHotkey = ev.hotkey;
|    | 877|+					prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880| 880| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878|    |-					}
|    | 878|+				}
| 879| 879| 				}
| 880| 880| 				break;
| 881| 881| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879|    |-				}
|    | 879|+			}
| 880| 880| 				break;
| 881| 881| 		}
| 882| 882| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880|    |-				break;
|    | 880|+			break;
| 881| 881| 		}
| 882| 882| 		break;
| 883| 883| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1045|1045| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1046|1046| 
|1047|1047| 			if (placementSupport.mode === "wall")
|1048|    |-			{
|    |1048|+			
|1049|1049| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1050|1050| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1051|1051| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1052|1052| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1053|    |-			}
|    |1053|+			
|1054|1054| 			else
|1055|1055| 			{
|1056|1056| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1317|1317| 	if (templateData.attack &&
|1318|1318| 		templateData.attack.Ranged &&
|1319|1319| 		templateData.attack.Ranged.maxRange)
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// add attack information to display a good tooltip
|1322|1322| 		placementSupport.attack = templateData.attack;
|1323|    |-	}
|    |1323|+	
|1324|1324| }
|1325|1325| 
|1326|1326| // Batch training:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1405|1405| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1406|1406| 	{
|1407|1407| 		if (inputState == INPUT_BATCHTRAINING)
|1408|    |-		{
|    |1408|+		
|1409|1409| 			// Check if we are training in the same building(s) as the last batch
|1410|1410| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1411|1411| 			// If the order changed, we have a new selection and we should create a new batch.
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|1440| 				// fall through to create the new batch
|1441|    |-		}
|    |1441|+		
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|1444|1444| 		if (decrement || Engine.GuiInterfaceCall("GetNeededResources", { "cost":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1437|1437| 			// Otherwise start a new one
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|    |-				// fall through to create the new batch
|    |1440|+			// fall through to create the new batch
|1441|1441| 		}
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1515|1515| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1516|1516| 	{
|1517|1517| 		// Train as many full batches as we can
|1518|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1518|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1519|1519| 		Engine.PostNetworkCommand({
|1520|1520| 			"type": "train",
|1521|1521| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1594|1594| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1595|1595| 
|1596|1596| 	// Reset the last idle unit, etc., if the selection type has changed.
|1597|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1597|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1598|1598| 		resetIdleUnit();
|1599|1599| 	lastIdleClasses = classes;
|1600|1600| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

nani awarded a token.May 10 2019, 11:14 PM
Freagarach marked 3 inline comments as done.EditedMay 10 2019, 11:15 PM

This button should be moved from the selection panel to next to the minimap and iterate over all entities, I guess?
Woohoow, my very first token! =D

Freagarach updated this revision to Diff 8351.Jun 6 2019, 9:38 PM
Freagarach edited the test plan for this revision. (Show Details)
  • Remember the work a unit was doing so it can be sent back to work.
    • This is done by removing the "ReturnResources" command from the "isWorkType"-list, so I do not know whether this is desirable?

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

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

binaries/data/mods/public/gui/session/unit_actions.js
| 592| »   »   »   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
| 337| 337| 			{
| 338| 338| 				var list = queue.GetEntitiesList();
| 339| 339| 				if (list.indexOf(cmd.template) === -1 && cmd.promoted)
| 340|    |-				{
|    | 340|+				
| 341| 341| 					for (var promoted of cmd.promoted)
| 342| 342| 					{
| 343| 343| 						if (list.indexOf(promoted) === -1)
| 345| 345| 						cmd.template = promoted;
| 346| 346| 						break;
| 347| 347| 					}
| 348|    |-				}
|    | 348|+				
| 349| 349| 			}
| 350| 350| 			if (queue && queue.GetEntitiesList().indexOf(cmd.template) != -1)
| 351| 351| 				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
| 544| 544| 			if (cmpGarrisonHolder)
| 545| 545| 			{
| 546| 546| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 547|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 548|    |-				    && player != +cmd.owner)
|    | 547|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 548|+				    player != +cmd.owner)
| 549| 549| 						continue;
| 550| 550| 
| 551| 551| 				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
| 546| 546| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 547| 547| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 548| 548| 				    && player != +cmd.owner)
| 549|    |-						continue;
|    | 549|+					continue;
| 550| 550| 
| 551| 551| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 552| 552| 					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
| 956| 956| 		{
| 957| 957| 			var count = 0;
| 958| 958| 			for (let j = 0; j < length - 1; ++j)
| 959|    |-			{
|    | 959|+			
| 960| 960| 				if ((waterPoints[(i + j) % length] + 1) % numPoints == waterPoints[(i + j + 1) % length])
| 961| 961| 					++count;
| 962| 962| 				else
| 963| 963| 					break;
| 964|    |-			}
|    | 964|+			
| 965| 965| 			consec[i] = count;
| 966| 966| 		}
| 967| 967| 		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
| 967| 967| 		var start = 0;
| 968| 968| 		var count = 0;
| 969| 969| 		for (var c in consec)
| 970|    |-		{
|    | 970|+		
| 971| 971| 			if (consec[c] > count)
| 972| 972| 			{
| 973| 973| 				start = c;
| 974| 974| 				count = consec[c];
| 975| 975| 			}
| 976|    |-		}
|    | 976|+		
| 977| 977| 
| 978| 978| 		// If we've found a shoreline, stop searching
| 979| 979| 		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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1150|1150| 
|1151|1151| 	// send Metadata info if any
|1152|1152| 	if (cmd.metadata)
|1153|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1153|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	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
|1154|1154| 
|1155|1155| 	// Tell the units to start building this new entity
|1156|1156| 	if (cmd.autorepair)
|1157|    |-	{
|    |1157|+	
|1158|1158| 		ProcessCommand(player, {
|1159|1159| 			"type": "repair",
|1160|1160| 			"entities": entities,
|1162|1162| 			"autocontinue": cmd.autocontinue,
|1163|1163| 			"queued": cmd.queued
|1164|1164| 		});
|1165|    |-	}
|    |1165|+	
|1166|1166| 
|1167|1167| 	return ent;
|1168|1168| }
|    | [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
|1258|1258| 		}
|1259|1259| 
|1260|1260| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1261|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1261|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1262|1262| 	}
|1263|1263| 
|1264|1264| 	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
|1275|1275| 		// 'lastTowerControlGroup' must always be defined and valid here, except if we're at the first piece and we didn't do
|1276|1276| 		// start position snapping (implying that the first entity we build must be a tower)
|1277|1277| 		if (lastTowerControlGroup === null || lastTowerControlGroup == INVALID_ENTITY)
|1278|    |-		{
|    |1278|+		
|1279|1279| 			if (!(i == 0 && piece.template == cmd.wallSet.templates.tower && !cmd.startSnappedEntity))
|1280|1280| 			{
|1281|1281|     			error("[TryConstructWall] Expected last tower control group to be available, none found (1st pass, iteration " + i + ")");
|1282|1282|     			break;
|1283|1283| 			}
|1284|    |-		}
|    |1284|+		
|1285|1285| 
|1286|1286| 		var constructPieceCmd = {
|1287|1287| 			"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
|1322|1322| 
|1323|1323| 				if (i > 0)
|1324|1324| 				{
|1325|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1325|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1326|1326| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1327|1327| 					// TODO: ensure that cmpPreviousObstruction exists
|1328|1328| 					// 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
|1380|1380| 		}
|1381|1381| 
|1382|1382| 		if (piece.template == cmd.wallSet.templates.tower)
|1383|    |-		{
|    |1383|+		
|1384|1384| 			// encountered a tower entity, update the last tower control group
|1385|1385| 			lastTowerControlGroup = cmpPieceObstruction.GetControlGroup();
|1386|    |-		}
|    |1386|+		
|1387|1387| 		else
|1388|1388| 		{
|1389|1389| 			// 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
|1394|1394| 			if (existingSecondaryControlGroup == INVALID_ENTITY)
|1395|1395| 			{
|1396|1396| 				if (lastTowerControlGroup != null && lastTowerControlGroup != INVALID_ENTITY)
|1397|    |-				{
|    |1397|+				
|1398|1398| 					cmpPieceObstruction.SetControlGroup2(lastTowerControlGroup);
|1399|    |-				}
|    |1399|+				
|1400|1400| 			}
|1401|1401| 			else if (existingSecondaryControlGroup != lastTowerControlGroup)
|1402|1402| 			{
|    | [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
|1469|1469| 	}
|1470|1470| 
|1471|1471| 	if (formedEnts.length == 0)
|1472|    |-	{
|    |1472|+	
|1473|1473| 		// No units support the formation - return all the others
|1474|1474| 		return nonformedUnitAIs;
|1475|    |-	}
|    |1475|+	
|1476|1476| 
|1477|1477| 	// Find what formations the formationable selected entities are currently in
|1478|1478| 	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
|1485|1485| 		// Check that all its members are selected
|1486|1486| 		var fid = formationIds[0];
|1487|1487| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1488|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1489|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1488|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1489|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1490|1490| 		{
|1491|1491| 			cmpFormation.DeleteTwinFormations();
|1492|1492| 			// 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
|1517|1517| 					{
|1518|1518| 						var template = cmpUnitAI.GetFormationTemplate();
|1519|1519| 						if (lastFormationTemplate === undefined)
|1520|    |-						{
|    |1520|+						
|1521|1521| 							lastFormationTemplate = template;
|1522|    |-						}
|    |1522|+						
|1523|1523| 						else if (lastFormationTemplate != template)
|1524|1524| 						{
|1525|1525| 							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
|1593|1593| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1594|1594| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1595|1595| 				if (matrix[i][j] < distSq)
|1596|    |-					closeClusters = [i,j];
|    |1596|+					closeClusters = [i, j];
|1597|1597| 
|1598|1598| 		// if no more close clusters found, just return all found clusters so far
|1599|1599| 		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
|1615|1615| 		}
|1616|1616| 		// remove the rows and columns in the matrix for the merged clusters,
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|    |-		clusters.splice(closeClusters[0],1);
|    |1618|+		clusters.splice(closeClusters[0], 1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|1621| 		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
|1616|1616| 		// remove the rows and columns in the matrix for the merged clusters,
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|    |-		clusters.splice(closeClusters[1],1);
|    |1619|+		clusters.splice(closeClusters[1], 1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|1621| 		matrix.splice(closeClusters[1],1);
|1622|1622| 		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
|1617|1617| 		// and the clusters themselves from the cluster list
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|    |-		matrix.splice(closeClusters[0],1);
|    |1620|+		matrix.splice(closeClusters[0], 1);
|1621|1621| 		matrix.splice(closeClusters[1],1);
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|    | [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
|1618|1618| 		clusters.splice(closeClusters[0],1);
|1619|1619| 		clusters.splice(closeClusters[1],1);
|1620|1620| 		matrix.splice(closeClusters[0],1);
|1621|    |-		matrix.splice(closeClusters[1],1);
|    |1621|+		matrix.splice(closeClusters[1], 1);
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|1624|1624| 			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
|1622|1622| 		for (let i = 0; i < matrix.length; ++i)
|1623|1623| 		{
|1624|1624| 			if (matrix[i].length > closeClusters[0])
|1625|    |-				matrix[i].splice(closeClusters[0],1);
|    |1625|+				matrix[i].splice(closeClusters[0], 1);
|1626|1626| 			if (matrix[i].length > closeClusters[1])
|1627|1627| 				matrix[i].splice(closeClusters[1],1);
|1628|1628| 		}
|    | [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| 			if (matrix[i].length > closeClusters[0])
|1625|1625| 				matrix[i].splice(closeClusters[0],1);
|1626|1626| 			if (matrix[i].length > closeClusters[1])
|1627|    |-				matrix[i].splice(closeClusters[1],1);
|    |1627|+				matrix[i].splice(closeClusters[1], 1);
|1628|1628| 		}
|1629|1629| 		// add a new row of distances to the matrix and the new cluster
|1630|1630| 		clusters.push(newCluster);

binaries/data/mods/public/simulation/helpers/Commands.js
| 796| »   »   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
|1281| ····»   »   »   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
|1282| ····»   »   »   break;
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/simulation/helpers/Commands.js
|1512| »   »   »   »   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
|1591| »   »   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
|1608| »   »   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
|1622| »   »   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
| 548| »   »   »   »   ····&&·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
| 736| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1548| »   »   »   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 && Engine.GetGUIObjectByName("devTimeWarp").checked)
| 801|    |-	{
|    | 801|+	
| 802| 802| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 803| 803| 			Engine.SetSimRate(20.0);
| 804| 804| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 805| 805| 			Engine.SetSimRate(1.0);
| 806| 806| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 807| 807| 			Engine.RewindTimeWarp();
| 808|    |-	}
|    | 808|+	
| 809| 809| 
| 810| 810| 	if (ev.hotkey == "session.highlightguarding")
| 811| 811| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 857| 857| 			break;
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 860|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 858| 858| 
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861|    |-				{
|    | 861|+			{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 859| 859| 		case "hotkeydown":
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862|    |-					let now = Date.now();
|    | 862|+				let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 860| 860| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 863|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 861| 861| 				{
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864|    |-					{
|    | 864|+				{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 862| 862| 					let now = Date.now();
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 865|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 863| 863| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866|    |-						{
|    | 866|+					{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 864| 864| 					{
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867|    |-							var sptr = ev.hotkey.split(".");
|    | 867|+						var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 865| 865| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868|    |-							performGroup("snap", sptr[3]);
|    | 868|+						performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 866| 866| 						{
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869|    |-						}
|    | 869|+					}
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 867| 867| 							var sptr = ev.hotkey.split(".");
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870|    |-					}
|    | 870|+				}
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 868| 868| 							performGroup("snap", sptr[3]);
| 869| 869| 						}
| 870| 870| 					}
| 871|    |-					else
|    | 871|+				else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						}
| 870| 870| 					}
| 871| 871| 					else
| 872|    |-					{
|    | 872|+				{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 870| 870| 					}
| 871| 871| 					else
| 872| 872| 					{
| 873|    |-						var sptr = ev.hotkey.split(".");
|    | 873|+					var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 871| 871| 					else
| 872| 872| 					{
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874|    |-						performGroup(sptr[2], sptr[3]);
|    | 874|+					performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 873| 873| 						var sptr = ev.hotkey.split(".");
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876|    |-						doublePressTimer = now;
|    | 876|+					doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 874| 874| 						performGroup(sptr[2], sptr[3]);
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877|    |-						prevHotkey = ev.hotkey;
|    | 877|+					prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880| 880| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 875| 875| 
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878|    |-					}
|    | 878|+				}
| 879| 879| 				}
| 880| 880| 				break;
| 881| 881| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 876| 876| 						doublePressTimer = now;
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879|    |-				}
|    | 879|+			}
| 880| 880| 				break;
| 881| 881| 		}
| 882| 882| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
| 877| 877| 						prevHotkey = ev.hotkey;
| 878| 878| 					}
| 879| 879| 				}
| 880|    |-				break;
|    | 880|+			break;
| 881| 881| 		}
| 882| 882| 		break;
| 883| 883| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1045|1045| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1046|1046| 
|1047|1047| 			if (placementSupport.mode === "wall")
|1048|    |-			{
|    |1048|+			
|1049|1049| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1050|1050| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1051|1051| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1052|1052| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1053|    |-			}
|    |1053|+			
|1054|1054| 			else
|1055|1055| 			{
|1056|1056| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1317|1317| 	if (templateData.attack &&
|1318|1318| 		templateData.attack.Ranged &&
|1319|1319| 		templateData.attack.Ranged.maxRange)
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// add attack information to display a good tooltip
|1322|1322| 		placementSupport.attack = templateData.attack;
|1323|    |-	}
|    |1323|+	
|1324|1324| }
|1325|1325| 
|1326|1326| // Batch training:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1405|1405| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1406|1406| 	{
|1407|1407| 		if (inputState == INPUT_BATCHTRAINING)
|1408|    |-		{
|    |1408|+		
|1409|1409| 			// Check if we are training in the same building(s) as the last batch
|1410|1410| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1411|1411| 			// If the order changed, we have a new selection and we should create a new batch.
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|1440| 				// fall through to create the new batch
|1441|    |-		}
|    |1441|+		
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|1444|1444| 		if (decrement || Engine.GuiInterfaceCall("GetNeededResources", { "cost":
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1437|1437| 			// Otherwise start a new one
|1438|1438| 			else if (!decrement)
|1439|1439| 				flushTrainingBatch();
|1440|    |-				// fall through to create the new batch
|    |1440|+			// fall through to create the new batch
|1441|1441| 		}
|1442|1442| 
|1443|1443| 		// Don't start a new batch if decrementing or unable to afford it.
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1515|1515| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1516|1516| 	{
|1517|1517| 		// Train as many full batches as we can
|1518|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1518|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1519|1519| 		Engine.PostNetworkCommand({
|1520|1520| 			"type": "train",
|1521|1521| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/gui/session/input.js
|1594|1594| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1595|1595| 
|1596|1596| 	// Reset the last idle unit, etc., if the selection type has changed.
|1597|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1597|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1598|1598| 		resetIdleUnit();
|1599|1599| 	lastIdleClasses = classes;
|1600|1600| 

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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