Page MenuHomeWildfire Games

Support attack-ground for ranged units.
Needs RevisionPublic

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

Details

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

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

  • Ask someone to create an icon and cursor for this.

Deserialisation issue: #4698.


Possible extensions:

  • Allow buildings to attack(-ground).
  • Allow users to specify a radius to bombard.
Test Plan

Select a ranged unit and click the placeholder button (two swords), next click on a location. Note that when an enemy passes that location it gets damaged.
One can in-/decrease the bombarding radius using the PageUp/PageDown hotkeys.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Freagarach updated this revision to Diff 8949.Jul 17 2019, 8:29 AM
Freagarach edited the summary of this revision. (Show Details)

Rebased.

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  23|  23| 	let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|    |-			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|    |  26|+		(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|    |-			0,
|    |  27|+		0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|    |-			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|    |  28|+		(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|  31|  31| /**
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
| 112| 112| 
| 113| 113| 	// Do this first in case the direct hit kills the target
| 114| 114| 	if (data.isSplash)
| 115|    |-	{
|    | 115|+	
| 116| 116| 		this.CauseDamageOverArea({
| 117| 117| 			"attacker": data.attacker,
| 118| 118| 			"origin": Vector2D.from3D(data.position),
| 125| 125| 			"type": data.type,
| 126| 126| 			"attackerOwner": data.attackerOwner
| 127| 127| 		});
| 128|    |-	}
|    | 128|+	
| 129| 129| 
| 130| 130| 	let cmpProjectileManager = Engine.QueryInterface(SYSTEM_ENTITY, IID_ProjectileManager);
| 131| 131| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
| 224| 224| 				damageMultiplier = 0;
| 225| 225| 		}
| 226| 226| 		else // In case someone calls this function with an invalid shape.
| 227|    |-		{
|    | 227|+		
| 228| 228| 			warn("The " + data.shape + " splash damage shape is not implemented!");
| 229|    |-		}
|    | 229|+		
| 230| 230| 
| 231| 231| 		if (data.splashBonus)
| 232| 232| 			damageMultiplier *= GetDamageBonus(data.attacker, ent, data.type, data.splashBonus);
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
| 558| 558| 
| 559| 559| 		let horizSpeed = +this.template[type].Projectile.Speed;
| 560| 560| 		let gravity = +this.template[type].Projectile.Gravity;
| 561|    |-		//horizSpeed /= 2; gravity /= 2; // slow it down for testing
|    | 561|+		// horizSpeed /= 2; gravity /= 2; // slow it down for testing
| 562| 562| 
| 563| 563| 		let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 564| 564| 		if (!cmpPosition || !cmpPosition.IsInWorld())
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
| 612| 612| 		// TODO: Use unit rotation to implement x/z offsets.
| 613| 613| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 614| 614| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 615|    |-		
|    | 615|+
| 616| 616| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 617| 617| 		if (cmpVisual)
| 618| 618| 		{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
| 684| 684| 			});
| 685| 685| 	}
| 686| 686| 	else
| 687|    |-	{
|    | 687|+	
| 688| 688| 		// Melee attack - hurt the target immediately
| 689| 689| 		cmpDamage.CauseDamage({
| 690| 690| 			"strengths": this.GetAttackStrengths(type),
| 694| 694| 			"type": type,
| 695| 695| 			"attackerOwner": attackerOwner
| 696| 696| 		});
| 697|    |-	}
|    | 697|+	
| 698| 698| };
| 699| 699| 
| 700| 700| /**

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

binaries/data/mods/public/simulation/components/Attack.js
| 659| »   »   cmpTimer.SetTimeout(SYSTEM_ENTITY,·IID_Damage,·"MissileHit",·timeToTarget·*·1000·+·+this.template[type].Delay,·data);
|    | [NORMAL] JSHintBear:
|    | Confusing plusses.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|1575|1575| 			return {
|1576|1576| 				"possible": true,
|1577|1577| 				"tooltip": g_UnitActions[action].getActionInfo("attack-ground", selection).tooltip
|1578|    |-			}
|    |1578|+			};
|1579|1579| 
|1580|1580| 		return {
|1581|1581| 			"possible": ["move", "attack-move", "remove-guard", "patrol"].indexOf(action) != -1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
| 394| 394| function getRepairTimeTooltip(entState)
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397|    |-			"label": headerFont(translate("Number of repairers:")),
|    | 397|+		"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
| 395| 395| {
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398|    |-			"details": entState.repairable.numBuilders
|    | 398|+		"details": entState.repairable.numBuilders
| 399| 399| 		}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
| 396| 396| 	return sprintf(translate("%(label)s %(details)s"), {
| 397| 397| 			"label": headerFont(translate("Number of repairers:")),
| 398| 398| 			"details": entState.repairable.numBuilders
| 399|    |-		}) + "\n" + (entState.repairable.numBuilders ?
|    | 399|+	}) + "\n" + (entState.repairable.numBuilders ?
| 400| 400| 		sprintf(translatePlural(
| 401| 401| 			"Add another worker to speed up the repairs by %(second)s second.",
| 402| 402| 			"Add another worker to speed up the repairs by %(second)s seconds.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
| 416| 416| function getBuildTimeTooltip(entState)
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419|    |-			"label": headerFont(translate("Number of builders:")),
|    | 419|+		"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
| 417| 417| {
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420|    |-			"details": entState.foundation.numBuilders
|    | 420|+		"details": entState.foundation.numBuilders
| 421| 421| 		}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 2.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/common/tooltips.js
| 418| 418| 	return sprintf(translate("%(label)s %(details)s"), {
| 419| 419| 			"label": headerFont(translate("Number of builders:")),
| 420| 420| 			"details": entState.foundation.numBuilders
| 421|    |-		}) + "\n" + (entState.foundation.numBuilders ?
|    | 421|+	}) + "\n" + (entState.foundation.numBuilders ?
| 422| 422| 		sprintf(translatePlural(
| 423| 423| 			"Add another worker to speed up the construction by %(second)s second.",
| 424| 424| 			"Add another worker to speed up the construction by %(second)s seconds.",
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 798| 798| 
| 799| 799| 	// Handle the time-warp testing features, restricted to single-player
| 800| 800| 	if (!g_IsNetworked && g_DeveloperOverlay.isTimeWarpEnabled())
| 801|    |-	{
|    | 801|+	
| 802| 802| 		if (ev.type == "hotkeydown" && ev.hotkey == "session.timewarp.fastforward")
| 803| 803| 			Engine.SetSimRate(20.0);
| 804| 804| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.fastforward")
| 805| 805| 			Engine.SetSimRate(1.0);
| 806| 806| 		else if (ev.type == "hotkeyup" && ev.hotkey == "session.timewarp.rewind")
| 807| 807| 			Engine.RewindTimeWarp();
| 808|    |-	}
|    | 808|+	
| 809| 809| 
| 810| 810| 	if (ev.hotkey == "session.highlightguarding")
| 811| 811| 	{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 920| 920| 
| 921| 921| 		case "hotkeydown":
| 922| 922| 			if (preSelectedAction == ACTION_ATTACKGROUND && ev.hotkey == "session.attackgroundbombardradius.decrease")
| 923|    |-			{
|    | 923|+			
| 924| 924| 				AttackGroundBombardRadiusChange(-1);
| 925|    |-			}
|    | 925|+			
| 926| 926| 			else if (preSelectedAction == ACTION_ATTACKGROUND && ev.hotkey == "session.attackgroundbombardradius.increase")
| 927| 927| 			{
| 928| 928| 				AttackGroundBombardRadiusChange(1);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 924| 924| 				AttackGroundBombardRadiusChange(-1);
| 925| 925| 			}
| 926| 926| 			else if (preSelectedAction == ACTION_ATTACKGROUND && ev.hotkey == "session.attackgroundbombardradius.increase")
| 927|    |-			{
|    | 927|+			
| 928| 928| 				AttackGroundBombardRadiusChange(1);
| 929|    |-			}
|    | 929|+			
| 930| 930| 
| 931| 931| 		default:
| 932| 932| 			// Slight hack: If selection is empty, reset the input state
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1059|1059| 			placementSupport.position = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|1060|1060| 
|1061|1061| 			if (placementSupport.mode === "wall")
|1062|    |-			{
|    |1062|+			
|1063|1063| 				// Including only the on-screen towers in the next snap candidate list is sufficient here, since the user is
|1064|1064| 				// still selecting a starting point (which must necessarily be on-screen). (The update of the snap entities
|1065|1065| 				// itself happens in the call to updateBuildingPlacementPreview below).
|1066|1066| 				placementSupport.wallSnapEntitiesIncludeOffscreen = false;
|1067|    |-			}
|    |1067|+			
|1068|1068| 			else
|1069|1069| 			{
|1070|1070| 				// cancel if not enough resources
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1331|1331| 	if (templateData.attack &&
|1332|1332| 		templateData.attack.Ranged &&
|1333|1333| 		templateData.attack.Ranged.maxRange)
|1334|    |-	{
|    |1334|+	
|1335|1335| 		// add attack information to display a good tooltip
|1336|1336| 		placementSupport.attack = templateData.attack;
|1337|    |-	}
|    |1337|+	
|1338|1338| }
|1339|1339| 
|1340|1340| // Attack ground:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1447|1447| 	if (Engine.HotkeyIsPressed("session.batchtrain") && (canBeAddedCount == undefined || canBeAddedCount > 1))
|1448|1448| 	{
|1449|1449| 		if (inputState == INPUT_BATCHTRAINING)
|1450|    |-		{
|    |1450|+		
|1451|1451| 			// Check if we are training in the same building(s) as the last batch
|1452|1452| 			// NOTE: We just check if the arrays are the same and if the order is the same
|1453|1453| 			// If the order changed, we have a new selection and we should create a new batch.
|1480|1480| 			else if (!decrement)
|1481|1481| 				flushTrainingBatch();
|1482|1482| 				// fall through to create the new batch
|1483|    |-		}
|    |1483|+		
|1484|1484| 
|1485|1485| 		// Don't start a new batch if decrementing or unable to afford it.
|1486|1486| 		if (decrement || Engine.GuiInterfaceCall("GetNeededResources", { "cost":
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1557|1557| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1558|1558| 	{
|1559|1559| 		// Train as many full batches as we can
|1560|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1560|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1561|1561| 		Engine.PostNetworkCommand({
|1562|1562| 			"type": "train",
|1563|1563| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1636|1636| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1637|1637| 
|1638|1638| 	// Reset the last idle unit, etc., if the selection type has changed.
|1639|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1639|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1640|1640| 		resetIdleUnit();
|1641|1641| 	lastIdleClasses = classes;
|1642|1642| 

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 905| »   »   »   »   »   action.radius·=·g_AttackGroundSize;
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1342| var·g_AttackGroundSize·=·getDefaultAttackGroundSize();
|    | [NORMAL] JSHintBear:
|    | 'g_AttackGroundSize' was used before it was defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-let result = {
|    |  26|+	let result = {
|  27|  27| 		"min": 0,
|  28|  28| 		"max": this.canAttackAsFormation ? -1 : 0,
|  29|  29| 		"elevationBonus": this.canAttackAsFormation ? -1 : 0
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|  66|  66| 		let phase = "";
|  67|  67| 		let cmpTechnologyManager = QueryPlayerIDInterface(i, IID_TechnologyManager);
|  68|  68| 		if (cmpTechnologyManager)
|  69|    |-		{
|    |  69|+		
|  70|  70| 			if (cmpTechnologyManager.IsTechnologyResearched("phase_city"))
|  71|  71| 				phase = "city";
|  72|  72| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_town"))
|  73|  73| 				phase = "town";
|  74|  74| 			else if (cmpTechnologyManager.IsTechnologyResearched("phase_village"))
|  75|  75| 				phase = "village";
|  76|    |-		}
|    |  76|+		
|  77|  77| 
|  78|  78| 		// store player ally/neutral/enemy data as arrays
|  79|  79| 		let allies = [];
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 415| 415| 			ret.attack[type].elevationBonus = range.elevationBonus;
| 416| 416| 
| 417| 417| 			if (cmpUnitAI && cmpPosition && cmpPosition.IsInWorld())
| 418|    |-			{
|    | 418|+			
| 419| 419| 				// For units, take the range in front of it, no spread. So angle = 0
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421|    |-			}
|    | 421|+			
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423| 423| 			{
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 420| 420| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 0);
| 421| 421| 			}
| 422| 422| 			else if(cmpPosition && cmpPosition.IsInWorld())
| 423|    |-			{
|    | 423|+			
| 424| 424| 				// For buildings, take the average elevation around it. So angle = 2*pi
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426|    |-			}
|    | 426|+			
| 427| 427| 			else
| 428| 428| 			{
| 429| 429| 				// not in world, set a default?
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 425| 425| 				ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI);
| 426| 426| 			}
| 427| 427| 			else
| 428|    |-			{
|    | 428|+			
| 429| 429| 				// not in world, set a default?
| 430| 430| 				ret.attack[type].elevationAdaptedRange = ret.attack.maxRange;
| 431|    |-			}
|    | 431|+			
| 432| 432| 		}
| 433| 433| 
| 434| 434| 		ret.attack.attackGround = cmpAttack.CanAttackGround();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 798| 798| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 799| 799| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 800| 800| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 801|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 801|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 802| 802| 	}
| 803| 803| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 804| 804| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1317|1317| 		}
|1318|1318| 	}
|1319|1319| 	else
|1320|    |-	{
|    |1320|+	
|1321|1321| 		// Didn't snap to an existing entity, add the starting tower manually. To prevent odd-looking rotation jumps
|1322|1322| 		// when shift-clicking to build a wall, reuse the placement angle that was last seen on a validly positioned
|1323|1323| 		// wall piece.
|1338|1338| 			"pos": start.pos,
|1339|1339| 			"angle": previewEntities.length > 0 ? previewEntities[0].angle : this.placementWallLastAngle
|1340|1340| 		});
|1341|    |-	}
|    |1341|+	
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|1344| 	{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1341|1341| 	}
|1342|1342| 
|1343|1343| 	if (end.pos)
|1344|    |-	{
|    |1344|+	
|1345|1345| 		// Analogous to the starting side case above
|1346|1346| 		if (end.snappedEnt && end.snappedEnt != INVALID_ENTITY)
|1347|1347| 		{
|1379|1379| 				"pos": end.pos,
|1380|1380| 				"angle": previewEntities.length > 0 ? previewEntities[previewEntities.length-1].angle : this.placementWallLastAngle
|1381|1381| 			});
|1382|    |-	}
|    |1382|+	
|1383|1383| 
|1384|1384| 	let cmpTerrain = Engine.QueryInterface(SYSTEM_ENTITY, IID_Terrain);
|1385|1385| 	if (!cmpTerrain)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1557|1557| 
|1558|1558| 		let cmpVisual = Engine.QueryInterface(ent, IID_Visual);
|1559|1559| 		if (cmpVisual)
|1560|    |-		{
|    |1560|+		
|1561|1561| 			if (!allPiecesValid || !canAfford)
|1562|1562| 				cmpVisual.SetShadingColor(1.4, 0.4, 0.4, 1);
|1563|1563| 			else
|1564|1564| 				cmpVisual.SetShadingColor(1, 1, 1, 1);
|1565|    |-		}
|    |1565|+		
|1566|1566| 
|1567|1567| 		++entPool.numUsed;
|1568|1568| 	}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1631|1631| 			{
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|    |-						"x": pos.x,
|    |1634|+					"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|    |-						"z": pos.z,
|    |1635|+					"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|    |-						"angle": cmpPosition.GetRotation().y,
|    |1636|+					"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|    |-						"ent": ent
|    |1637|+					"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|1640|1640| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1779|1779| 			result.gain = cmpEntityTrader.GetGoods().amount;
|1780|1780| 	}
|1781|1781| 	else if (data.target === secondMarket)
|1782|    |-	{
|    |1782|+	
|1783|1783| 		result = {
|1784|1784| 			"type": "is second",
|1785|1785| 			"gain": cmpEntityTrader.GetGoods().amount,
|1786|1786| 		};
|1787|    |-	}
|    |1787|+	
|1788|1788| 	else if (!firstMarket)
|1789|1789| 	{
|1790|1790| 		result = { "type": "set first" };
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1786|1786| 		};
|1787|1787| 	}
|1788|1788| 	else if (!firstMarket)
|1789|    |-	{
|    |1789|+	
|1790|1790| 		result = { "type": "set first" };
|1791|    |-	}
|    |1791|+	
|1792|1792| 	else if (!secondMarket)
|1793|1793| 	{
|1794|1794| 		result = {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1790|1790| 		result = { "type": "set first" };
|1791|1791| 	}
|1792|1792| 	else if (!secondMarket)
|1793|    |-	{
|    |1793|+	
|1794|1794| 		result = {
|1795|1795| 			"type": "set second",
|1796|1796| 			"gain": cmpEntityTrader.CalculateGain(firstMarket, data.target),
|1797|1797| 		};
|1798|    |-	}
|    |1798|+	
|1799|1799| 	else
|1800|1800| 	{
|1801|1801| 		// Else both markets are not null and target is different from them
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1797|1797| 		};
|1798|1798| 	}
|1799|1799| 	else
|1800|    |-	{
|    |1800|+	
|1801|1801| 		// Else both markets are not null and target is different from them
|1802|1802| 		result = { "type": "set first" };
|1803|    |-	}
|    |1803|+	
|1804|1804| 	return result;
|1805|1805| };
|1806|1806| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353| 353| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354| 354| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355|    |-		{
|    | 355|+		
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 358| 358| 				needToMove = false;
| 359|    |-		}
|    | 359|+		
| 360| 360| 
| 361| 361| 		if (needToMove)
| 362| 362| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 350| 350| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 351| 351| 		var needToMove = true;
| 352| 352| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 353|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 354|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 353|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 354|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 355| 355| 		{
| 356| 356| 			// we were already on the shoreline, and have not moved since
| 357| 357| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 538| 538| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 539| 539| 				}
| 540| 540| 				else
| 541|    |-				{
|    | 541|+				
| 542| 542| 					// We couldn't move there, or the target moved away
| 543| 543| 					this.FinishOrder();
| 544|    |-				}
|    | 544|+				
| 545| 545| 				return;
| 546| 546| 			}
| 547| 547| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 775| 775| 			}
| 776| 776| 			// Check if we are already in range, otherwise walk there
| 777| 777| 			if (!this.CheckGarrisonRange(msg.data.target))
| 778|    |-			{
|    | 778|+			
| 779| 779| 				if (!this.CheckTargetVisible(msg.data.target))
| 780| 780| 				{
| 781| 781| 					this.FinishOrder();
| 786| 786| 					this.SetNextState("GARRISON.APPROACHING");
| 787| 787| 					return;
| 788| 788| 				}
| 789|    |-			}
|    | 789|+			
| 790| 790| 
| 791| 791| 			this.SetNextState("GARRISON.GARRISONING");
| 792| 792| 		},
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 781| 781| 					this.FinishOrder();
| 782| 782| 					return;
| 783| 783| 				}
| 784|    |-				else
| 785|    |-				{
|    | 784|+				
| 786| 785| 					this.SetNextState("GARRISON.APPROACHING");
| 787| 786| 					return;
| 788|    |-				}
|    | 787|+				
| 789| 788| 			}
| 790| 789| 
| 791| 790| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 804| 804| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 805| 805| 					}
| 806| 806| 					else
| 807|    |-					{
|    | 807|+					
| 808| 808| 						// We couldn't move there, or the target moved away
| 809| 809| 						this.FinishOrder();
| 810|    |-					}
|    | 810|+					
| 811| 811| 					return;
| 812| 812| 				}
| 813| 813| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1037|1037| 			},
|1038|1038| 		},
|1039|1039| 
|1040|    |-		"GARRISON":{
|    |1040|+		"GARRISON": {
|1041|1041| 			"enter": function() {
|1042|1042| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1043|1043| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1174|1174| 							this.FinishOrder();
|1175|1175| 							if (attackEntity)
|1176|1176| 								this.PushOrderFront("Attack", {
|1177|    |-										"target": target,
|    |1177|+									"target": target,
|1178|1178| 										"force": false,
|1179|1179| 										"allowCapture": allowCapture
|1180|1180| 									});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1175|1175| 							if (attackEntity)
|1176|1176| 								this.PushOrderFront("Attack", {
|1177|1177| 										"target": target,
|1178|    |-										"force": false,
|    |1178|+									"force": false,
|1179|1179| 										"allowCapture": allowCapture
|1180|1180| 									});
|1181|1181| 							else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1176|1176| 								this.PushOrderFront("Attack", {
|1177|1177| 										"target": target,
|1178|1178| 										"force": false,
|1179|    |-										"allowCapture": allowCapture
|    |1179|+									"allowCapture": allowCapture
|1180|1180| 									});
|1181|1181| 							else
|1182|1182| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 9.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1177|1177| 										"target": target,
|1178|1178| 										"force": false,
|1179|1179| 										"allowCapture": allowCapture
|1180|    |-									});
|    |1180|+								});
|1181|1181| 							else
|1182|1182| 								this.PushOrderFront("AttackGround", {
|1183|1183| 									"target": target,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1214|1214| 							this.FinishOrder();
|1215|1215| 							if (attackEntity)
|1216|1216| 								this.PushOrderFront("Attack", {
|1217|    |-										"target": target,
|    |1217|+									"target": target,
|1218|1218| 										"force": false,
|1219|1219| 										"allowCapture": allowCapture
|1220|1220| 									});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1215|1215| 							if (attackEntity)
|1216|1216| 								this.PushOrderFront("Attack", {
|1217|1217| 										"target": target,
|1218|    |-										"force": false,
|    |1218|+									"force": false,
|1219|1219| 										"allowCapture": allowCapture
|1220|1220| 									});
|1221|1221| 							else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1216|1216| 								this.PushOrderFront("Attack", {
|1217|1217| 										"target": target,
|1218|1218| 										"force": false,
|1219|    |-										"allowCapture": allowCapture
|    |1219|+									"allowCapture": allowCapture
|1220|1220| 									});
|1221|1221| 							else
|1222|1222| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 9.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1217|1217| 										"target": target,
|1218|1218| 										"force": false,
|1219|1219| 										"allowCapture": allowCapture
|1220|    |-									});
|    |1220|+								});
|1221|1221| 							else
|1222|1222| 								this.PushOrderFront("AttackGround", {
|1223|1223| 									"target": target,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1287|1287| 			// If the controller handled an order but some members rejected it,
|1288|1288| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1289|1289| 			if (this.orderQueue.length)
|1290|    |-			{
|    |1290|+			
|1291|1291| 				// We're leaving the formation, so stop our FormationWalk order
|1292|1292| 				if (this.FinishOrder())
|1293|1293| 					return;
|1294|    |-			}
|    |1294|+			
|1295|1295| 
|1296|1296| 			// No orders left, we're an individual now
|1297|1297| 			this.SetNextState("INDIVIDUAL.IDLE");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1312|1312| 			// Move a tile outside the building
|1313|1313| 			let range = 4;
|1314|1314| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, -1))
|1315|    |-			{
|    |1315|+			
|1316|1316| 				// We are already at the target, or can't move at all
|1317|1317| 				this.FinishOrder();
|1318|    |-			}
|    |1318|+			
|1319|1319| 			else
|1320|1320| 			{
|1321|1321| 				this.order.data.min = range;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1513|1513| 
|1514|1514| 			"LosRangeUpdate": function(msg) {
|1515|1515| 				if (this.GetStance().targetVisibleEnemies)
|1516|    |-				{
|    |1516|+				
|1517|1517| 					// Start attacking one of the newly-seen enemy (if any)
|1518|1518| 					this.AttackEntitiesByPreference(msg.data.added);
|1519|    |-				}
|    |1519|+				
|1520|1520| 			},
|1521|1521| 
|1522|1522| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1561|1561| 				}
|1562|1562| 			},
|1563|1563| 
|1564|    |-			"leave": function () {
|    |1564|+			"leave": function() {
|1565|1565| 				this.StopMoving();
|1566|1566| 			},
|1567|1567| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1736|1736| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1737|1737| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1738|1738| 						if (cmpHealth && cmpHealth.IsInjured())
|1739|    |-						{
|    |1739|+						
|1740|1740| 							if (this.CanHeal(this.isGuardOf))
|1741|1741| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1742|1742| 							else if (this.CanRepair(this.isGuardOf))
|1743|1743| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1744|    |-						}
|    |1744|+						
|1745|1745| 					}
|1746|1746| 				},
|1747|1747| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2069|2069| 
|2070|2070| 				"Attacked": function(msg) {
|2071|2071| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2072|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2073|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2072|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2073|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2074|2074| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2075|2075| 				},
|2076|2076| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2121|2121| 
|2122|2122| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2123|2123| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2124|    |-					{
|    |2124|+					
|2125|2125| 						// Run after a fleeing target
|2126|2126| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2127|    |-					}
|    |2127|+					
|2128|2128| 					this.StartTimer(1000, 1000);
|2129|2129| 				},
|2130|2130| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2472|2472| 
|2473|2473| 				"Timer": function(msg) {
|2474|2474| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2475|    |-					{
|    |2475|+					
|2476|2476| 						// Return to our original position unless we have a better order.
|2477|2477| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2478|2478| 							this.WalkToHeldPosition();
|2479|    |-					}
|    |2479|+					
|2480|2480| 				},
|2481|2481| 
|2482|2482| 				"MovementUpdate": function() {
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2506|2506| 					this.StartTimer(prepare, this.healTimers.repeat);
|2507|2507| 
|2508|2508| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2509|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2509|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2510|2510| 
|2511|2511| 					this.FaceTowardsTarget(this.order.data.target);
|2512|2512| 				},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2714|2714| 					{
|2715|2715| 						// The building was already finished/fully repaired before we arrived;
|2716|2716| 						// let the ConstructionFinished handler handle this.
|2717|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2717|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2718|2718| 						return true;
|2719|2719| 					}
|2720|2720| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2714|2714| 					{
|2715|2715| 						// The building was already finished/fully repaired before we arrived;
|2716|2716| 						// let the ConstructionFinished handler handle this.
|2717|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2717|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2718|2718| 						return true;
|2719|2719| 					}
|2720|2720| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3099|3099| 		"Attacked": function(msg) {
|3100|3100| 			if (this.template.NaturalBehaviour == "skittish" ||
|3101|3101| 			    this.template.NaturalBehaviour == "passive")
|3102|    |-			{
|    |3102|+			
|3103|3103| 				this.Flee(msg.data.attacker, false);
|3104|    |-			}
|    |3104|+			
|3105|3105| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3106|3106| 			{
|3107|3107| 				if (this.CanAttack(msg.data.attacker))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3108|3108| 					this.Attack(msg.data.attacker, false);
|3109|3109| 			}
|3110|3110| 			else if (this.template.NaturalBehaviour == "domestic")
|3111|    |-			{
|    |3111|+			
|3112|3112| 				// Never flee, stop what we were doing
|3113|3113| 				this.SetNextState("IDLE");
|3114|    |-			}
|    |3114|+			
|3115|3115| 		},
|3116|3116| 
|3117|3117| 		"Order.LeaveFoundation": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3162|3162| 				}
|3163|3163| 				// Start attacking one of the newly-seen enemy (if any)
|3164|3164| 				else if (this.IsDangerousAnimal())
|3165|    |-				{
|    |3165|+				
|3166|3166| 					this.AttackVisibleEntity(msg.data.added);
|3167|    |-				}
|    |3167|+				
|3168|3168| 
|3169|3169| 				// TODO: if two units enter our range together, we'll attack the
|3170|3170| 				// first and then the second won't trigger another LosRangeUpdate
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3206|3206| 				}
|3207|3207| 				// Start attacking one of the newly-seen enemy (if any)
|3208|3208| 				else if (this.template.NaturalBehaviour == "violent")
|3209|    |-				{
|    |3209|+				
|3210|3210| 					this.AttackVisibleEntity(msg.data.added);
|3211|    |-				}
|    |3211|+				
|3212|3212| 			},
|3213|3213| 
|3214|3214| 			"Timer": function(msg) {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3221|3221| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3222|3222| 
|3223|3223| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3224|    |-							// only used for domestic animals
|    |3224|+		// only used for domestic animals
|3225|3225| 	},
|3226|3226| };
|3227|3227| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3278|3278| 
|3279|3279| UnitAI.prototype.IsAnimal = function()
|3280|3280| {
|3281|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3281|+	return (!!this.template.NaturalBehaviour);
|3282|3282| };
|3283|3283| 
|3284|3284| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3316|3316| UnitAI.prototype.GetGarrisonHolder = function()
|3317|3317| {
|3318|3318| 	if (this.IsGarrisoned())
|3319|    |-	{
|    |3319|+	
|3320|3320| 		for (let order of this.orderQueue)
|3321|3321| 			if (order.type == "Garrison")
|3322|3322| 				return order.data.target;
|3323|    |-	}
|    |3323|+	
|3324|3324| 	return INVALID_ENTITY;
|3325|3325| };
|3326|3326| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3394|3394| 		{
|3395|3395| 			let index = this.GetCurrentState().indexOf(".");
|3396|3396| 			if (index != -1)
|3397|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3397|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3398|3398| 			this.Stop(false);
|3399|3399| 		}
|3400|3400| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3450|3450| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3451|3451| 			continue;
|3452|3452| 		if (i == 0)
|3453|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3453|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3454|3454| 		else
|3455|3455| 			this.orderQueue.splice(i, 1);
|3456|3456| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3450|3450| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3451|3451| 			continue;
|3452|3452| 		if (i == 0)
|3453|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3453|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3454|3454| 		else
|3455|3455| 			this.orderQueue.splice(i, 1);
|3456|3456| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3534|3534| };
|3535|3535| 
|3536|3536| 
|3537|    |-//// FSM linkage functions ////
|    |3537|+// // FSM linkage functions ////
|3538|3538| 
|3539|3539| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3540|3540| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3704|3704| 				continue;
|3705|3705| 			if (this.orderQueue[i].type == type)
|3706|3706| 				continue;
|3707|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3707|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3708|3708| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3709|3709| 			return;
|3710|3710| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3704|3704| 				continue;
|3705|3705| 			if (this.orderQueue[i].type == type)
|3706|3706| 				continue;
|3707|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3707|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3708|3708| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3709|3709| 			return;
|3710|3710| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3718|3718| {
|3719|3719| 	// Remember the previous work orders to be able to go back to them later if required
|3720|3720| 	if (data && data.force)
|3721|    |-	{
|    |3721|+	
|3722|3722| 		if (this.IsFormationController())
|3723|3723| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3724|3724| 		else
|3725|3725| 			this.UpdateWorkOrders(type);
|3726|    |-	}
|    |3726|+	
|3727|3727| 
|3728|3728| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3729|3729| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3795|3795| 	{
|3796|3796| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3797|3797| 		if (cmpUnitAI)
|3798|    |-		{
|    |3798|+		
|3799|3799| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3800|3800| 			{
|3801|3801| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3804|3804| 					return;
|3805|3805| 				}
|3806|3806| 			}
|3807|    |-		}
|    |3807|+		
|3808|3808| 	}
|3809|3809| 
|3810|3810| 	// If nothing found, take the unit orders
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3797|3797| 		if (cmpUnitAI)
|3798|3798| 		{
|3799|3799| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3800|    |-			{
|    |3800|+			
|3801|3801| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3802|3802| 				{
|3803|3803| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3804|3804| 					return;
|3805|3805| 				}
|3806|    |-			}
|    |3806|+			
|3807|3807| 		}
|3808|3808| 	}
|3809|3809| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3809|3809| 
|3810|3810| 	// If nothing found, take the unit orders
|3811|3811| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3812|    |-	{
|    |3812|+	
|3813|3813| 		if (isWorkType(this.orderQueue[i].type))
|3814|3814| 		{
|3815|3815| 			this.workOrders = this.orderQueue.slice(i);
|3816|3816| 			return;
|3817|3817| 		}
|3818|    |-	}
|    |3818|+	
|3819|3819| };
|3820|3820| 
|3821|3821| UnitAI.prototype.BackToWork = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3875|3875| 	if (data.timerRepeat === undefined)
|3876|3876| 		this.timer = undefined;
|3877|3877| 
|3878|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3878|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3879|3879| };
|3880|3880| 
|3881|3881| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3875|3875| 	if (data.timerRepeat === undefined)
|3876|3876| 		this.timer = undefined;
|3877|3877| 
|3878|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3878|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3879|3879| };
|3880|3880| 
|3881|3881| /**
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3910|3910| 	this.timer = undefined;
|3911|3911| };
|3912|3912| 
|3913|    |-//// Message handlers /////
|    |3913|+// // Message handlers /////
|3914|3914| 
|3915|3915| UnitAI.prototype.OnMotionChanged = function(msg)
|3916|3916| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3922|3922| 	// TODO: This is a bit inefficient since every unit listens to every
|3923|3923| 	// construction message - ideally we could scope it to only the one we're building
|3924|3924| 
|3925|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3925|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3926|3926| };
|3927|3927| 
|3928|3928| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3922|3922| 	// TODO: This is a bit inefficient since every unit listens to every
|3923|3923| 	// construction message - ideally we could scope it to only the one we're building
|3924|3924| 
|3925|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3925|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3926|3926| };
|3927|3927| 
|3928|3928| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3947|3947| 
|3948|3948| UnitAI.prototype.OnAttacked = function(msg)
|3949|3949| {
|3950|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3950|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3951|3951| };
|3952|3952| 
|3953|3953| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3947|3947| 
|3948|3948| UnitAI.prototype.OnAttacked = function(msg)
|3949|3949| {
|3950|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3950|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3951|3951| };
|3952|3952| 
|3953|3953| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3952|3952| 
|3953|3953| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3954|3954| {
|3955|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3955|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3956|3956| };
|3957|3957| 
|3958|3958| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3952|3952| 
|3953|3953| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3954|3954| {
|3955|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3955|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3956|3956| };
|3957|3957| 
|3958|3958| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3957|3957| 
|3958|3958| UnitAI.prototype.OnHealthChanged = function(msg)
|3959|3959| {
|3960|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3960|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3961|3961| };
|3962|3962| 
|3963|3963| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3957|3957| 
|3958|3958| UnitAI.prototype.OnHealthChanged = function(msg)
|3959|3959| {
|3960|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3960|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3961|3961| };
|3962|3962| 
|3963|3963| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3963|3963| UnitAI.prototype.OnRangeUpdate = function(msg)
|3964|3964| {
|3965|3965| 	if (msg.tag == this.losRangeQuery)
|3966|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3966|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3967|3967| 	else if (msg.tag == this.losHealRangeQuery)
|3968|3968| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3969|3969| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3963|3963| UnitAI.prototype.OnRangeUpdate = function(msg)
|3964|3964| {
|3965|3965| 	if (msg.tag == this.losRangeQuery)
|3966|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3966|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3967|3967| 	else if (msg.tag == this.losHealRangeQuery)
|3968|3968| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3969|3969| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3965|3965| 	if (msg.tag == this.losRangeQuery)
|3966|3966| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3967|3967| 	else if (msg.tag == this.losHealRangeQuery)
|3968|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3968|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3969|3969| };
|3970|3970| 
|3971|3971| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3965|3965| 	if (msg.tag == this.losRangeQuery)
|3966|3966| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3967|3967| 	else if (msg.tag == this.losHealRangeQuery)
|3968|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3968|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3969|3969| };
|3970|3970| 
|3971|3971| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3970|3970| 
|3971|3971| UnitAI.prototype.OnPackFinished = function(msg)
|3972|3972| {
|3973|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3973|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3974|3974| };
|3975|3975| 
|3976|3976| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3970|3970| 
|3971|3971| UnitAI.prototype.OnPackFinished = function(msg)
|3972|3972| {
|3973|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3973|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3974|3974| };
|3975|3975| 
|3976|3976| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3973|3973| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3974|3974| };
|3975|3975| 
|3976|    |-//// Helper functions to be called by the FSM ////
|    |3976|+// // Helper functions to be called by the FSM ////
|3977|3977| 
|3978|3978| UnitAI.prototype.GetWalkSpeed = function()
|3979|3979| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4160|4160| 			PlaySound(name, member);
|4161|4161| 	}
|4162|4162| 	else
|4163|    |-	{
|    |4163|+	
|4164|4164| 		// Otherwise use our own sounds
|4165|4165| 		PlaySound(name, this.entity);
|4166|    |-	}
|    |4166|+	
|4167|4167| };
|4168|4168| 
|4169|4169| /*
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4429|4429| 
|4430|4430| 	let cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
|4431|4431| 	if (cmpUnitMotion)
|4432|    |-	{
|    |4432|+	
|4433|4433| 		if (attackEntity)
|4434|4434| 			return cmpUnitMotion.MoveToTargetRange(target, range.min, range.max);
|4435|4435| 		else
|4436|4436| 			return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|4437|    |-	}
|    |4437|+	
|4438|4438| 
|4439|4439| 	return false;
|4440|4440| };
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4432|4432| 	{
|4433|4433| 		if (attackEntity)
|4434|4434| 			return cmpUnitMotion.MoveToTargetRange(target, range.min, range.max);
|4435|    |-		else
|4436|    |-			return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|    |4435|+		return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|4437|4436| 	}
|4438|4437| 
|4439|4438| 	return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4582|4582| 	if (this.IsFormationMember())
|4583|4583| 	{
|4584|4584| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4585|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4586|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4585|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4586|+			cmpFormationUnitAI.order.data.target == target)
|4587|4587| 			return true;
|4588|4588| 	}
|4589|4589| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4740|4740| UnitAI.prototype.AttackEntityInZone = function(ents)
|4741|4741| {
|4742|4742| 	var target = ents.find(target =>
|4743|    |-		this.CanAttack(target)
|4744|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4743|+		this.CanAttack(target) &&
|    |4744|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4745|4745| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4746|4746| 	);
|4747|4747| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4741|4741| {
|4742|4742| 	var target = ents.find(target =>
|4743|4743| 		this.CanAttack(target)
|4744|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4745|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4744|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4745|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4746|4746| 	);
|4747|4747| 	if (!target)
|4748|4748| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4805|4805| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4806|4806| 	if (this.isGuardOf)
|4807|4807| 	{
|4808|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4808|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4809|4809| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4810|4810| 		if (cmpUnitAI && cmpAttack &&
|4811|4811| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4809|4809| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4810|4810| 		if (cmpUnitAI && cmpAttack &&
|4811|4811| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4812|    |-				return false;
|    |4812|+			return false;
|4813|4813| 	}
|4814|4814| 
|4815|4815| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4814|4814| 
|4815|4815| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4816|4816| 	if (this.GetStance().respondHoldGround)
|4817|    |-	{
|    |4817|+	
|4818|4818| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4819|4819| 			return true;
|4820|    |-	}
|    |4820|+	
|4821|4821| 
|4822|4822| 	// Stop if it's left our vision range, unless we're especially persistent
|4823|4823| 	if (!this.GetStance().respondChaseBeyondVision)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4821|4821| 
|4822|4822| 	// Stop if it's left our vision range, unless we're especially persistent
|4823|4823| 	if (!this.GetStance().respondChaseBeyondVision)
|4824|    |-	{
|    |4824|+	
|4825|4825| 		if (!this.CheckTargetIsInVisionRange(target))
|4826|4826| 			return true;
|4827|    |-	}
|    |4827|+	
|4828|4828| 
|4829|4829| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4830|4830| 	// and will continue moving to its last seen position and then stop)
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4848|4848| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4849|4849| 	if (this.isGuardOf)
|4850|4850| 	{
|4851|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4851|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4852|4852| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4853|4853| 		if (cmpUnitAI && cmpAttack &&
|4854|4854| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4861|4861| 	return false;
|4862|4862| };
|4863|4863| 
|4864|    |-//// External interface functions ////
|    |4864|+// // External interface functions ////
|4865|4865| 
|4866|4866| UnitAI.prototype.SetFormationController = function(ent)
|4867|4867| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4871|4871| 	// of our own formation (or ourself if not in formation)
|4872|4872| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4873|4873| 	if (cmpObstruction)
|4874|    |-	{
|    |4874|+	
|4875|4875| 		if (ent == INVALID_ENTITY)
|4876|4876| 			cmpObstruction.SetControlGroup(this.entity);
|4877|4877| 		else
|4878|4878| 			cmpObstruction.SetControlGroup(ent);
|4879|    |-	}
|    |4879|+	
|4880|4880| 
|4881|4881| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4882|4882| 	if (ent == INVALID_ENTITY)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5055|5055| 	// if we already had an old guard order, do nothing if the target is the same
|5056|5056| 	// and the order is running, otherwise remove the previous order
|5057|5057| 	if (this.isGuardOf)
|5058|    |-	{
|    |5058|+	
|5059|5059| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5060|5060| 			return;
|5061|5061| 		else
|5062|5062| 			this.RemoveGuard();
|5063|    |-	}
|    |5063|+	
|5064|5064| 
|5065|5065| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|5066|5066| };
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5058|5058| 	{
|5059|5059| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5060|5060| 			return;
|5061|    |-		else
|5062|    |-			this.RemoveGuard();
|    |5061|+		this.RemoveGuard();
|5063|5062| 	}
|5064|5063| 
|5065|5064| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5407|5407| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5408|5408| 	{
|5409|5409| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5410|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5410|+		if (cmpTrader.HasBothMarkets() &&
|5411|5411| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5412|5412| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5413|5413| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5688|5688| 				{
|5689|5689| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5690|5690| 					var targetClasses = this.order.data.targetClasses;
|5691|    |-					if (targetClasses.attack && cmpIdentity
|5692|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5691|+					if (targetClasses.attack && cmpIdentity &&
|    |5692|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5693|5693| 						continue;
|5694|5694| 					if (targetClasses.avoid && cmpIdentity
|5695|5695| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5691|5691| 					if (targetClasses.attack && cmpIdentity
|5692|5692| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5693|5693| 						continue;
|5694|    |-					if (targetClasses.avoid && cmpIdentity
|5695|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5694|+					if (targetClasses.avoid && cmpIdentity &&
|    |5695|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5696|5696| 						continue;
|5697|5697| 					// Only used by the AIs to prevent some choices of targets
|5698|5698| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5714|5714| 		{
|5715|5715| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5716|5716| 			var targetClasses = this.order.data.targetClasses;
|5717|    |-			if (cmpIdentity && targetClasses.attack
|5718|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5717|+			if (cmpIdentity && targetClasses.attack &&
|    |5718|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5719|5719| 				continue;
|5720|5720| 			if (cmpIdentity && targetClasses.avoid
|5721|5721| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5717|5717| 			if (cmpIdentity && targetClasses.attack
|5718|5718| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5719|5719| 				continue;
|5720|    |-			if (cmpIdentity && targetClasses.avoid
|5721|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5720|+			if (cmpIdentity && targetClasses.avoid &&
|    |5721|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5722|5722| 				continue;
|5723|5723| 			// Only used by the AIs to prevent some choices of targets
|5724|5724| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5875|5875| 
|5876|5876| UnitAI.prototype.SetHeldPosition = function(x, z)
|5877|5877| {
|5878|    |-	this.heldPosition = {"x": x, "z": z};
|    |5878|+	this.heldPosition = { "x": x, "z": z};
|5879|5879| };
|5880|5880| 
|5881|5881| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5875|5875| 
|5876|5876| UnitAI.prototype.SetHeldPosition = function(x, z)
|5877|5877| {
|5878|    |-	this.heldPosition = {"x": x, "z": z};
|    |5878|+	this.heldPosition = {"x": x, "z": z };
|5879|5879| };
|5880|5880| 
|5881|5881| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5902|5902| 	return false;
|5903|5903| };
|5904|5904| 
|5905|    |-//// Helper functions ////
|    |5905|+// // Helper functions ////
|5906|5906| 
|5907|5907| UnitAI.prototype.CanAttack = function(target)
|5908|5908| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6106|6106| 	return cmpPack && cmpPack.IsPacking();
|6107|6107| };
|6108|6108| 
|6109|    |-//// Formation specific functions ////
|    |6109|+// // Formation specific functions ////
|6110|6110| 
|6111|6111| UnitAI.prototype.IsAttackingAsFormation = function()
|6112|6112| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6111|6111| UnitAI.prototype.IsAttackingAsFormation = function()
|6112|6112| {
|6113|6113| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6114|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6115|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6114|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6115|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6116|6116| };
|6117|6117| 
|6118|6118| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6115|6115| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6116|6116| };
|6117|6117| 
|6118|    |-//// Animal specific functions ////
|    |6118|+// // Animal specific functions ////
|6119|6119| 
|6120|6120| UnitAI.prototype.MoveRandomly = function(distance)
|6121|6121| {

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|1129| »   »   »   »   "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
|1326| »   »   "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
|1385| »   »   »   "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
|1476| »   »   »   "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
|1556| »   »   »   "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
|1575| »   »   »   "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
|1604| »   »   »   "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
|1756| »   »   »   "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
|1835| »   »   »   »   "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
|1912| »   »   »   »   "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
|2096| »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2112| »   »   »   »   "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
|2200| »   »   »   »   "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
|2452| »   »   »   »   "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
|2570| »   »   »   »   "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
|2632| »   »   »   »   "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
|2671| »   »   »   »   "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
|2877| »   »   »   »   "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
|3057| »   »   »   »   "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
|3780| »   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
|4727| »   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
|4742| »   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
|4788| »   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
|4811| »   »   ····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
| 354| »   »   ····&&·(this.lastShorelinePosition.z·==·cmpPosition.GetPosition().z))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/111/display/redirect

Freagarach updated this revision to Diff 9146.Jul 28 2019, 9:05 AM

Better passing of CanAttackGround in GUI.

Owners added a subscriber: Restricted Owners Package.Jul 28 2019, 9:05 AM
Freagarach planned changes to this revision.Jul 28 2019, 9:07 AM

I don't know why it included some other patch...

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpIdentity.h
|  27| class·ICmpIdentity·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpIdentity:' is invalid C code. Use --std or --language to configure the language.
Executing section JS...
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-let result = {
|    |  26|+	let result = {
|  27|  27| 		"min": 0,
|  28|  28| 		"max": this.canAttackAsFormation ? -1 : 0,
|  29|  29| 		"elevationBonus": this.canAttackAsFormation ? -1 : 0
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|1576|1576| 			return {
|1577|1577| 				"possible": true,
|1578|1578| 				"tooltip": g_UnitActions[action].getActionInfo("attack-ground", selection).tooltip
|1579|    |-			}
|    |1579|+			};
|1580|1580| 
|1581|1581| 		return {
|1582|1582| 			"possible": ["move", "attack-move", "remove-guard", "patrol"].indexOf(action) != -1

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

binaries/data/mods/public/gui/session/unit_actions.js
|1579| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1557|1557| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1558|1558| 	{
|1559|1559| 		// Train as many full batches as we can
|1560|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1560|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1561|1561| 		Engine.PostNetworkCommand({
|1562|1562| 			"type": "train",
|1563|1563| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1636|1636| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1637|1637| 
|1638|1638| 	// Reset the last idle unit, etc., if the selection type has changed.
|1639|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1639|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1640|1640| 		resetIdleUnit();
|1641|1641| 	lastIdleClasses = classes;
|1642|1642| 

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 905| »   »   »   »   »   action.radius·=·g_AttackGroundSize;
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1342| var·g_AttackGroundSize·=·getDefaultAttackGroundSize();
|    | [NORMAL] JSHintBear:
|    | 'g_AttackGroundSize' was used before it was defined.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 552| 552| 			if (cmpGarrisonHolder)
| 553| 553| 			{
| 554| 554| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 555|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 556|    |-				    && player != +cmd.owner)
|    | 555|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 556|+				    player != +cmd.owner)
| 557| 557| 						continue;
| 558| 558| 
| 559| 559| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 554| 554| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 555| 555| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 556| 556| 				    && player != +cmd.owner)
| 557|    |-						continue;
|    | 557|+					continue;
| 558| 558| 
| 559| 559| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 560| 560| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1266|1266| 		}
|1267|1267| 
|1268|1268| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1269|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1269|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1270|1270| 	}
|1271|1271| 
|1272|1272| 	var i = 0;
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1330|1330| 
|1331|1331| 				if (i > 0)
|1332|1332| 				{
|1333|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1333|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1334|1334| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1335|1335| 					// TODO: ensure that cmpPreviousObstruction exists
|1336|1336| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1493|1493| 		// Check that all its members are selected
|1494|1494| 		var fid = formationIds[0];
|1495|1495| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1496|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1497|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1496|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1497|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1498|1498| 		{
|1499|1499| 			cmpFormation.DeleteTwinFormations();
|1500|1500| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1601|1601| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1602|1602| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1603|1603| 				if (matrix[i][j] < distSq)
|1604|    |-					closeClusters = [i,j];
|    |1604|+					closeClusters = [i, j];
|1605|1605| 
|1606|1606| 		// if no more close clusters found, just return all found clusters so far
|1607|1607| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1623|1623| 		}
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|    |-		clusters.splice(closeClusters[0],1);
|    |1626|+		clusters.splice(closeClusters[0], 1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|    |-		clusters.splice(closeClusters[1],1);
|    |1627|+		clusters.splice(closeClusters[1], 1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|    |-		matrix.splice(closeClusters[0],1);
|    |1628|+		matrix.splice(closeClusters[0], 1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|    |-		matrix.splice(closeClusters[1],1);
|    |1629|+		matrix.splice(closeClusters[1], 1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|    |-				matrix[i].splice(closeClusters[0],1);
|    |1633|+				matrix[i].splice(closeClusters[0], 1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|1635| 				matrix[i].splice(closeClusters[1],1);
|1636|1636| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|1633| 				matrix[i].splice(closeClusters[0],1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|    |-				matrix[i].splice(closeClusters[1],1);
|    |1635|+				matrix[i].splice(closeClusters[1], 1);
|1636|1636| 		}
|1637|1637| 		// add a new row of distances to the matrix and the new cluster
|1638|1638| 		clusters.push(newCluster);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
| 558| 558| 
| 559| 559| 		let horizSpeed = +this.template[type].Projectile.Speed;
| 560| 560| 		let gravity = +this.template[type].Projectile.Gravity;
| 561|    |-		//horizSpeed /= 2; gravity /= 2; // slow it down for testing
|    | 561|+		// horizSpeed /= 2; gravity /= 2; // slow it down for testing
| 562| 562| 
| 563| 563| 		let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 564| 564| 		if (!cmpPosition || !cmpPosition.IsInWorld())
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
| 612| 612| 		// TODO: Use unit rotation to implement x/z offsets.
| 613| 613| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 614| 614| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 615|    |-		
|    | 615|+
| 616| 616| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 617| 617| 		if (cmpVisual)
| 618| 618| 		{

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

binaries/data/mods/public/simulation/components/Attack.js
| 659| »   »   cmpTimer.SetTimeout(SYSTEM_ENTITY,·IID_Damage,·"MissileHit",·timeToTarget·*·1000·+·+this.template[type].Delay,·data);
|    | [NORMAL] JSHintBear:
|    | Confusing plusses.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 798| 798| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 799| 799| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 800| 800| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 801|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 801|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 802| 802| 	}
| 803| 803| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 804| 804| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1631|1631| 			{
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|    |-						"x": pos.x,
|    |1634|+					"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|    |-						"z": pos.z,
|    |1635|+					"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|    |-						"angle": cmpPosition.GetRotation().y,
|    |1636|+					"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|    |-						"ent": ent
|    |1637|+					"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|1640|1640| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  23|  23| 	let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|    |-			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|    |  26|+		(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|    |-			0,
|    |  27|+		0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|    |-			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|    |  28|+		(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|  31|  31| /**
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 793| 793| 					this.FinishOrder();
| 794| 794| 					return;
| 795| 795| 				}
| 796|    |-				else
| 797|    |-				{
|    | 796|+				
| 798| 797| 					this.SetNextState("GARRISON.APPROACHING");
| 799| 798| 					return;
| 800|    |-				}
|    | 799|+				
| 801| 800| 			}
| 802| 801| 
| 803| 802| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1055|1055| 			},
|1056|1056| 		},
|1057|1057| 
|1058|    |-		"GARRISON":{
|    |1058|+		"GARRISON": {
|1059|1059| 			"enter": function() {
|1060|1060| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1061|1061| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1193|1193| 							this.FinishOrder();
|1194|1194| 							if (attackEntity)
|1195|1195| 								this.PushOrderFront("Attack", {
|1196|    |-										"target": target,
|    |1196|+									"target": target,
|1197|1197| 										"force": false,
|1198|1198| 										"allowCapture": allowCapture
|1199|1199| 									});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1194|1194| 							if (attackEntity)
|1195|1195| 								this.PushOrderFront("Attack", {
|1196|1196| 										"target": target,
|1197|    |-										"force": false,
|    |1197|+									"force": false,
|1198|1198| 										"allowCapture": allowCapture
|1199|1199| 									});
|1200|1200| 							else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1195|1195| 								this.PushOrderFront("Attack", {
|1196|1196| 										"target": target,
|1197|1197| 										"force": false,
|1198|    |-										"allowCapture": allowCapture
|    |1198|+									"allowCapture": allowCapture
|1199|1199| 									});
|1200|1200| 							else
|1201|1201| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 9.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1196|1196| 										"target": target,
|1197|1197| 										"force": false,
|1198|1198| 										"allowCapture": allowCapture
|1199|    |-									});
|    |1199|+								});
|1200|1200| 							else
|1201|1201| 								this.PushOrderFront("AttackGround", {
|1202|1202| 									"target": target,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1233|1233| 							this.FinishOrder();
|1234|1234| 							if (attackEntity)
|1235|1235| 								this.PushOrderFront("Attack", {
|1236|    |-										"target": target,
|    |1236|+									"target": target,
|1237|1237| 										"force": false,
|1238|1238| 										"allowCapture": allowCapture
|1239|1239| 									});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1234|1234| 							if (attackEntity)
|1235|1235| 								this.PushOrderFront("Attack", {
|1236|1236| 										"target": target,
|1237|    |-										"force": false,
|    |1237|+									"force": false,
|1238|1238| 										"allowCapture": allowCapture
|1239|1239| 									});
|1240|1240| 							else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1235|1235| 								this.PushOrderFront("Attack", {
|1236|1236| 										"target": target,
|1237|1237| 										"force": false,
|1238|    |-										"allowCapture": allowCapture
|    |1238|+									"allowCapture": allowCapture
|1239|1239| 									});
|1240|1240| 							else
|1241|1241| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 9.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1236|1236| 										"target": target,
|1237|1237| 										"force": false,
|1238|1238| 										"allowCapture": allowCapture
|1239|    |-									});
|    |1239|+								});
|1240|1240| 							else
|1241|1241| 								this.PushOrderFront("AttackGround", {
|1242|1242| 									"target": target,
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2104|2104| 
|2105|2105| 				"Attacked": function(msg) {
|2106|2106| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2107|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2108|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2107|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2108|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2109|2109| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2110|2110| 				},
|2111|2111| 			},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2793|2793| 					{
|2794|2794| 						// The building was already finished/fully repaired before we arrived;
|2795|2795| 						// let the ConstructionFinished handler handle this.
|2796|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2796|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2797|2797| 						return true;
|2798|2798| 					}
|2799|2799| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2793|2793| 					{
|2794|2794| 						// The building was already finished/fully repaired before we arrived;
|2795|2795| 						// let the ConstructionFinished handler handle this.
|2796|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2796|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2797|2797| 						return true;
|2798|2798| 					}
|2799|2799| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3306|3306| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3307|3307| 
|3308|3308| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3309|    |-							// only used for domestic animals
|    |3309|+		// only used for domestic animals
|3310|3310| 	},
|3311|3311| };
|3312|3312| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3363|3363| 
|3364|3364| UnitAI.prototype.IsAnimal = function()
|3365|3365| {
|3366|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3366|+	return (!!this.template.NaturalBehaviour);
|3367|3367| };
|3368|3368| 
|3369|3369| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3479|3479| 		{
|3480|3480| 			let index = this.GetCurrentState().indexOf(".");
|3481|3481| 			if (index != -1)
|3482|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3482|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3483|3483| 			this.Stop(false);
|3484|3484| 		}
|3485|3485| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3535|3535| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3536|3536| 			continue;
|3537|3537| 		if (i == 0)
|3538|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3538|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3539|3539| 		else
|3540|3540| 			this.orderQueue.splice(i, 1);
|3541|3541| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3535|3535| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3536|3536| 			continue;
|3537|3537| 		if (i == 0)
|3538|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3538|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3539|3539| 		else
|3540|3540| 			this.orderQueue.splice(i, 1);
|3541|3541| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3619|3619| };
|3620|3620| 
|3621|3621| 
|3622|    |-//// FSM linkage functions ////
|    |3622|+// // FSM linkage functions ////
|3623|3623| 
|3624|3624| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3625|3625| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3789|3789| 				continue;
|3790|3790| 			if (this.orderQueue[i].type == type)
|3791|3791| 				continue;
|3792|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3792|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3793|3793| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3794|3794| 			return;
|3795|3795| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3789|3789| 				continue;
|3790|3790| 			if (this.orderQueue[i].type == type)
|3791|3791| 				continue;
|3792|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3792|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3793|3793| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3794|3794| 			return;
|3795|3795| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3960|3960| 	if (data.timerRepeat === undefined)
|3961|3961| 		this.timer = undefined;
|3962|3962| 
|3963|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3963|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3964|3964| };
|3965|3965| 
|3966|3966| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3960|3960| 	if (data.timerRepeat === undefined)
|3961|3961| 		this.timer = undefined;
|3962|3962| 
|3963|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3963|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3964|3964| };
|3965|3965| 
|3966|3966| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4005|4005| 	// TODO: This is a bit inefficient since every unit listens to every
|4006|4006| 	// construction message - ideally we could scope it to only the one we're building
|4007|4007| 
|4008|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4008|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4009|4009| };
|4010|4010| 
|4011|4011| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4005|4005| 	// TODO: This is a bit inefficient since every unit listens to every
|4006|4006| 	// construction message - ideally we could scope it to only the one we're building
|4007|4007| 
|4008|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4008|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4009|4009| };
|4010|4010| 
|4011|4011| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4030|4030| 
|4031|4031| UnitAI.prototype.OnAttacked = function(msg)
|4032|4032| {
|4033|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4033|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4034|4034| };
|4035|4035| 
|4036|4036| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4030|4030| 
|4031|4031| UnitAI.prototype.OnAttacked = function(msg)
|4032|4032| {
|4033|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4033|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4034|4034| };
|4035|4035| 
|4036|4036| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4035|4035| 
|4036|4036| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4037|4037| {
|4038|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4038|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4039|4039| };
|4040|4040| 
|4041|4041| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4035|4035| 
|4036|4036| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4037|4037| {
|4038|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4038|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4039|4039| };
|4040|4040| 
|4041|4041| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4040|4040| 
|4041|4041| UnitAI.prototype.OnHealthChanged = function(msg)
|4042|4042| {
|4043|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4043|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4044|4044| };
|4045|4045| 
|4046|4046| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4040|4040| 
|4041|4041| UnitAI.prototype.OnHealthChanged = function(msg)
|4042|4042| {
|4043|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4043|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4044|4044| };
|4045|4045| 
|4046|4046| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4046|4046| UnitAI.prototype.OnRangeUpdate = function(msg)
|4047|4047| {
|4048|4048| 	if (msg.tag == this.losRangeQuery)
|4049|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4049|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4050|4050| 	else if (msg.tag == this.losHealRangeQuery)
|4051|4051| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4052|4052| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4046|4046| UnitAI.prototype.OnRangeUpdate = function(msg)
|4047|4047| {
|4048|4048| 	if (msg.tag == this.losRangeQuery)
|4049|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4049|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4050|4050| 	else if (msg.tag == this.losHealRangeQuery)
|4051|4051| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4052|4052| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4048|4048| 	if (msg.tag == this.losRangeQuery)
|4049|4049| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4050|4050| 	else if (msg.tag == this.losHealRangeQuery)
|4051|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4051|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4052|4052| };
|4053|4053| 
|4054|4054| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4048|4048| 	if (msg.tag == this.losRangeQuery)
|4049|4049| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4050|4050| 	else if (msg.tag == this.losHealRangeQuery)
|4051|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4051|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4052|4052| };
|4053|4053| 
|4054|4054| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4053|4053| 
|4054|4054| UnitAI.prototype.OnPackFinished = function(msg)
|4055|4055| {
|4056|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4056|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4057|4057| };
|4058|4058| 
|4059|4059| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4053|4053| 
|4054|4054| UnitAI.prototype.OnPackFinished = function(msg)
|4055|4055| {
|4056|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4056|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4057|4057| };
|4058|4058| 
|4059|4059| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4056|4056| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4057|4057| };
|4058|4058| 
|4059|    |-//// Helper functions to be called by the FSM ////
|    |4059|+// // Helper functions to be called by the FSM ////
|4060|4060| 
|4061|4061| UnitAI.prototype.GetWalkSpeed = function()
|4062|4062| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4515|4515| 	{
|4516|4516| 		if (attackEntity)
|4517|4517| 			return cmpUnitMotion.MoveToTargetRange(target, range.min, range.max);
|4518|    |-		else
|4519|    |-			return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|    |4518|+		return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|4520|4519| 	}
|4521|4520| 
|4522|4521| 	return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4665|4665| 	if (this.IsFormationMember())
|4666|4666| 	{
|4667|4667| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4668|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4669|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4668|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4669|+			cmpFormationUnitAI.order.data.target == target)
|4670|4670| 			return true;
|4671|4671| 	}
|4672|4672| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4843|4843| UnitAI.prototype.AttackEntityInZone = function(ents)
|4844|4844| {
|4845|4845| 	var target = ents.find(target =>
|4846|    |-		this.CanAttack(target)
|4847|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4846|+		this.CanAttack(target) &&
|    |4847|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4848|4848| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4849|4849| 	);
|4850|4850| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4844|4844| {
|4845|4845| 	var target = ents.find(target =>
|4846|4846| 		this.CanAttack(target)
|4847|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4848|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4847|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4848|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4849|4849| 	);
|4850|4850| 	if (!target)
|4851|4851| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4908|4908| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4909|4909| 	if (this.isGuardOf)
|4910|4910| 	{
|4911|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4911|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4912|4912| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4913|4913| 		if (cmpUnitAI && cmpAttack &&
|4914|4914| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4912|4912| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4913|4913| 		if (cmpUnitAI && cmpAttack &&
|4914|4914| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4915|    |-				return false;
|    |4915|+			return false;
|4916|4916| 	}
|4917|4917| 
|4918|4918| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4951|4951| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4952|4952| 	if (this.isGuardOf)
|4953|4953| 	{
|4954|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4954|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4955|4955| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4956|4956| 		if (cmpUnitAI && cmpAttack &&
|4957|4957| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4964|4964| 	return false;
|4965|4965| };
|4966|4966| 
|4967|    |-//// External interface functions ////
|    |4967|+// // External interface functions ////
|4968|4968| 
|4969|4969| UnitAI.prototype.SetFormationController = function(ent)
|4970|4970| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5161|5161| 	{
|5162|5162| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5163|5163| 			return;
|5164|    |-		else
|5165|    |-			this.RemoveGuard();
|    |5164|+		this.RemoveGuard();
|5166|5165| 	}
|5167|5166| 
|5168|5167| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5510|5510| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5511|5511| 	{
|5512|5512| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5513|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5513|+		if (cmpTrader.HasBothMarkets() &&
|5514|5514| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5515|5515| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5516|5516| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5791|5791| 				{
|5792|5792| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5793|5793| 					var targetClasses = this.order.data.targetClasses;
|5794|    |-					if (targetClasses.attack && cmpIdentity
|5795|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5794|+					if (targetClasses.attack && cmpIdentity &&
|    |5795|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5796|5796| 						continue;
|5797|5797| 					if (targetClasses.avoid && cmpIdentity
|5798|5798| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5794|5794| 					if (targetClasses.attack && cmpIdentity
|5795|5795| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5796|5796| 						continue;
|5797|    |-					if (targetClasses.avoid && cmpIdentity
|5798|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5797|+					if (targetClasses.avoid && cmpIdentity &&
|    |5798|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5799|5799| 						continue;
|5800|5800| 					// Only used by the AIs to prevent some choices of targets
|5801|5801| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5817|5817| 		{
|5818|5818| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5819|5819| 			var targetClasses = this.order.data.targetClasses;
|5820|    |-			if (cmpIdentity && targetClasses.attack
|5821|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5820|+			if (cmpIdentity && targetClasses.attack &&
|    |5821|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5822|5822| 				continue;
|5823|5823| 			if (cmpIdentity && targetClasses.avoid
|5824|5824| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5820|5820| 			if (cmpIdentity && targetClasses.attack
|5821|5821| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5822|5822| 				continue;
|5823|    |-			if (cmpIdentity && targetClasses.avoid
|5824|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5823|+			if (cmpIdentity && targetClasses.avoid &&
|    |5824|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5825|5825| 				continue;
|5826|5826| 			// Only used by the AIs to prevent some choices of targets
|5827|5827| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5978|5978| 
|5979|5979| UnitAI.prototype.SetHeldPosition = function(x, z)
|5980|5980| {
|5981|    |-	this.heldPosition = {"x": x, "z": z};
|    |5981|+	this.heldPosition = { "x": x, "z": z};
|5982|5982| };
|5983|5983| 
|5984|5984| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5978|5978| 
|5979|5979| UnitAI.prototype.SetHeldPosition = function(x, z)
|5980|5980| {
|5981|    |-	this.heldPosition = {"x": x, "z": z};
|    |5981|+	this.heldPosition = {"x": x, "z": z };
|5982|5982| };
|5983|5983| 
|5984|5984| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6005|6005| 	return false;
|6006|6006| };
|6007|6007| 
|6008|    |-//// Helper functions ////
|    |6008|+// // Helper functions ////
|6009|6009| 
|6010|6010| UnitAI.prototype.CanAttack = function(target)
|6011|6011| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6209|6209| 	return cmpPack && cmpPack.IsPacking();
|6210|6210| };
|6211|6211| 
|6212|    |-//// Formation specific functions ////
|    |6212|+// // Formation specific functions ////
|6213|6213| 
|6214|6214| UnitAI.prototype.IsAttackingAsFormation = function()
|6215|6215| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6214|6214| UnitAI.prototype.IsAttackingAsFormation = function()
|6215|6215| {
|6216|6216| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6217|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6218|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6217|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6218|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6219|6219| };
|6220|6220| 
|6221|6221| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6218|6218| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6219|6219| };
|6220|6220| 
|6221|    |-//// Animal specific functions ////
|    |6221|+// // Animal specific functions ////
|6222|6222| 
|6223|6223| UnitAI.prototype.MoveRandomly = function(distance)
|6224|6224| {

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
| 942| »   »   »   "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
| 967| »   »   »   "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
|1017| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1080| »   »   »   »   "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
|1116| »   »   »   "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
|1148| »   »   »   »   "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
|1345| »   »   "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
|1402| »   »   »   "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
|1577| »   »   »   "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
|1599| »   »   »   "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
|1631| »   »   »   "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
|1785| »   »   »   "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
|1864| »   »   »   »   "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
|1945| »   »   »   »   "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
|2131| »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2147| »   »   »   »   "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
|2250| »   »   »   »   "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
|2505| »   »   »   »   "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
|2538| »   »   »   »   "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
|2644| »   »   »   »   "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
|2710| »   »   »   »   "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
|2749| »   »   »   »   "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
|2960| »   »   »   »   "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
|3141| »   »   »   »   "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
|3865| »   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
|4830| »   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
|4845| »   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
|4891| »   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
|4914| »   »   ····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
|2108| »   »   »   »   »   »   &&·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
|3827| »   »   var·order·=·{·"type":·type,·"data":·data·};
|    | [NORMAL] JSHintBear:
|    | 'order' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/252/display/redirect

Freagarach updated this revision to Diff 9147.Jul 28 2019, 11:42 AM

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
| 558| 558| 
| 559| 559| 		let horizSpeed = +this.template[type].Projectile.Speed;
| 560| 560| 		let gravity = +this.template[type].Projectile.Gravity;
| 561|    |-		//horizSpeed /= 2; gravity /= 2; // slow it down for testing
|    | 561|+		// horizSpeed /= 2; gravity /= 2; // slow it down for testing
| 562| 562| 
| 563| 563| 		let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 564| 564| 		if (!cmpPosition || !cmpPosition.IsInWorld())
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Attack.js
| 612| 612| 		// TODO: Use unit rotation to implement x/z offsets.
| 613| 613| 		let deltaLaunchPoint = new Vector3D(0, this.template[type].Projectile.LaunchPoint["@y"], 0.0);
| 614| 614| 		let launchPoint = Vector3D.add(selfPosition, deltaLaunchPoint);
| 615|    |-		
|    | 615|+
| 616| 616| 		let cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
| 617| 617| 		if (cmpVisual)
| 618| 618| 		{

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

binaries/data/mods/public/simulation/components/Attack.js
| 659| »   »   cmpTimer.SetTimeout(SYSTEM_ENTITY,·IID_Damage,·"MissileHit",·timeToTarget·*·1000·+·+this.template[type].Delay,·data);
|    | [NORMAL] JSHintBear:
|    | Confusing plusses.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 552| 552| 			if (cmpGarrisonHolder)
| 553| 553| 			{
| 554| 554| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 555|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 556|    |-				    && player != +cmd.owner)
|    | 555|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 556|+				    player != +cmd.owner)
| 557| 557| 						continue;
| 558| 558| 
| 559| 559| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 554| 554| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 555| 555| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 556| 556| 				    && player != +cmd.owner)
| 557|    |-						continue;
|    | 557|+					continue;
| 558| 558| 
| 559| 559| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 560| 560| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1158|1158| 
|1159|1159| 	// send Metadata info if any
|1160|1160| 	if (cmd.metadata)
|1161|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1161|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1162|1162| 
|1163|1163| 	// Tell the units to start building this new entity
|1164|1164| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1266|1266| 		}
|1267|1267| 
|1268|1268| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1269|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1269|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1270|1270| 	}
|1271|1271| 
|1272|1272| 	var i = 0;
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1330|1330| 
|1331|1331| 				if (i > 0)
|1332|1332| 				{
|1333|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1333|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1334|1334| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1335|1335| 					// TODO: ensure that cmpPreviousObstruction exists
|1336|1336| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1493|1493| 		// Check that all its members are selected
|1494|1494| 		var fid = formationIds[0];
|1495|1495| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1496|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1497|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1496|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1497|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1498|1498| 		{
|1499|1499| 			cmpFormation.DeleteTwinFormations();
|1500|1500| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1601|1601| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1602|1602| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1603|1603| 				if (matrix[i][j] < distSq)
|1604|    |-					closeClusters = [i,j];
|    |1604|+					closeClusters = [i, j];
|1605|1605| 
|1606|1606| 		// if no more close clusters found, just return all found clusters so far
|1607|1607| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1623|1623| 		}
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|    |-		clusters.splice(closeClusters[0],1);
|    |1626|+		clusters.splice(closeClusters[0], 1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1624|1624| 		// remove the rows and columns in the matrix for the merged clusters,
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|    |-		clusters.splice(closeClusters[1],1);
|    |1627|+		clusters.splice(closeClusters[1], 1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		// and the clusters themselves from the cluster list
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|    |-		matrix.splice(closeClusters[0],1);
|    |1628|+		matrix.splice(closeClusters[0], 1);
|1629|1629| 		matrix.splice(closeClusters[1],1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1626|1626| 		clusters.splice(closeClusters[0],1);
|1627|1627| 		clusters.splice(closeClusters[1],1);
|1628|1628| 		matrix.splice(closeClusters[0],1);
|1629|    |-		matrix.splice(closeClusters[1],1);
|    |1629|+		matrix.splice(closeClusters[1], 1);
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1630|1630| 		for (let i = 0; i < matrix.length; ++i)
|1631|1631| 		{
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|    |-				matrix[i].splice(closeClusters[0],1);
|    |1633|+				matrix[i].splice(closeClusters[0], 1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|1635| 				matrix[i].splice(closeClusters[1],1);
|1636|1636| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1632|1632| 			if (matrix[i].length > closeClusters[0])
|1633|1633| 				matrix[i].splice(closeClusters[0],1);
|1634|1634| 			if (matrix[i].length > closeClusters[1])
|1635|    |-				matrix[i].splice(closeClusters[1],1);
|    |1635|+				matrix[i].splice(closeClusters[1], 1);
|1636|1636| 		}
|1637|1637| 		// add a new row of distances to the matrix and the new cluster
|1638|1638| 		clusters.push(newCluster);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 1 tab but found 0.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/FormationAttack.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/FormationAttack.js
|  23|  23| 
|  24|  24| FormationAttack.prototype.GetRange = function(target)
|  25|  25| {
|  26|    |-let result = {
|    |  26|+	let result = {
|  27|  27| 		"min": 0,
|  28|  28| 		"max": this.canAttackAsFormation ? -1 : 0,
|  29|  29| 		"elevationBonus": this.canAttackAsFormation ? -1 : 0
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|1576|1576| 			return {
|1577|1577| 				"possible": true,
|1578|1578| 				"tooltip": g_UnitActions[action].getActionInfo("attack-ground", selection).tooltip
|1579|    |-			}
|    |1579|+			};
|1580|1580| 
|1581|1581| 		return {
|1582|1582| 			"possible": ["move", "attack-move", "remove-guard", "patrol"].indexOf(action) != -1

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

binaries/data/mods/public/gui/session/unit_actions.js
|1579| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/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 (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1557|1557| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1558|1558| 	{
|1559|1559| 		// Train as many full batches as we can
|1560|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1560|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1561|1561| 		Engine.PostNetworkCommand({
|1562|1562| 			"type": "train",
|1563|1563| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1636|1636| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1637|1637| 
|1638|1638| 	// Reset the last idle unit, etc., if the selection type has changed.
|1639|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1639|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1640|1640| 		resetIdleUnit();
|1641|1641| 	lastIdleClasses = classes;
|1642|1642| 

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 905| »   »   »   »   »   action.radius·=·g_AttackGroundSize;
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1342| var·g_AttackGroundSize·=·getDefaultAttackGroundSize();
|    | [NORMAL] JSHintBear:
|    | 'g_AttackGroundSize' was used before it was defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  23|  23| 	let cmpTimer = Engine.QueryInterface(SYSTEM_ENTITY, IID_Timer);
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|    |-			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|    |  26|+		(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  24|  24| 	let turnLength = cmpTimer.GetLatestTurnLength();
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|    |-			0,
|    |  27|+		0,
|  28|  28| 			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Damage.js
|  25|  25| 	return new Vector3D(
|  26|  26| 			(curPos.x * (turnLength - lateness) + prevPos.x * lateness) / turnLength,
|  27|  27| 			0,
|  28|    |-			(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|    |  28|+		(curPos.z * (turnLength - lateness) + prevPos.z * lateness) / turnLength);
|  29|  29| };
|  30|  30| 
|  31|  31| /**
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 793| 793| 					this.FinishOrder();
| 794| 794| 					return;
| 795| 795| 				}
| 796|    |-				else
| 797|    |-				{
|    | 796|+				
| 798| 797| 					this.SetNextState("GARRISON.APPROACHING");
| 799| 798| 					return;
| 800|    |-				}
|    | 799|+				
| 801| 800| 			}
| 802| 801| 
| 803| 802| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1055|1055| 			},
|1056|1056| 		},
|1057|1057| 
|1058|    |-		"GARRISON":{
|    |1058|+		"GARRISON": {
|1059|1059| 			"enter": function() {
|1060|1060| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1061|1061| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1193|1193| 							this.FinishOrder();
|1194|1194| 							if (attackEntity)
|1195|1195| 								this.PushOrderFront("Attack", {
|1196|    |-										"target": target,
|    |1196|+									"target": target,
|1197|1197| 										"force": false,
|1198|1198| 										"allowCapture": allowCapture
|1199|1199| 									});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1194|1194| 							if (attackEntity)
|1195|1195| 								this.PushOrderFront("Attack", {
|1196|1196| 										"target": target,
|1197|    |-										"force": false,
|    |1197|+									"force": false,
|1198|1198| 										"allowCapture": allowCapture
|1199|1199| 									});
|1200|1200| 							else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1195|1195| 								this.PushOrderFront("Attack", {
|1196|1196| 										"target": target,
|1197|1197| 										"force": false,
|1198|    |-										"allowCapture": allowCapture
|    |1198|+									"allowCapture": allowCapture
|1199|1199| 									});
|1200|1200| 							else
|1201|1201| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 9.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1196|1196| 										"target": target,
|1197|1197| 										"force": false,
|1198|1198| 										"allowCapture": allowCapture
|1199|    |-									});
|    |1199|+								});
|1200|1200| 							else
|1201|1201| 								this.PushOrderFront("AttackGround", {
|1202|1202| 									"target": target,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1233|1233| 							this.FinishOrder();
|1234|1234| 							if (attackEntity)
|1235|1235| 								this.PushOrderFront("Attack", {
|1236|    |-										"target": target,
|    |1236|+									"target": target,
|1237|1237| 										"force": false,
|1238|1238| 										"allowCapture": allowCapture
|1239|1239| 									});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1234|1234| 							if (attackEntity)
|1235|1235| 								this.PushOrderFront("Attack", {
|1236|1236| 										"target": target,
|1237|    |-										"force": false,
|    |1237|+									"force": false,
|1238|1238| 										"allowCapture": allowCapture
|1239|1239| 									});
|1240|1240| 							else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1235|1235| 								this.PushOrderFront("Attack", {
|1236|1236| 										"target": target,
|1237|1237| 										"force": false,
|1238|    |-										"allowCapture": allowCapture
|    |1238|+									"allowCapture": allowCapture
|1239|1239| 									});
|1240|1240| 							else
|1241|1241| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 9.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1236|1236| 										"target": target,
|1237|1237| 										"force": false,
|1238|1238| 										"allowCapture": allowCapture
|1239|    |-									});
|    |1239|+								});
|1240|1240| 							else
|1241|1241| 								this.PushOrderFront("AttackGround", {
|1242|1242| 									"target": target,
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2104|2104| 
|2105|2105| 				"Attacked": function(msg) {
|2106|2106| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2107|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2108|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2107|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2108|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2109|2109| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2110|2110| 				},
|2111|2111| 			},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2793|2793| 					{
|2794|2794| 						// The building was already finished/fully repaired before we arrived;
|2795|2795| 						// let the ConstructionFinished handler handle this.
|2796|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2796|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2797|2797| 						return true;
|2798|2798| 					}
|2799|2799| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2793|2793| 					{
|2794|2794| 						// The building was already finished/fully repaired before we arrived;
|2795|2795| 						// let the ConstructionFinished handler handle this.
|2796|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2796|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2797|2797| 						return true;
|2798|2798| 					}
|2799|2799| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3306|3306| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3307|3307| 
|3308|3308| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3309|    |-							// only used for domestic animals
|    |3309|+		// only used for domestic animals
|3310|3310| 	},
|3311|3311| };
|3312|3312| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3363|3363| 
|3364|3364| UnitAI.prototype.IsAnimal = function()
|3365|3365| {
|3366|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3366|+	return (!!this.template.NaturalBehaviour);
|3367|3367| };
|3368|3368| 
|3369|3369| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3479|3479| 		{
|3480|3480| 			let index = this.GetCurrentState().indexOf(".");
|3481|3481| 			if (index != -1)
|3482|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3482|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3483|3483| 			this.Stop(false);
|3484|3484| 		}
|3485|3485| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3535|3535| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3536|3536| 			continue;
|3537|3537| 		if (i == 0)
|3538|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3538|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3539|3539| 		else
|3540|3540| 			this.orderQueue.splice(i, 1);
|3541|3541| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3535|3535| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3536|3536| 			continue;
|3537|3537| 		if (i == 0)
|3538|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3538|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3539|3539| 		else
|3540|3540| 			this.orderQueue.splice(i, 1);
|3541|3541| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3619|3619| };
|3620|3620| 
|3621|3621| 
|3622|    |-//// FSM linkage functions ////
|    |3622|+// // FSM linkage functions ////
|3623|3623| 
|3624|3624| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3625|3625| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3789|3789| 				continue;
|3790|3790| 			if (this.orderQueue[i].type == type)
|3791|3791| 				continue;
|3792|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3792|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3793|3793| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3794|3794| 			return;
|3795|3795| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3789|3789| 				continue;
|3790|3790| 			if (this.orderQueue[i].type == type)
|3791|3791| 				continue;
|3792|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3792|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3793|3793| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3794|3794| 			return;
|3795|3795| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3960|3960| 	if (data.timerRepeat === undefined)
|3961|3961| 		this.timer = undefined;
|3962|3962| 
|3963|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3963|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3964|3964| };
|3965|3965| 
|3966|3966| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3960|3960| 	if (data.timerRepeat === undefined)
|3961|3961| 		this.timer = undefined;
|3962|3962| 
|3963|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3963|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3964|3964| };
|3965|3965| 
|3966|3966| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4005|4005| 	// TODO: This is a bit inefficient since every unit listens to every
|4006|4006| 	// construction message - ideally we could scope it to only the one we're building
|4007|4007| 
|4008|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4008|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4009|4009| };
|4010|4010| 
|4011|4011| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4005|4005| 	// TODO: This is a bit inefficient since every unit listens to every
|4006|4006| 	// construction message - ideally we could scope it to only the one we're building
|4007|4007| 
|4008|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4008|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4009|4009| };
|4010|4010| 
|4011|4011| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4030|4030| 
|4031|4031| UnitAI.prototype.OnAttacked = function(msg)
|4032|4032| {
|4033|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4033|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4034|4034| };
|4035|4035| 
|4036|4036| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4030|4030| 
|4031|4031| UnitAI.prototype.OnAttacked = function(msg)
|4032|4032| {
|4033|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4033|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4034|4034| };
|4035|4035| 
|4036|4036| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4035|4035| 
|4036|4036| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4037|4037| {
|4038|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4038|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4039|4039| };
|4040|4040| 
|4041|4041| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4035|4035| 
|4036|4036| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4037|4037| {
|4038|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4038|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4039|4039| };
|4040|4040| 
|4041|4041| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4040|4040| 
|4041|4041| UnitAI.prototype.OnHealthChanged = function(msg)
|4042|4042| {
|4043|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4043|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4044|4044| };
|4045|4045| 
|4046|4046| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4040|4040| 
|4041|4041| UnitAI.prototype.OnHealthChanged = function(msg)
|4042|4042| {
|4043|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4043|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4044|4044| };
|4045|4045| 
|4046|4046| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4046|4046| UnitAI.prototype.OnRangeUpdate = function(msg)
|4047|4047| {
|4048|4048| 	if (msg.tag == this.losRangeQuery)
|4049|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4049|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4050|4050| 	else if (msg.tag == this.losHealRangeQuery)
|4051|4051| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4052|4052| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4046|4046| UnitAI.prototype.OnRangeUpdate = function(msg)
|4047|4047| {
|4048|4048| 	if (msg.tag == this.losRangeQuery)
|4049|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4049|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4050|4050| 	else if (msg.tag == this.losHealRangeQuery)
|4051|4051| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4052|4052| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4048|4048| 	if (msg.tag == this.losRangeQuery)
|4049|4049| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4050|4050| 	else if (msg.tag == this.losHealRangeQuery)
|4051|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4051|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4052|4052| };
|4053|4053| 
|4054|4054| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4048|4048| 	if (msg.tag == this.losRangeQuery)
|4049|4049| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4050|4050| 	else if (msg.tag == this.losHealRangeQuery)
|4051|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4051|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4052|4052| };
|4053|4053| 
|4054|4054| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4053|4053| 
|4054|4054| UnitAI.prototype.OnPackFinished = function(msg)
|4055|4055| {
|4056|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4056|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4057|4057| };
|4058|4058| 
|4059|4059| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4053|4053| 
|4054|4054| UnitAI.prototype.OnPackFinished = function(msg)
|4055|4055| {
|4056|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4056|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4057|4057| };
|4058|4058| 
|4059|4059| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4056|4056| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4057|4057| };
|4058|4058| 
|4059|    |-//// Helper functions to be called by the FSM ////
|    |4059|+// // Helper functions to be called by the FSM ////
|4060|4060| 
|4061|4061| UnitAI.prototype.GetWalkSpeed = function()
|4062|4062| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4515|4515| 	{
|4516|4516| 		if (attackEntity)
|4517|4517| 			return cmpUnitMotion.MoveToTargetRange(target, range.min, range.max);
|4518|    |-		else
|4519|    |-			return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|    |4518|+		return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|4520|4519| 	}
|4521|4520| 
|4522|4521| 	return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4665|4665| 	if (this.IsFormationMember())
|4666|4666| 	{
|4667|4667| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4668|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4669|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4668|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4669|+			cmpFormationUnitAI.order.data.target == target)
|4670|4670| 			return true;
|4671|4671| 	}
|4672|4672| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4843|4843| UnitAI.prototype.AttackEntityInZone = function(ents)
|4844|4844| {
|4845|4845| 	var target = ents.find(target =>
|4846|    |-		this.CanAttack(target)
|4847|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4846|+		this.CanAttack(target) &&
|    |4847|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4848|4848| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4849|4849| 	);
|4850|4850| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4844|4844| {
|4845|4845| 	var target = ents.find(target =>
|4846|4846| 		this.CanAttack(target)
|4847|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4848|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4847|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4848|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4849|4849| 	);
|4850|4850| 	if (!target)
|4851|4851| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4908|4908| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4909|4909| 	if (this.isGuardOf)
|4910|4910| 	{
|4911|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4911|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4912|4912| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4913|4913| 		if (cmpUnitAI && cmpAttack &&
|4914|4914| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4912|4912| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4913|4913| 		if (cmpUnitAI && cmpAttack &&
|4914|4914| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4915|    |-				return false;
|    |4915|+			return false;
|4916|4916| 	}
|4917|4917| 
|4918|4918| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4951|4951| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4952|4952| 	if (this.isGuardOf)
|4953|4953| 	{
|4954|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4954|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4955|4955| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4956|4956| 		if (cmpUnitAI && cmpAttack &&
|4957|4957| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4964|4964| 	return false;
|4965|4965| };
|4966|4966| 
|4967|    |-//// External interface functions ////
|    |4967|+// // External interface functions ////
|4968|4968| 
|4969|4969| UnitAI.prototype.SetFormationController = function(ent)
|4970|4970| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5161|5161| 	{
|5162|5162| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5163|5163| 			return;
|5164|    |-		else
|5165|    |-			this.RemoveGuard();
|    |5164|+		this.RemoveGuard();
|5166|5165| 	}
|5167|5166| 
|5168|5167| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5510|5510| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5511|5511| 	{
|5512|5512| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5513|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5513|+		if (cmpTrader.HasBothMarkets() &&
|5514|5514| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5515|5515| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5516|5516| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5791|5791| 				{
|5792|5792| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5793|5793| 					var targetClasses = this.order.data.targetClasses;
|5794|    |-					if (targetClasses.attack && cmpIdentity
|5795|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5794|+					if (targetClasses.attack && cmpIdentity &&
|    |5795|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5796|5796| 						continue;
|5797|5797| 					if (targetClasses.avoid && cmpIdentity
|5798|5798| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5794|5794| 					if (targetClasses.attack && cmpIdentity
|5795|5795| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5796|5796| 						continue;
|5797|    |-					if (targetClasses.avoid && cmpIdentity
|5798|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5797|+					if (targetClasses.avoid && cmpIdentity &&
|    |5798|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5799|5799| 						continue;
|5800|5800| 					// Only used by the AIs to prevent some choices of targets
|5801|5801| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5817|5817| 		{
|5818|5818| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5819|5819| 			var targetClasses = this.order.data.targetClasses;
|5820|    |-			if (cmpIdentity && targetClasses.attack
|5821|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5820|+			if (cmpIdentity && targetClasses.attack &&
|    |5821|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5822|5822| 				continue;
|5823|5823| 			if (cmpIdentity && targetClasses.avoid
|5824|5824| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5820|5820| 			if (cmpIdentity && targetClasses.attack
|5821|5821| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5822|5822| 				continue;
|5823|    |-			if (cmpIdentity && targetClasses.avoid
|5824|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5823|+			if (cmpIdentity && targetClasses.avoid &&
|    |5824|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5825|5825| 				continue;
|5826|5826| 			// Only used by the AIs to prevent some choices of targets
|5827|5827| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5978|5978| 
|5979|5979| UnitAI.prototype.SetHeldPosition = function(x, z)
|5980|5980| {
|5981|    |-	this.heldPosition = {"x": x, "z": z};
|    |5981|+	this.heldPosition = { "x": x, "z": z};
|5982|5982| };
|5983|5983| 
|5984|5984| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5978|5978| 
|5979|5979| UnitAI.prototype.SetHeldPosition = function(x, z)
|5980|5980| {
|5981|    |-	this.heldPosition = {"x": x, "z": z};
|    |5981|+	this.heldPosition = {"x": x, "z": z };
|5982|5982| };
|5983|5983| 
|5984|5984| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6005|6005| 	return false;
|6006|6006| };
|6007|6007| 
|6008|    |-//// Helper functions ////
|    |6008|+// // Helper functions ////
|6009|6009| 
|6010|6010| UnitAI.prototype.CanAttack = function(target)
|6011|6011| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6209|6209| 	return cmpPack && cmpPack.IsPacking();
|6210|6210| };
|6211|6211| 
|6212|    |-//// Formation specific functions ////
|    |6212|+// // Formation specific functions ////
|6213|6213| 
|6214|6214| UnitAI.prototype.IsAttackingAsFormation = function()
|6215|6215| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6214|6214| UnitAI.prototype.IsAttackingAsFormation = function()
|6215|6215| {
|6216|6216| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6217|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6218|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6217|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6218|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6219|6219| };
|6220|6220| 
|6221|6221| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6218|6218| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6219|6219| };
|6220|6220| 
|6221|    |-//// Animal specific functions ////
|    |6221|+// // Animal specific functions ////
|6222|6222| 
|6223|6223| UnitAI.prototype.MoveRandomly = function(distance)
|6224|6224| {

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
| 942| »   »   »   "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
| 967| »   »   »   "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
|1017| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1080| »   »   »   »   "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
|1116| »   »   »   "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
|1148| »   »   »   »   "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
|1345| »   »   "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
|1402| »   »   »   "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
|1577| »   »   »   "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
|1599| »   »   »   "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
|1631| »   »   »   "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
|1785| »   »   »   "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
|1864| »   »   »   »   "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
|1945| »   »   »   »   "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
|2131| »   »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|2147| »   »   »   »   "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
|2250| »   »   »   »   "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
|2505| »   »   »   »   "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
|2538| »   »   »   »   "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
|2644| »   »   »   »   "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
|2710| »   »   »   »   "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
|2749| »   »   »   »   "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
|2960| »   »   »   »   "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
|3141| »   »   »   »   "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
|3865| »   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
|4830| »   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
|4845| »   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
|4891| »   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
|4914| »   »   ····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
|2108| »   »   »   »   »   »   &&·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
|3827| »   »   var·order·=·{·"type":·type,·"data":·data·};
|    | [NORMAL] JSHintBear:
|    | 'order' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|6218| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 798| 798| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 799| 799| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 800| 800| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 801|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 801|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 802| 802| 	}
| 803| 803| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 804| 804| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1631|1631| 			{
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|    |-						"x": pos.x,
|    |1634|+					"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1632|1632| 				minDist2 = dist2;
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|    |-						"z": pos.z,
|    |1635|+					"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1633|1633| 				minDistEntitySnapData = {
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|    |-						"angle": cmpPosition.GetRotation().y,
|    |1636|+					"angle": cmpPosition.GetRotation().y,
|1637|1637| 						"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1634|1634| 						"x": pos.x,
|1635|1635| 						"z": pos.z,
|1636|1636| 						"angle": cmpPosition.GetRotation().y,
|1637|    |-						"ent": ent
|    |1637|+					"ent": ent
|1638|1638| 				};
|1639|1639| 			}
|1640|1640| 		}
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/253/display/redirect

Freagarach updated this revision to Diff 10372.EditedNov 21 2019, 5:38 PM
Freagarach edited the summary of this revision. (Show Details)

Rebased. (I actually wanted to give better visual feedback on the bombarding radius, but I haven't achieved that yet. But since I rebased it I upload it anyways.)

Freagarach planned changes to this revision.Nov 21 2019, 5:41 PM

There should be a circle indicating the radius that is to be bombarded. It could be hacked in using a non-visible entity at the end of the cursor with a range overlay, but being able to draw circles, squares and the like on the map might also be useful for other purposes? (E.g. tutorial: indicating where the storehouse ought to be built.)

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

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/612/display/redirect

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 542| 542| 			if (cmpGarrisonHolder)
| 543| 543| 			{
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546|    |-				    && player != +cmd.owner)
|    | 545|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 546|+				    player != +cmd.owner)
| 547| 547| 						continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545| 545| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546| 546| 				    && player != +cmd.owner)
| 547|    |-						continue;
|    | 547|+					continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 550| 550| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1148|1148| 
|1149|1149| 	// send Metadata info if any
|1150|1150| 	if (cmd.metadata)
|1151|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1151|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1152|1152| 
|1153|1153| 	// Tell the units to start building this new entity
|1154|1154| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1148|1148| 
|1149|1149| 	// send Metadata info if any
|1150|1150| 	if (cmd.metadata)
|1151|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1151|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1152|1152| 
|1153|1153| 	// Tell the units to start building this new entity
|1154|1154| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1148|1148| 
|1149|1149| 	// send Metadata info if any
|1150|1150| 	if (cmd.metadata)
|1151|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1151|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1152|1152| 
|1153|1153| 	// Tell the units to start building this new entity
|1154|1154| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1256|1256| 		}
|1257|1257| 
|1258|1258| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1259|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1259|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1260|1260| 	}
|1261|1261| 
|1262|1262| 	var i = 0;
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1320|1320| 
|1321|1321| 				if (i > 0)
|1322|1322| 				{
|1323|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1323|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1324|1324| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1325|1325| 					// TODO: ensure that cmpPreviousObstruction exists
|1326|1326| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1483|1483| 		// Check that all its members are selected
|1484|1484| 		var fid = formationIds[0];
|1485|1485| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1486|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1487|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1486|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1487|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1488|1488| 		{
|1489|1489| 			cmpFormation.DeleteTwinFormations();
|1490|1490| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1591|1591| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1592|1592| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1593|1593| 				if (matrix[i][j] < distSq)
|1594|    |-					closeClusters = [i,j];
|    |1594|+					closeClusters = [i, j];
|1595|1595| 
|1596|1596| 		// if no more close clusters found, just return all found clusters so far
|1597|1597| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1613|1613| 		}
|1614|1614| 		// remove the rows and columns in the matrix for the merged clusters,
|1615|1615| 		// and the clusters themselves from the cluster list
|1616|    |-		clusters.splice(closeClusters[0],1);
|    |1616|+		clusters.splice(closeClusters[0], 1);
|1617|1617| 		clusters.splice(closeClusters[1],1);
|1618|1618| 		matrix.splice(closeClusters[0],1);
|1619|1619| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1614|1614| 		// remove the rows and columns in the matrix for the merged clusters,
|1615|1615| 		// and the clusters themselves from the cluster list
|1616|1616| 		clusters.splice(closeClusters[0],1);
|1617|    |-		clusters.splice(closeClusters[1],1);
|    |1617|+		clusters.splice(closeClusters[1], 1);
|1618|1618| 		matrix.splice(closeClusters[0],1);
|1619|1619| 		matrix.splice(closeClusters[1],1);
|1620|1620| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1615|1615| 		// and the clusters themselves from the cluster list
|1616|1616| 		clusters.splice(closeClusters[0],1);
|1617|1617| 		clusters.splice(closeClusters[1],1);
|1618|    |-		matrix.splice(closeClusters[0],1);
|    |1618|+		matrix.splice(closeClusters[0], 1);
|1619|1619| 		matrix.splice(closeClusters[1],1);
|1620|1620| 		for (let i = 0; i < matrix.length; ++i)
|1621|1621| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1616|1616| 		clusters.splice(closeClusters[0],1);
|1617|1617| 		clusters.splice(closeClusters[1],1);
|1618|1618| 		matrix.splice(closeClusters[0],1);
|1619|    |-		matrix.splice(closeClusters[1],1);
|    |1619|+		matrix.splice(closeClusters[1], 1);
|1620|1620| 		for (let i = 0; i < matrix.length; ++i)
|1621|1621| 		{
|1622|1622| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1620|1620| 		for (let i = 0; i < matrix.length; ++i)
|1621|1621| 		{
|1622|1622| 			if (matrix[i].length > closeClusters[0])
|1623|    |-				matrix[i].splice(closeClusters[0],1);
|    |1623|+				matrix[i].splice(closeClusters[0], 1);
|1624|1624| 			if (matrix[i].length > closeClusters[1])
|1625|1625| 				matrix[i].splice(closeClusters[1],1);
|1626|1626| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1622|1622| 			if (matrix[i].length > closeClusters[0])
|1623|1623| 				matrix[i].splice(closeClusters[0],1);
|1624|1624| 			if (matrix[i].length > closeClusters[1])
|1625|    |-				matrix[i].splice(closeClusters[1],1);
|    |1625|+				matrix[i].splice(closeClusters[1], 1);
|1626|1626| 		}
|1627|1627| 		// add a new row of distances to the matrix and the new cluster
|1628|1628| 		clusters.push(newCluster);

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1510| »   »   »   »   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
|1589| »   »   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
|1606| »   »   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
|1620| »   »   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
| 546| »   »   »   »   ····&&·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
| 734| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1546| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|1588|1588| 			return {
|1589|1589| 				"possible": true,
|1590|1590| 				"tooltip": g_UnitActions[action].getActionInfo("attack-ground", selection).tooltip
|1591|    |-			}
|    |1591|+			};
|1592|1592| 
|1593|1593| 		return {
|1594|1594| 			"possible": ["move", "attack-move", "remove-guard", "patrol"].indexOf(action) != -1

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

binaries/data/mods/public/gui/session/unit_actions.js
|1591| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 330| 330| 	}
| 331| 331| 
| 332| 332| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 333|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 333|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 334| 334| 	{
| 335| 335| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 336| 336| 		return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 480| 480| 	mouseIsOverObject = (hoveredObject != null);
| 481| 481| 
| 482| 482| 	// Close the menu when interacting with the game world
| 483|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 484|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 483|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 484|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 485| 485| 		g_Menu.close();
| 486| 486| 
| 487| 487| 	// State-machine processing:
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 641| 641| 		// user to continue building walls.
| 642| 642| 		switch (ev.type)
| 643| 643| 		{
| 644|    |-			case "mousemotion":
|    | 644|+		case "mousemotion":
| 645| 645| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 646| 646| 
| 647| 647| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 642| 642| 		switch (ev.type)
| 643| 643| 		{
| 644| 644| 			case "mousemotion":
| 645|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 645|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 646| 646| 
| 647| 647| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 648| 648| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 644| 644| 			case "mousemotion":
| 645| 645| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 646| 646| 
| 647|    |-				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 647|+			// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 648| 648| 				// the ending point and the starting point to snap to.
| 649| 649| 				//
| 650| 650| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 645| 645| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 646| 646| 
| 647| 647| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 648|    |-				// the ending point and the starting point to snap to.
|    | 648|+			// the ending point and the starting point to snap to.
| 649| 649| 				//
| 650| 650| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 651| 651| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 646| 646| 
| 647| 647| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 648| 648| 				// the ending point and the starting point to snap to.
| 649|    |-				//
|    | 649|+			//
| 650| 650| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 651| 651| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 652| 652| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 647| 647| 				// Update the building placement preview, and by extension, the list of snapping candidate entities for both (!)
| 648| 648| 				// the ending point and the starting point to snap to.
| 649| 649| 				//
| 650|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 650|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 651| 651| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 652| 652| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 653| 653| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 648| 648| 				// the ending point and the starting point to snap to.
| 649| 649| 				//
| 650| 650| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 651|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 651|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 652| 652| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 653| 653| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 654| 654| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 649| 649| 				//
| 650| 650| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 651| 651| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 652|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 652|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 653| 653| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 654| 654| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 655| 655| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 650| 650| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 651| 651| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 652| 652| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 653|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 653|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 654| 654| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 655| 655| 				// points.
| 656| 656| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 651| 651| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 652| 652| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 653| 653| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 654|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 654|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 655| 655| 				// points.
| 656| 656| 
| 657| 657| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 653| 653| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 654| 654| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 655|    |-				// points.
|    | 655|+			// points.
| 656| 656| 
| 657| 657| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 658| 658| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 655| 655| 				// points.
| 656| 656| 
| 657|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 657|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 658| 658| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 659| 659| 
| 660| 660| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				// points.
| 656| 656| 
| 657| 657| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 658|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 658|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 659| 659| 
| 660| 660| 				if (result && result.cost)
| 661| 661| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 657| 657| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 658| 658| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 659| 659| 
| 660|    |-				if (result && result.cost)
|    | 660|+			if (result && result.cost)
| 661| 661| 				{
| 662| 662| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 663| 663| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 659| 659| 
| 660| 660| 				if (result && result.cost)
| 661|    |-				{
|    | 661|+			{
| 662| 662| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 663| 663| 					placementSupport.tooltipMessage = [
| 664| 664| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 659| 659| 
| 660| 660| 				if (result && result.cost)
| 661| 661| 				{
| 662|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 662|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 663| 663| 					placementSupport.tooltipMessage = [
| 664| 664| 						getEntityCostTooltip(result),
| 665| 665| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 660| 660| 				if (result && result.cost)
| 661| 661| 				{
| 662| 662| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 663|    |-					placementSupport.tooltipMessage = [
|    | 663|+				placementSupport.tooltipMessage = [
| 664| 664| 						getEntityCostTooltip(result),
| 665| 665| 						getNeededResourcesTooltip(neededResources)
| 666| 666| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 661| 661| 				{
| 662| 662| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 663| 663| 					placementSupport.tooltipMessage = [
| 664|    |-						getEntityCostTooltip(result),
|    | 664|+					getEntityCostTooltip(result),
| 665| 665| 						getNeededResourcesTooltip(neededResources)
| 666| 666| 					].filter(tip => tip).join("\n");
| 667| 667| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 662| 662| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 663| 663| 					placementSupport.tooltipMessage = [
| 664| 664| 						getEntityCostTooltip(result),
| 665|    |-						getNeededResourcesTooltip(neededResources)
|    | 665|+					getNeededResourcesTooltip(neededResources)
| 666| 666| 					].filter(tip => tip).join("\n");
| 667| 667| 				}
| 668| 668| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 663| 663| 					placementSupport.tooltipMessage = [
| 664| 664| 						getEntityCostTooltip(result),
| 665| 665| 						getNeededResourcesTooltip(neededResources)
| 666|    |-					].filter(tip => tip).join("\n");
|    | 666|+				].filter(tip => tip).join("\n");
| 667| 667| 				}
| 668| 668| 
| 669| 669| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 664| 664| 						getEntityCostTooltip(result),
| 665| 665| 						getNeededResourcesTooltip(neededResources)
| 666| 666| 					].filter(tip => tip).join("\n");
| 667|    |-				}
|    | 667|+			}
| 668| 668| 
| 669| 669| 				break;
| 670| 670| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 666| 666| 					].filter(tip => tip).join("\n");
| 667| 667| 				}
| 668| 668| 
| 669|    |-				break;
|    | 669|+			break;
| 670| 670| 
| 671| 671| 			case "mousebuttondown":
| 672| 672| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 668| 668| 
| 669| 669| 				break;
| 670| 670| 
| 671|    |-			case "mousebuttondown":
|    | 671|+		case "mousebuttondown":
| 672| 672| 				if (ev.button == SDL_BUTTON_LEFT)
| 673| 673| 				{
| 674| 674| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 669| 669| 				break;
| 670| 670| 
| 671| 671| 			case "mousebuttondown":
| 672|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 672|+			if (ev.button == SDL_BUTTON_LEFT)
| 673| 673| 				{
| 674| 674| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 675| 675| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 670| 670| 
| 671| 671| 			case "mousebuttondown":
| 672| 672| 				if (ev.button == SDL_BUTTON_LEFT)
| 673|    |-				{
|    | 673|+			{
| 674| 674| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 675| 675| 					if (tryPlaceWall(queued))
| 676| 676| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 671| 671| 			case "mousebuttondown":
| 672| 672| 				if (ev.button == SDL_BUTTON_LEFT)
| 673| 673| 				{
| 674|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 674|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 675| 675| 					if (tryPlaceWall(queued))
| 676| 676| 					{
| 677| 677| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 672| 672| 				if (ev.button == SDL_BUTTON_LEFT)
| 673| 673| 				{
| 674| 674| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 675|    |-					if (tryPlaceWall(queued))
|    | 675|+				if (tryPlaceWall(queued))
| 676| 676| 					{
| 677| 677| 						if (queued)
| 678| 678| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 673| 673| 				{
| 674| 674| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 675| 675| 					if (tryPlaceWall(queued))
| 676|    |-					{
|    | 676|+				{
| 677| 677| 						if (queued)
| 678| 678| 						{
| 679| 679| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 674| 674| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 675| 675| 					if (tryPlaceWall(queued))
| 676| 676| 					{
| 677|    |-						if (queued)
|    | 677|+					if (queued)
| 678| 678| 						{
| 679| 679| 							// continue building, just set a new starting position where we left off
| 680| 680| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 675| 675| 					if (tryPlaceWall(queued))
| 676| 676| 					{
| 677| 677| 						if (queued)
| 678|    |-						{
|    | 678|+					{
| 679| 679| 							// continue building, just set a new starting position where we left off
| 680| 680| 							placementSupport.position = placementSupport.wallEndPosition;
| 681| 681| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 676| 676| 					{
| 677| 677| 						if (queued)
| 678| 678| 						{
| 679|    |-							// continue building, just set a new starting position where we left off
|    | 679|+						// continue building, just set a new starting position where we left off
| 680| 680| 							placementSupport.position = placementSupport.wallEndPosition;
| 681| 681| 							placementSupport.wallEndPosition = undefined;
| 682| 682| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 677| 677| 						if (queued)
| 678| 678| 						{
| 679| 679| 							// continue building, just set a new starting position where we left off
| 680|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 680|+						placementSupport.position = placementSupport.wallEndPosition;
| 681| 681| 							placementSupport.wallEndPosition = undefined;
| 682| 682| 
| 683| 683| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 678| 678| 						{
| 679| 679| 							// continue building, just set a new starting position where we left off
| 680| 680| 							placementSupport.position = placementSupport.wallEndPosition;
| 681|    |-							placementSupport.wallEndPosition = undefined;
|    | 681|+						placementSupport.wallEndPosition = undefined;
| 682| 682| 
| 683| 683| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 684| 684| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 680| 680| 							placementSupport.position = placementSupport.wallEndPosition;
| 681| 681| 							placementSupport.wallEndPosition = undefined;
| 682| 682| 
| 683|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 683|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 684| 684| 						}
| 685| 685| 						else
| 686| 686| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 681| 681| 							placementSupport.wallEndPosition = undefined;
| 682| 682| 
| 683| 683| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 684|    |-						}
|    | 684|+					}
| 685| 685| 						else
| 686| 686| 						{
| 687| 687| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 682| 682| 
| 683| 683| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 684| 684| 						}
| 685|    |-						else
|    | 685|+					else
| 686| 686| 						{
| 687| 687| 							placementSupport.Reset();
| 688| 688| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 683| 683| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 684| 684| 						}
| 685| 685| 						else
| 686|    |-						{
|    | 686|+					{
| 687| 687| 							placementSupport.Reset();
| 688| 688| 							inputState = INPUT_NORMAL;
| 689| 689| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						}
| 685| 685| 						else
| 686| 686| 						{
| 687|    |-							placementSupport.Reset();
|    | 687|+						placementSupport.Reset();
| 688| 688| 							inputState = INPUT_NORMAL;
| 689| 689| 						}
| 690| 690| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 685| 685| 						else
| 686| 686| 						{
| 687| 687| 							placementSupport.Reset();
| 688|    |-							inputState = INPUT_NORMAL;
|    | 688|+						inputState = INPUT_NORMAL;
| 689| 689| 						}
| 690| 690| 					}
| 691| 691| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 686| 686| 						{
| 687| 687| 							placementSupport.Reset();
| 688| 688| 							inputState = INPUT_NORMAL;
| 689|    |-						}
|    | 689|+					}
| 690| 690| 					}
| 691| 691| 					else
| 692| 692| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 687| 687| 							placementSupport.Reset();
| 688| 688| 							inputState = INPUT_NORMAL;
| 689| 689| 						}
| 690|    |-					}
|    | 690|+				}
| 691| 691| 					else
| 692| 692| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 693| 693| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 688| 688| 							inputState = INPUT_NORMAL;
| 689| 689| 						}
| 690| 690| 					}
| 691|    |-					else
|    | 691|+				else
| 692| 692| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 693| 693| 
| 694| 694| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 689| 689| 						}
| 690| 690| 					}
| 691| 691| 					else
| 692|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 692|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 693| 693| 
| 694| 694| 					updateBuildingPlacementPreview();
| 695| 695| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 691| 691| 					else
| 692| 692| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 693| 693| 
| 694|    |-					updateBuildingPlacementPreview();
|    | 694|+				updateBuildingPlacementPreview();
| 695| 695| 					return true;
| 696| 696| 				}
| 697| 697| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 692| 692| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 693| 693| 
| 694| 694| 					updateBuildingPlacementPreview();
| 695|    |-					return true;
|    | 695|+				return true;
| 696| 696| 				}
| 697| 697| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 698| 698| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 693| 693| 
| 694| 694| 					updateBuildingPlacementPreview();
| 695| 695| 					return true;
| 696|    |-				}
|    | 696|+			}
| 697| 697| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 698| 698| 				{
| 699| 699| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 694| 694| 					updateBuildingPlacementPreview();
| 695| 695| 					return true;
| 696| 696| 				}
| 697|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 697|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 698| 698| 				{
| 699| 699| 					// reset to normal input mode
| 700| 700| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 695| 695| 					return true;
| 696| 696| 				}
| 697| 697| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 698|    |-				{
|    | 698|+			{
| 699| 699| 					// reset to normal input mode
| 700| 700| 					placementSupport.Reset();
| 701| 701| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 696| 696| 				}
| 697| 697| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 698| 698| 				{
| 699|    |-					// reset to normal input mode
|    | 699|+				// reset to normal input mode
| 700| 700| 					placementSupport.Reset();
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 697| 697| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 698| 698| 				{
| 699| 699| 					// reset to normal input mode
| 700|    |-					placementSupport.Reset();
|    | 700|+				placementSupport.Reset();
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 
| 703| 703| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 698| 698| 				{
| 699| 699| 					// reset to normal input mode
| 700| 700| 					placementSupport.Reset();
| 701|    |-					updateBuildingPlacementPreview();
|    | 701|+				updateBuildingPlacementPreview();
| 702| 702| 
| 703| 703| 					inputState = INPUT_NORMAL;
| 704| 704| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 700| 700| 					placementSupport.Reset();
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 
| 703|    |-					inputState = INPUT_NORMAL;
|    | 703|+				inputState = INPUT_NORMAL;
| 704| 704| 					return true;
| 705| 705| 				}
| 706| 706| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 
| 703| 703| 					inputState = INPUT_NORMAL;
| 704|    |-					return true;
|    | 704|+				return true;
| 705| 705| 				}
| 706| 706| 				break;
| 707| 707| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 702| 702| 
| 703| 703| 					inputState = INPUT_NORMAL;
| 704| 704| 					return true;
| 705|    |-				}
|    | 705|+			}
| 706| 706| 				break;
| 707| 707| 		}
| 708| 708| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 703| 703| 					inputState = INPUT_NORMAL;
| 704| 704| 					return true;
| 705| 705| 				}
| 706|    |-				break;
|    | 706|+			break;
| 707| 707| 		}
| 708| 708| 		break;
| 709| 709| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 842| 842| 			break;
| 843| 843| 
| 844| 844| 		case "hotkeydown":
| 845|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 845|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 846| 846| 				{
| 847| 847| 					let now = Date.now();
| 848| 848| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 843| 843| 
| 844| 844| 		case "hotkeydown":
| 845| 845| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 846|    |-				{
|    | 846|+			{
| 847| 847| 					let now = Date.now();
| 848| 848| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 849| 849| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 844| 844| 		case "hotkeydown":
| 845| 845| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 846| 846| 				{
| 847|    |-					let now = Date.now();
|    | 847|+				let now = Date.now();
| 848| 848| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 849| 849| 					{
| 850| 850| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 845| 845| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 846| 846| 				{
| 847| 847| 					let now = Date.now();
| 848|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 848|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 849| 849| 					{
| 850| 850| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 851| 851| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 846| 846| 				{
| 847| 847| 					let now = Date.now();
| 848| 848| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 849|    |-					{
|    | 849|+				{
| 850| 850| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 851| 851| 						{
| 852| 852| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 847| 847| 					let now = Date.now();
| 848| 848| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 849| 849| 					{
| 850|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 850|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 851| 851| 						{
| 852| 852| 							var sptr = ev.hotkey.split(".");
| 853| 853| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 848| 848| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 849| 849| 					{
| 850| 850| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 851|    |-						{
|    | 851|+					{
| 852| 852| 							var sptr = ev.hotkey.split(".");
| 853| 853| 							performGroup("snap", sptr[3]);
| 854| 854| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 849| 849| 					{
| 850| 850| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 851| 851| 						{
| 852|    |-							var sptr = ev.hotkey.split(".");
|    | 852|+						var sptr = ev.hotkey.split(".");
| 853| 853| 							performGroup("snap", sptr[3]);
| 854| 854| 						}
| 855| 855| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 850| 850| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 851| 851| 						{
| 852| 852| 							var sptr = ev.hotkey.split(".");
| 853|    |-							performGroup("snap", sptr[3]);
|    | 853|+						performGroup("snap", sptr[3]);
| 854| 854| 						}
| 855| 855| 					}
| 856| 856| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 851| 851| 						{
| 852| 852| 							var sptr = ev.hotkey.split(".");
| 853| 853| 							performGroup("snap", sptr[3]);
| 854|    |-						}
|    | 854|+					}
| 855| 855| 					}
| 856| 856| 					else
| 857| 857| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 852| 852| 							var sptr = ev.hotkey.split(".");
| 853| 853| 							performGroup("snap", sptr[3]);
| 854| 854| 						}
| 855|    |-					}
|    | 855|+				}
| 856| 856| 					else
| 857| 857| 					{
| 858| 858| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 853| 853| 							performGroup("snap", sptr[3]);
| 854| 854| 						}
| 855| 855| 					}
| 856|    |-					else
|    | 856|+				else
| 857| 857| 					{
| 858| 858| 						var sptr = ev.hotkey.split(".");
| 859| 859| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 854| 854| 						}
| 855| 855| 					}
| 856| 856| 					else
| 857|    |-					{
|    | 857|+				{
| 858| 858| 						var sptr = ev.hotkey.split(".");
| 859| 859| 						performGroup(sptr[2], sptr[3]);
| 860| 860| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 855| 855| 					}
| 856| 856| 					else
| 857| 857| 					{
| 858|    |-						var sptr = ev.hotkey.split(".");
|    | 858|+					var sptr = ev.hotkey.split(".");
| 859| 859| 						performGroup(sptr[2], sptr[3]);
| 860| 860| 
| 861| 861| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 856| 856| 					else
| 857| 857| 					{
| 858| 858| 						var sptr = ev.hotkey.split(".");
| 859|    |-						performGroup(sptr[2], sptr[3]);
|    | 859|+					performGroup(sptr[2], sptr[3]);
| 860| 860| 
| 861| 861| 						doublePressTimer = now;
| 862| 862| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 858| 858| 						var sptr = ev.hotkey.split(".");
| 859| 859| 						performGroup(sptr[2], sptr[3]);
| 860| 860| 
| 861|    |-						doublePressTimer = now;
|    | 861|+					doublePressTimer = now;
| 862| 862| 						prevHotkey = ev.hotkey;
| 863| 863| 					}
| 864| 864| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 859| 859| 						performGroup(sptr[2], sptr[3]);
| 860| 860| 
| 861| 861| 						doublePressTimer = now;
| 862|    |-						prevHotkey = ev.hotkey;
|    | 862|+					prevHotkey = ev.hotkey;
| 863| 863| 					}
| 864| 864| 				}
| 865| 865| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 860| 860| 
| 861| 861| 						doublePressTimer = now;
| 862| 862| 						prevHotkey = ev.hotkey;
| 863|    |-					}
|    | 863|+				}
| 864| 864| 				}
| 865| 865| 				break;
| 866| 866| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 861| 861| 						doublePressTimer = now;
| 862| 862| 						prevHotkey = ev.hotkey;
| 863| 863| 					}
| 864|    |-				}
|    | 864|+			}
| 865| 865| 				break;
| 866| 866| 		}
| 867| 867| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 862| 862| 						prevHotkey = ev.hotkey;
| 863| 863| 					}
| 864| 864| 				}
| 865|    |-				break;
|    | 865|+			break;
| 866| 866| 		}
| 867| 867| 		break;
| 868| 868| 
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1535|1535| 		g_BatchTrainingEntityAllowedCount < batchedSize * appropriateBuildings.length)
|1536|1536| 	{
|1537|1537| 		// Train as many full batches as we can
|1538|    |-		let buildingsCountToTrainFullBatch = Math.floor( g_BatchTrainingEntityAllowedCount / batchedSize);
|    |1538|+		let buildingsCountToTrainFullBatch = Math.floor(g_BatchTrainingEntityAllowedCount / batchedSize);
|1539|1539| 		Engine.PostNetworkCommand({
|1540|1540| 			"type": "train",
|1541|1541| 			"entities": appropriateBuildings.slice(0, buildingsCountToTrainFullBatch),
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1614|1614| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1615|1615| 
|1616|1616| 	// Reset the last idle unit, etc., if the selection type has changed.
|1617|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1617|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1618|1618| 		resetIdleUnit();
|1619|1619| 	lastIdleClasses = classes;
|1620|1620| 

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 890| »   »   »   »   »   action.radius·=·g_AttackGroundSize;
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_AttackGroundSize' was used before it was defined.

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 484| »   »   &&·(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
| 514| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 517| »   »   »   »   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
| 674| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1312| var·g_AttackGroundSize·=·getDefaultAttackGroundSize();
|    | [NORMAL] JSHintBear:
|    | 'g_AttackGroundSize' was used before it was defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 823| 823| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 824| 824| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 825| 825| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 826|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 826|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 827| 827| 	}
| 828| 828| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 829| 829| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1656|1656| 			{
|1657|1657| 				minDist2 = dist2;
|1658|1658| 				minDistEntitySnapData = {
|1659|    |-						"x": pos.x,
|    |1659|+					"x": pos.x,
|1660|1660| 						"z": pos.z,
|1661|1661| 						"angle": cmpPosition.GetRotation().y,
|1662|1662| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1657|1657| 				minDist2 = dist2;
|1658|1658| 				minDistEntitySnapData = {
|1659|1659| 						"x": pos.x,
|1660|    |-						"z": pos.z,
|    |1660|+					"z": pos.z,
|1661|1661| 						"angle": cmpPosition.GetRotation().y,
|1662|1662| 						"ent": ent
|1663|1663| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1658|1658| 				minDistEntitySnapData = {
|1659|1659| 						"x": pos.x,
|1660|1660| 						"z": pos.z,
|1661|    |-						"angle": cmpPosition.GetRotation().y,
|    |1661|+					"angle": cmpPosition.GetRotation().y,
|1662|1662| 						"ent": ent
|1663|1663| 				};
|1664|1664| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1659|1659| 						"x": pos.x,
|1660|1660| 						"z": pos.z,
|1661|1661| 						"angle": cmpPosition.GetRotation().y,
|1662|    |-						"ent": ent
|    |1662|+					"ent": ent
|1663|1663| 				};
|1664|1664| 			}
|1665|1665| 		}
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 800| 800| 					this.FinishOrder();
| 801| 801| 					return;
| 802| 802| 				}
| 803|    |-				else
| 804|    |-				{
|    | 803|+				
| 805| 804| 					this.SetNextState("GARRISON.APPROACHING");
| 806| 805| 					return;
| 807|    |-				}
|    | 806|+				
| 808| 807| 			}
| 809| 808| 
| 810| 809| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1068|1068| 			},
|1069|1069| 		},
|1070|1070| 
|1071|    |-		"GARRISON":{
|    |1071|+		"GARRISON": {
|1072|1072| 			"enter": function() {
|1073|1073| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1074|1074| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1203|1203| 
|1204|1204| 							if (attackEntity)
|1205|1205| 								this.PushOrderFront("Attack", {
|1206|    |-										"target": target,
|    |1206|+									"target": target,
|1207|1207| 										"force": false,
|1208|1208| 										"allowCapture": allowCapture
|1209|1209| 									});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1204|1204| 							if (attackEntity)
|1205|1205| 								this.PushOrderFront("Attack", {
|1206|1206| 										"target": target,
|1207|    |-										"force": false,
|    |1207|+									"force": false,
|1208|1208| 										"allowCapture": allowCapture
|1209|1209| 									});
|1210|1210| 							else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1205|1205| 								this.PushOrderFront("Attack", {
|1206|1206| 										"target": target,
|1207|1207| 										"force": false,
|1208|    |-										"allowCapture": allowCapture
|    |1208|+									"allowCapture": allowCapture
|1209|1209| 									});
|1210|1210| 							else
|1211|1211| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 9.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1206|1206| 										"target": target,
|1207|1207| 										"force": false,
|1208|1208| 										"allowCapture": allowCapture
|1209|    |-									});
|    |1209|+								});
|1210|1210| 							else
|1211|1211| 								this.PushOrderFront("AttackGround", {
|1212|1212| 									"target": target,
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1241|1241| 							this.FinishOrder();
|1242|1242| 							if (attackEntity)
|1243|1243| 								this.PushOrderFront("Attack", {
|1244|    |-										"target": target,
|    |1244|+									"target": target,
|1245|1245| 										"force": false,
|1246|1246| 										"allowCapture": allowCapture
|1247|1247| 									});
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1242|1242| 							if (attackEntity)
|1243|1243| 								this.PushOrderFront("Attack", {
|1244|1244| 										"target": target,
|1245|    |-										"force": false,
|    |1245|+									"force": false,
|1246|1246| 										"allowCapture": allowCapture
|1247|1247| 									});
|1248|1248| 							else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 9 tabs but found 10.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1243|1243| 								this.PushOrderFront("Attack", {
|1244|1244| 										"target": target,
|1245|1245| 										"force": false,
|1246|    |-										"allowCapture": allowCapture
|    |1246|+									"allowCapture": allowCapture
|1247|1247| 									});
|1248|1248| 							else
|1249|1249| 								this.PushOrderFront("AttackGround", {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 8 tabs but found 9.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1244|1244| 										"target": target,
|1245|1245| 										"force": false,
|1246|1246| 										"allowCapture": allowCapture
|1247|    |-									});
|    |1247|+								});
|1248|1248| 							else
|1249|1249| 								this.PushOrderFront("AttackGround", {
|1250|1250| 									"target": target,
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2095|2095| 
|2096|2096| 				"Attacked": function(msg) {
|2097|2097| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2098|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2099|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2098|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2099|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2100|2100| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2101|2101| 				},
|2102|2102| 			},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2823|2823| 					{
|2824|2824| 						// The building was already finished/fully repaired before we arrived;
|2825|2825| 						// let the ConstructionFinished handler handle this.
|2826|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2826|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2827|2827| 						return true;
|2828|2828| 					}
|2829|2829| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2823|2823| 					{
|2824|2824| 						// The building was already finished/fully repaired before we arrived;
|2825|2825| 						// let the ConstructionFinished handler handle this.
|2826|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2826|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2827|2827| 						return true;
|2828|2828| 					}
|2829|2829| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3336|3336| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3337|3337| 
|3338|3338| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3339|    |-							// only used for domestic animals
|    |3339|+		// only used for domestic animals
|3340|3340| 	},
|3341|3341| };
|3342|3342| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3393|3393| 
|3394|3394| UnitAI.prototype.IsAnimal = function()
|3395|3395| {
|3396|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3396|+	return (!!this.template.NaturalBehaviour);
|3397|3397| };
|3398|3398| 
|3399|3399| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3509|3509| 		{
|3510|3510| 			let index = this.GetCurrentState().indexOf(".");
|3511|3511| 			if (index != -1)
|3512|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3512|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3513|3513| 			this.Stop(false);
|3514|3514| 		}
|3515|3515| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3565|3565| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3566|3566| 			continue;
|3567|3567| 		if (i == 0)
|3568|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3568|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3569|3569| 		else
|3570|3570| 			this.orderQueue.splice(i, 1);
|3571|3571| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3565|3565| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3566|3566| 			continue;
|3567|3567| 		if (i == 0)
|3568|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3568|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3569|3569| 		else
|3570|3570| 			this.orderQueue.splice(i, 1);
|3571|3571| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3649|3649| };
|3650|3650| 
|3651|3651| 
|3652|    |-//// FSM linkage functions ////
|    |3652|+// // FSM linkage functions ////
|3653|3653| 
|3654|3654| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3655|3655| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3819|3819| 				continue;
|3820|3820| 			if (this.orderQueue[i].type == type)
|3821|3821| 				continue;
|3822|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3822|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3823|3823| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3824|3824| 			return;
|3825|3825| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3819|3819| 				continue;
|3820|3820| 			if (this.orderQueue[i].type == type)
|3821|3821| 				continue;
|3822|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3822|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3823|3823| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3824|3824| 			return;
|3825|3825| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3990|3990| 	if (data.timerRepeat === undefined)
|3991|3991| 		this.timer = undefined;
|3992|3992| 
|3993|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3993|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3994|3994| };
|3995|3995| 
|3996|3996| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3990|3990| 	if (data.timerRepeat === undefined)
|3991|3991| 		this.timer = undefined;
|3992|3992| 
|3993|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3993|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3994|3994| };
|3995|3995| 
|3996|3996| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4035|4035| 	// TODO: This is a bit inefficient since every unit listens to every
|4036|4036| 	// construction message - ideally we could scope it to only the one we're building
|4037|4037| 
|4038|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4038|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4039|4039| };
|4040|4040| 
|4041|4041| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4035|4035| 	// TODO: This is a bit inefficient since every unit listens to every
|4036|4036| 	// construction message - ideally we could scope it to only the one we're building
|4037|4037| 
|4038|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4038|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4039|4039| };
|4040|4040| 
|4041|4041| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4060|4060| 
|4061|4061| UnitAI.prototype.OnAttacked = function(msg)
|4062|4062| {
|4063|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4063|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4064|4064| };
|4065|4065| 
|4066|4066| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4060|4060| 
|4061|4061| UnitAI.prototype.OnAttacked = function(msg)
|4062|4062| {
|4063|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4063|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4064|4064| };
|4065|4065| 
|4066|4066| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4065|4065| 
|4066|4066| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4067|4067| {
|4068|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4068|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4069|4069| };
|4070|4070| 
|4071|4071| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4065|4065| 
|4066|4066| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4067|4067| {
|4068|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4068|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4069|4069| };
|4070|4070| 
|4071|4071| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4070|4070| 
|4071|4071| UnitAI.prototype.OnHealthChanged = function(msg)
|4072|4072| {
|4073|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4073|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4074|4074| };
|4075|4075| 
|4076|4076| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4070|4070| 
|4071|4071| UnitAI.prototype.OnHealthChanged = function(msg)
|4072|4072| {
|4073|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4073|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4074|4074| };
|4075|4075| 
|4076|4076| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4076|4076| UnitAI.prototype.OnRangeUpdate = function(msg)
|4077|4077| {
|4078|4078| 	if (msg.tag == this.losRangeQuery)
|4079|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4079|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4080|4080| 	else if (msg.tag == this.losHealRangeQuery)
|4081|4081| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4082|4082| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4076|4076| UnitAI.prototype.OnRangeUpdate = function(msg)
|4077|4077| {
|4078|4078| 	if (msg.tag == this.losRangeQuery)
|4079|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4079|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4080|4080| 	else if (msg.tag == this.losHealRangeQuery)
|4081|4081| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4082|4082| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4078|4078| 	if (msg.tag == this.losRangeQuery)
|4079|4079| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4080|4080| 	else if (msg.tag == this.losHealRangeQuery)
|4081|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4081|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4082|4082| };
|4083|4083| 
|4084|4084| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4078|4078| 	if (msg.tag == this.losRangeQuery)
|4079|4079| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4080|4080| 	else if (msg.tag == this.losHealRangeQuery)
|4081|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4081|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4082|4082| };
|4083|4083| 
|4084|4084| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4083|4083| 
|4084|4084| UnitAI.prototype.OnPackFinished = function(msg)
|4085|4085| {
|4086|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4086|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4087|4087| };
|4088|4088| 
|4089|4089| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4083|4083| 
|4084|4084| UnitAI.prototype.OnPackFinished = function(msg)
|4085|4085| {
|4086|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4086|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4087|4087| };
|4088|4088| 
|4089|4089| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4086|4086| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4087|4087| };
|4088|4088| 
|4089|    |-//// Helper functions to be called by the FSM ////
|    |4089|+// // Helper functions to be called by the FSM ////
|4090|4090| 
|4091|4091| UnitAI.prototype.GetWalkSpeed = function()
|4092|4092| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4542|4542| 	{
|4543|4543| 		if (attackEntity)
|4544|4544| 			return cmpUnitMotion.MoveToTargetRange(target, range.min, range.max);
|4545|    |-		else
|4546|    |-			return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|    |4545|+		return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|4547|4546| 	}
|4548|4547| 
|4549|4548| 	return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4692|4692| 	if (this.IsFormationMember())
|4693|4693| 	{
|4694|4694| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4695|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4696|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4695|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4696|+			cmpFormationUnitAI.order.data.target == target)
|4697|4697| 			return true;
|4698|4698| 	}
|4699|4699| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4886|4886| UnitAI.prototype.AttackEntityInZone = function(ents)
|4887|4887| {
|4888|4888| 	var target = ents.find(target =>
|4889|    |-		this.CanAttack(target)
|4890|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4889|+		this.CanAttack(target) &&
|    |4890|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4891|4891| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4892|4892| 	);
|4893|4893| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4887|4887| {
|4888|4888| 	var target = ents.find(target =>
|4889|4889| 		this.CanAttack(target)
|4890|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4891|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4890|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4891|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4892|4892| 	);
|4893|4893| 	if (!target)
|4894|4894| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4951|4951| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4952|4952| 	if (this.isGuardOf)
|4953|4953| 	{
|4954|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4954|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4955|4955| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4956|4956| 		if (cmpUnitAI && cmpAttack &&
|4957|4957| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4955|4955| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4956|4956| 		if (cmpUnitAI && cmpAttack &&
|4957|4957| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4958|    |-				return false;
|    |4958|+			return false;
|4959|4959| 	}
|4960|4960| 
|4961|4961| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4993|4993| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4994|4994| 	if (this.isGuardOf)
|4995|4995| 	{
|4996|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4996|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4997|4997| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4998|4998| 		if (cmpUnitAI && cmpAttack &&
|4999|4999| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5006|5006| 	return false;
|5007|5007| };
|5008|5008| 
|5009|    |-//// External interface functions ////
|    |5009|+// // External interface functions ////
|5010|5010| 
|5011|5011| UnitAI.prototype.SetFormationController = function(ent)
|5012|5012| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5203|5203| 	{
|5204|5204| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5205|5205| 			return;
|5206|    |-		else
|5207|    |-			this.RemoveGuard();
|    |5206|+		this.RemoveGuard();
|5208|5207| 	}
|5209|5208| 
|5210|5209| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5552|5552| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5553|5553| 	{
|5554|5554| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5555|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5555|+		if (cmpTrader.HasBothMarkets() &&
|5556|5556| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5557|5557| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5558|5558| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5833|5833| 				{
|5834|5834| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5835|5835| 					var targetClasses = this.order.data.targetClasses;
|5836|    |-					if (targetClasses.attack && cmpIdentity
|5837|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5836|+					if (targetClasses.attack && cmpIdentity &&
|    |5837|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5838|5838| 						continue;
|5839|5839| 					if (targetClasses.avoid && cmpIdentity
|5840|5840| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5836|5836| 					if (targetClasses.attack && cmpIdentity
|5837|5837| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5838|5838| 						continue;
|5839|    |-					if (targetClasses.avoid && cmpIdentity
|5840|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5839|+					if (targetClasses.avoid && cmpIdentity &&
|    |5840|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5841|5841| 						continue;
|5842|5842| 					// Only used by the AIs to prevent some choices of targets
|5843|5843| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5859|5859| 		{
|5860|5860| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5861|5861| 			var targetClasses = this.order.data.targetClasses;
|5862|    |-			if (cmpIdentity && targetClasses.attack
|5863|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5862|+			if (cmpIdentity && targetClasses.attack &&
|    |5863|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5864|5864| 				continue;
|5865|5865| 			if (cmpIdentity && targetClasses.avoid
|5866|5866| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5862|5862| 			if (cmpIdentity && targetClasses.attack
|5863|5863| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5864|5864| 				continue;
|5865|    |-			if (cmpIdentity && targetClasses.avoid
|5866|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5865|+			if (cmpIdentity && targetClasses.avoid &&
|    |5866|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5867|5867| 				continue;
|5868|5868| 			// Only used by the AIs to prevent some choices of targets
|5869|5869| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6019|6019| 
|6020|6020| UnitAI.prototype.SetHeldPosition = function(x, z)
|6021|6021| {
|6022|    |-	this.heldPosition = {"x": x, "z": z};
|    |6022|+	this.heldPosition = { "x": x, "z": z};
|6023|6023| };
|6024|6024| 
|6025|6025| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6019|6019| 
|6020|6020| UnitAI.prototype.SetHeldPosition = function(x, z)
|6021|6021| {
|6022|    |-	this.heldPosition = {"x": x, "z": z};
|    |6022|+	this.heldPosition = {"x": x, "z": z };
|6023|6023| };
|6024|6024| 
|6025|6025| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6046|6046| 	return false;
|6047|6047| };
|6048|6048| 
|6049|    |-//// Helper functions ////
|    |6049|+// // Helper functions ////
|6050|6050| 
|6051|6051| UnitAI.prototype.CanAttack = function(target)
|6052|6052| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6250|6250| 	return cmpPack && cmpPack.IsPacking();
|6251|6251| };
|6252|6252| 
|6253|    |-//// Formation specific functions ////
|    |6253|+// // Formation specific functions ////
|6254|6254| 
|6255|6255| UnitAI.prototype.IsAttackingAsFormation = function()
|6256|6256| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6255|6255| UnitAI.prototype.IsAttackingAsFormation = function()
|6256|6256| {
|6257|6257| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6258|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6259|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6258|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6259|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6260|6260| };
|6261|6261| 
|6262|6262| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6259|6259| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6260|6260| };
|6261|6261| 
|6262|    |-//// Animal specific functions ////
|    |6262|+// // Animal specific functions ////
|6263|6263| 
|6264|6264| UnitAI.prototype.MoveRandomly = function(distance)
|6265|6265| {

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
| 955| »   »   »   "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
| 980| »   »   »   "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
|1030| »   »   »   »   »   return·true;
|    | [NORMAL] ESLintBear (consistent-return):
|    | Method 'enter' expected no return value.

binaries/data/mods/public/simulation/components/UnitAI.js
|1093| »   »   »   »   "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
|1129| »   »   »   "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
|1161| »   »   »   »   "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
|1353| »   »   "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
|1410| »   »   »   "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
|1585| »   »   »   "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
|1607| »   »   »   "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
|1639| »   »   »   "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
|1793| »   »   »   "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
|1872| »   »   »   »   "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
|1952| »   »   »   »   "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
|2144| »   »   »   »   "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
|2260| »   »   »   »   "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
|2535| »   »   »   »   "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
|2568| »   »   »   »   "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
|2674| »   »   »   »   "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
|2740| »   »   »   »   "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
|2779| »   »   »   »   "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
|2990| »   »   »   »   "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
|3171| »   »   »   »   "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
|3895| »   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
|4873| »   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
|4888| »   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
|4934| »   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
|4957| »   »   ····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
|2099| »   »   »   »   »   »   &&·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
|3857| »   »   var·order·=·{·"type":·type,·"data":·data·};
|    | [NORMAL] JSHintBear:
|    | 'order' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1128/display/redirect

Silier requested changes to this revision.Jan 7 2020, 1:18 PM
Silier added a subscriber: Silier.
Silier added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
2085

fixed point as target does not move, entity is here if was initially in range already so this branch is not needed and would be wrong as it would try to move entities that should not move like units on the walls, units holding the ground and so on.

Also that would ressult in chasing behaviour in situations when chasing would not happen, just it would be approaching state.

Silier added inline comments.Jan 7 2020, 1:22 PM
binaries/data/mods/public/simulation/components/UnitAI.js
2085

also, MoveToTargetAttackRange already moves entity to target range and the same order is given when entity enters approaching

Silier added inline comments.Jan 7 2020, 1:47 PM
binaries/data/mods/public/simulation/components/UnitAI.js
4518

this needs check for something else, if here, entity is formation controller not formation memeber

Freagarach marked 3 inline comments as done.
Freagarach edited the summary of this revision. (Show Details)
  • Rebased.
  • Reverted radius thing, so only point attack-ground is supported for now.
  • Removed unneeded branch.
binaries/data/mods/public/simulation/components/UnitAI.js
4518

But a formation controller can also be a formation member, right?
Anyway, the formation-specific function might better be discussed in D2015? (Where I removed the check apparently.)

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 542| 542| 			if (cmpGarrisonHolder)
| 543| 543| 			{
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546|    |-				    && player != +cmd.owner)
|    | 545|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 546|+				    player != +cmd.owner)
| 547| 547| 						continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545| 545| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546| 546| 				    && player != +cmd.owner)
| 547|    |-						continue;
|    | 547|+					continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 550| 550| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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 ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/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
|  43| »   if·(g_Commands[cmd.type])
|    | [MAJOR] ESLintBear (no-use-before-define):
|    | 'g_Commands' was used before it was defined.

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

binaries/data/mods/public/simulation/helpers/Commands.js
| 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
| 546| »   »   »   »   ····&&·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
| 734| »   »   »   »   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.

binaries/data/mods/public/gui/session/unit_actions.js
| 602| »   »   »   switch·(tradingDetails.type)
|    | [NORMAL] ESLintBear (default-case):
|    | Expected a default case.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 828| 828| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 829| 829| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 830| 830| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 831|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 831|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 832| 832| 	}
| 833| 833| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 834| 834| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1661|1661| 			{
|1662|1662| 				minDist2 = dist2;
|1663|1663| 				minDistEntitySnapData = {
|1664|    |-						"x": pos.x,
|    |1664|+					"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1662|1662| 				minDist2 = dist2;
|1663|1663| 				minDistEntitySnapData = {
|1664|1664| 						"x": pos.x,
|1665|    |-						"z": pos.z,
|    |1665|+					"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|1668|1668| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1663|1663| 				minDistEntitySnapData = {
|1664|1664| 						"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|    |-						"angle": cmpPosition.GetRotation().y,
|    |1666|+					"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|1668|1668| 				};
|1669|1669| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1664|1664| 						"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|    |-						"ent": ent
|    |1667|+					"ent": ent
|1668|1668| 				};
|1669|1669| 			}
|1670|1670| 		}
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 337| 337| 	}
| 338| 338| 
| 339| 339| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 340|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 340|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 341| 341| 	{
| 342| 342| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 343| 343| 		return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 487| 487| 	mouseIsOverObject = (hoveredObject != null);
| 488| 488| 
| 489| 489| 	// Close the menu when interacting with the game world
| 490|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 491|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 490|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 491|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 492| 492| 		g_Menu.close();
| 493| 493| 
| 494| 494| 	// State-machine processing:
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 648| 648| 		// user to continue building walls.
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651|    |-			case "mousemotion":
|    | 651|+		case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651| 651| 			case "mousemotion":
| 652|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 652|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 651| 651| 			case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654|    |-				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 654|+			// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655|    |-				// the ending point and the starting point to snap to.
|    | 655|+			// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656|    |-				//
|    | 656|+			//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 657|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 658|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 659|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 660|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 661|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662|    |-				// points.
|    | 662|+			// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 664|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 665|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667|    |-				if (result && result.cost)
|    | 667|+			if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668|    |-				{
|    | 668|+			{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 669|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670|    |-					placementSupport.tooltipMessage = [
|    | 670|+				placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671|    |-						getEntityCostTooltip(result),
|    | 671|+					getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672|    |-						getNeededResourcesTooltip(neededResources)
|    | 672|+					getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673|    |-					].filter(tip => tip).join("\n");
|    | 673|+				].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676| 676| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674|    |-				}
|    | 674|+			}
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676|    |-				break;
|    | 676|+			break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
| 678|    |-			case "mousebuttondown":
|    | 678|+		case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 676| 676| 				break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 679|+			if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680|    |-				{
|    | 680|+			{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 681|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682|    |-					if (tryPlaceWall(queued))
|    | 682|+				if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683|    |-					{
|    | 683|+				{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684|    |-						if (queued)
|    | 684|+					if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685|    |-						{
|    | 685|+					{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686|    |-							// continue building, just set a new starting position where we left off
|    | 686|+						// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 687|+						placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688|    |-							placementSupport.wallEndPosition = undefined;
|    | 688|+						placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 690|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691|    |-						}
|    | 691|+					}
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692|    |-						else
|    | 692|+					else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693|    |-						{
|    | 693|+					{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
| 694|    |-							placementSupport.Reset();
|    | 694|+						placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695|    |-							inputState = INPUT_NORMAL;
|    | 695|+						inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696|    |-						}
|    | 696|+					}
| 697| 697| 					}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697|    |-					}
|    | 697|+				}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698|    |-					else
|    | 698|+				else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
| 699|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 699|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701|    |-					updateBuildingPlacementPreview();
|    | 701|+				updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 704|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705|    |-				{
|    | 705|+			{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706|    |-					// reset to normal input mode
|    | 706|+				// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707|    |-					placementSupport.Reset();
|    | 707|+				placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708|    |-					updateBuildingPlacementPreview();
|    | 708|+				updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710|    |-					inputState = INPUT_NORMAL;
|    | 710|+				inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713| 713| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711|    |-					return true;
|    | 711|+				return true;
| 712| 712| 				}
| 713| 713| 				break;
| 714| 714| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712|    |-				}
|    | 712|+			}
| 713| 713| 				break;
| 714| 714| 		}
| 715| 715| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713|    |-				break;
|    | 713|+			break;
| 714| 714| 		}
| 715| 715| 		break;
| 716| 716| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 852| 852| 			break;
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 855|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856|    |-				{
|    | 856|+			{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857|    |-					let now = Date.now();
|    | 857|+				let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 858|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859|    |-					{
|    | 859|+				{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 860|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861|    |-						{
|    | 861|+					{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862|    |-							var sptr = ev.hotkey.split(".");
|    | 862|+						var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863|    |-							performGroup("snap", sptr[3]);
|    | 863|+						performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864|    |-						}
|    | 864|+					}
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865|    |-					}
|    | 865|+				}
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866|    |-					else
|    | 866|+				else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
| 867|    |-					{
|    | 867|+				{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
| 868|    |-						var sptr = ev.hotkey.split(".");
|    | 868|+					var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869|    |-						performGroup(sptr[2], sptr[3]);
|    | 869|+					performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871|    |-						doublePressTimer = now;
|    | 871|+					doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872|    |-						prevHotkey = ev.hotkey;
|    | 872|+					prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875| 875| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873|    |-					}
|    | 873|+				}
| 874| 874| 				}
| 875| 875| 				break;
| 876| 876| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874|    |-				}
|    | 874|+			}
| 875| 875| 				break;
| 876| 876| 		}
| 877| 877| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875|    |-				break;
|    | 875|+			break;
| 876| 876| 		}
| 877| 877| 		break;
| 878| 878| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1604|1604| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1605|1605| 
|1606|1606| 	// Reset the last idle unit, etc., if the selection type has changed.
|1607|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1607|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1608|1608| 		resetIdleUnit();
|1609|1609| 	lastIdleClasses = classes;
|1610|1610| 

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 734| ·»   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 735| ·»   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 740| ·»   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1060| ·»   »   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1061| ·»   »   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1062| ·»   »   »   »   »   "z":·placementSupport.position.z,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1065| ·»   »   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 491| »   »   &&·(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
| 521| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 524| »   »   »   »   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
| 681| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 934| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 818| 818| 					this.FinishOrder();
| 819| 819| 					return;
| 820| 820| 				}
| 821|    |-				else
| 822|    |-				{
|    | 821|+				
| 823| 822| 					this.SetNextState("GARRISON.APPROACHING");
| 824| 823| 					return;
| 825|    |-				}
|    | 824|+				
| 826| 825| 			}
| 827| 826| 
| 828| 827| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1090|1090| 			},
|1091|1091| 		},
|1092|1092| 
|1093|    |-		"GARRISON":{
|    |1093|+		"GARRISON": {
|1094|1094| 			"APPROACHING": {
|1095|1095| 				"enter": function() {
|1096|1096| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2140|2140| 
|2141|2141| 				"Attacked": function(msg) {
|2142|2142| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2143|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2144|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2143|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2144|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2145|2145| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2146|2146| 				},
|2147|2147| 			},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2878|2878| 					{
|2879|2879| 						// The building was already finished/fully repaired before we arrived;
|2880|2880| 						// let the ConstructionFinished handler handle this.
|2881|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2881|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2882|2882| 						return true;
|2883|2883| 					}
|2884|2884| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2878|2878| 					{
|2879|2879| 						// The building was already finished/fully repaired before we arrived;
|2880|2880| 						// let the ConstructionFinished handler handle this.
|2881|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2881|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2882|2882| 						return true;
|2883|2883| 					}
|2884|2884| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3176|3176| 				this.StopTimer();
|3177|3177| 				this.ResetAnimation();
|3178|3178| 				if (this.formationAnimationVariant)
|3179|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3179|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3180|3180| 				else
|3181|3181| 					this.SetDefaultAnimationVariant();
|3182|3182| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3402|3402| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3403|3403| 
|3404|3404| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3405|    |-							// only used for domestic animals
|    |3405|+		// only used for domestic animals
|3406|3406| 
|3407|3407| 		// Reuse the same garrison behaviour for animals.
|3408|3408| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3464|3464| 
|3465|3465| UnitAI.prototype.IsAnimal = function()
|3466|3466| {
|3467|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3467|+	return (!!this.template.NaturalBehaviour);
|3468|3468| };
|3469|3469| 
|3470|3470| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3580|3580| 		{
|3581|3581| 			let index = this.GetCurrentState().indexOf(".");
|3582|3582| 			if (index != -1)
|3583|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3583|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3584|3584| 			this.Stop(false);
|3585|3585| 		}
|3586|3586| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3636|3636| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3637|3637| 			continue;
|3638|3638| 		if (i == 0)
|3639|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3639|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3640|3640| 		else
|3641|3641| 			this.orderQueue.splice(i, 1);
|3642|3642| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3636|3636| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3637|3637| 			continue;
|3638|3638| 		if (i == 0)
|3639|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3639|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3640|3640| 		else
|3641|3641| 			this.orderQueue.splice(i, 1);
|3642|3642| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3723|3723| };
|3724|3724| 
|3725|3725| 
|3726|    |-//// FSM linkage functions ////
|    |3726|+// // FSM linkage functions ////
|3727|3727| 
|3728|3728| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3729|3729| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3894|3894| 				continue;
|3895|3895| 			if (this.orderQueue[i].type == type)
|3896|3896| 				continue;
|3897|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3897|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3898|3898| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3899|3899| 			return;
|3900|3900| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3894|3894| 				continue;
|3895|3895| 			if (this.orderQueue[i].type == type)
|3896|3896| 				continue;
|3897|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3897|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3898|3898| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3899|3899| 			return;
|3900|3900| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4136|4136| 	if (data.timerRepeat === undefined)
|4137|4137| 		this.timer = undefined;
|4138|4138| 
|4139|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4139|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4140|4140| };
|4141|4141| 
|4142|4142| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4136|4136| 	if (data.timerRepeat === undefined)
|4137|4137| 		this.timer = undefined;
|4138|4138| 
|4139|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4139|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4140|4140| };
|4141|4141| 
|4142|4142| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4181|4181| 	// TODO: This is a bit inefficient since every unit listens to every
|4182|4182| 	// construction message - ideally we could scope it to only the one we're building
|4183|4183| 
|4184|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4184|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4185|4185| };
|4186|4186| 
|4187|4187| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4181|4181| 	// TODO: This is a bit inefficient since every unit listens to every
|4182|4182| 	// construction message - ideally we could scope it to only the one we're building
|4183|4183| 
|4184|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4184|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4185|4185| };
|4186|4186| 
|4187|4187| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4212|4212| 	if (msg.fromStatusEffect)
|4213|4213| 		return;
|4214|4214| 
|4215|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4215|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4216|4216| };
|4217|4217| 
|4218|4218| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4212|4212| 	if (msg.fromStatusEffect)
|4213|4213| 		return;
|4214|4214| 
|4215|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4215|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4216|4216| };
|4217|4217| 
|4218|4218| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4217|4217| 
|4218|4218| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4219|4219| {
|4220|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4220|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4221|4221| };
|4222|4222| 
|4223|4223| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4217|4217| 
|4218|4218| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4219|4219| {
|4220|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4220|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4221|4221| };
|4222|4222| 
|4223|4223| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4222|4222| 
|4223|4223| UnitAI.prototype.OnHealthChanged = function(msg)
|4224|4224| {
|4225|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4225|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4226|4226| };
|4227|4227| 
|4228|4228| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4222|4222| 
|4223|4223| UnitAI.prototype.OnHealthChanged = function(msg)
|4224|4224| {
|4225|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4225|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4226|4226| };
|4227|4227| 
|4228|4228| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4228|4228| UnitAI.prototype.OnRangeUpdate = function(msg)
|4229|4229| {
|4230|4230| 	if (msg.tag == this.losRangeQuery)
|4231|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4231|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4232|4232| 	else if (msg.tag == this.losHealRangeQuery)
|4233|4233| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4234|4234| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4228|4228| UnitAI.prototype.OnRangeUpdate = function(msg)
|4229|4229| {
|4230|4230| 	if (msg.tag == this.losRangeQuery)
|4231|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4231|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4232|4232| 	else if (msg.tag == this.losHealRangeQuery)
|4233|4233| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4234|4234| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4230|4230| 	if (msg.tag == this.losRangeQuery)
|4231|4231| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4232|4232| 	else if (msg.tag == this.losHealRangeQuery)
|4233|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4233|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4234|4234| };
|4235|4235| 
|4236|4236| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4230|4230| 	if (msg.tag == this.losRangeQuery)
|4231|4231| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4232|4232| 	else if (msg.tag == this.losHealRangeQuery)
|4233|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4233|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4234|4234| };
|4235|4235| 
|4236|4236| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4235|4235| 
|4236|4236| UnitAI.prototype.OnPackFinished = function(msg)
|4237|4237| {
|4238|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4238|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4239|4239| };
|4240|4240| 
|4241|4241| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4235|4235| 
|4236|4236| UnitAI.prototype.OnPackFinished = function(msg)
|4237|4237| {
|4238|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4238|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4239|4239| };
|4240|4240| 
|4241|4241| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4238|4238| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4239|4239| };
|4240|4240| 
|4241|    |-//// Helper functions to be called by the FSM ////
|    |4241|+// // Helper functions to be called by the FSM ////
|4242|4242| 
|4243|4243| UnitAI.prototype.GetWalkSpeed = function()
|4244|4244| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4692|4692| 	{
|4693|4693| 		if (attackEntity)
|4694|4694| 			return cmpUnitMotion.MoveToTargetRange(target, range.min, range.max);
|4695|    |-		else
|4696|    |-			return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|    |4695|+		return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|4697|4696| 	}
|4698|4697| 
|4699|4698| 	return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4836|4836| 	if (this.IsFormationMember())
|4837|4837| 	{
|4838|4838| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4839|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4840|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4839|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4840|+			cmpFormationUnitAI.order.data.target == target)
|4841|4841| 			return true;
|4842|4842| 	}
|4843|4843| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5039|5039| UnitAI.prototype.AttackEntityInZone = function(ents)
|5040|5040| {
|5041|5041| 	var target = ents.find(target =>
|5042|    |-		this.CanAttack(target)
|5043|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |5042|+		this.CanAttack(target) &&
|    |5043|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5044|5044| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5045|5045| 	);
|5046|5046| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5040|5040| {
|5041|5041| 	var target = ents.find(target =>
|5042|5042| 		this.CanAttack(target)
|5043|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5044|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |5043|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |5044|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5045|5045| 	);
|5046|5046| 	if (!target)
|5047|5047| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5104|5104| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5105|5105| 	if (this.isGuardOf)
|5106|5106| 	{
|5107|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5107|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5108|5108| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5109|5109| 		if (cmpUnitAI && cmpAttack &&
|5110|5110| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5108|5108| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5109|5109| 		if (cmpUnitAI && cmpAttack &&
|5110|5110| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5111|    |-				return false;
|    |5111|+			return false;
|5112|5112| 	}
|5113|5113| 
|5114|5114| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5146|5146| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5147|5147| 	if (this.isGuardOf)
|5148|5148| 	{
|5149|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5149|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5150|5150| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5151|5151| 		if (cmpUnitAI && cmpAttack &&
|5152|5152| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5159|5159| 	return false;
|5160|5160| };
|5161|5161| 
|5162|    |-//// External interface functions ////
|    |5162|+// // External interface functions ////
|5163|5163| 
|5164|5164| UnitAI.prototype.SetFormationController = function(ent)
|5165|5165| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5358|5358| 	{
|5359|5359| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5360|5360| 			return;
|5361|    |-		else
|5362|    |-			this.RemoveGuard();
|    |5361|+		this.RemoveGuard();
|5363|5362| 	}
|5364|5363| 
|5365|5364| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5717|5717| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5718|5718| 	{
|5719|5719| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5720|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5720|+		if (cmpTrader.HasBothMarkets() &&
|5721|5721| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5722|5722| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5723|5723| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5998|5998| 				{
|5999|5999| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|6000|6000| 					var targetClasses = this.order.data.targetClasses;
|6001|    |-					if (targetClasses.attack && cmpIdentity
|6002|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |6001|+					if (targetClasses.attack && cmpIdentity &&
|    |6002|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6003|6003| 						continue;
|6004|6004| 					if (targetClasses.avoid && cmpIdentity
|6005|6005| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6001|6001| 					if (targetClasses.attack && cmpIdentity
|6002|6002| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6003|6003| 						continue;
|6004|    |-					if (targetClasses.avoid && cmpIdentity
|6005|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |6004|+					if (targetClasses.avoid && cmpIdentity &&
|    |6005|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|6006|6006| 						continue;
|6007|6007| 					// Only used by the AIs to prevent some choices of targets
|6008|6008| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6024|6024| 		{
|6025|6025| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|6026|6026| 			var targetClasses = this.order.data.targetClasses;
|6027|    |-			if (cmpIdentity && targetClasses.attack
|6028|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |6027|+			if (cmpIdentity && targetClasses.attack &&
|    |6028|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6029|6029| 				continue;
|6030|6030| 			if (cmpIdentity && targetClasses.avoid
|6031|6031| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6027|6027| 			if (cmpIdentity && targetClasses.attack
|6028|6028| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6029|6029| 				continue;
|6030|    |-			if (cmpIdentity && targetClasses.avoid
|6031|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |6030|+			if (cmpIdentity && targetClasses.avoid &&
|    |6031|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|6032|6032| 				continue;
|6033|6033| 			// Only used by the AIs to prevent some choices of targets
|6034|6034| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6170|6170| 
|6171|6171| UnitAI.prototype.SetHeldPosition = function(x, z)
|6172|6172| {
|6173|    |-	this.heldPosition = {"x": x, "z": z};
|    |6173|+	this.heldPosition = { "x": x, "z": z};
|6174|6174| };
|6175|6175| 
|6176|6176| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6170|6170| 
|6171|6171| UnitAI.prototype.SetHeldPosition = function(x, z)
|6172|6172| {
|6173|    |-	this.heldPosition = {"x": x, "z": z};
|    |6173|+	this.heldPosition = {"x": x, "z": z };
|6174|6174| };
|6175|6175| 
|6176|6176| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6197|6197| 	return false;
|6198|6198| };
|6199|6199| 
|6200|    |-//// Helper functions ////
|    |6200|+// // Helper functions ////
|6201|6201| 
|6202|6202| /**
|6203|6203|  * General getter for ranges.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6216|6216| 		return undefined;
|6217|6217| 
|6218|6218| 	return component.GetRange(type);
|6219|    |-}
|    |6219|+};
|6220|6220| 
|6221|6221| /**
|6222|6222|  * @param {number | Vector3D} target - Either the target entity ID, or a Vector3D of a position to attack.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6225|6225| UnitAI.prototype.TargetIsEntity = function(target)
|6226|6226| {
|6227|6227| 	return typeof target == "number";
|6228|    |-}
|    |6228|+};
|6229|6229| 
|6230|6230| UnitAI.prototype.CanAttack = function(target)
|6231|6231| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6423|6423| 	return cmpPack && cmpPack.IsPacking();
|6424|6424| };
|6425|6425| 
|6426|    |-//// Formation specific functions ////
|    |6426|+// // Formation specific functions ////
|6427|6427| 
|6428|6428| UnitAI.prototype.IsAttackingAsFormation = function()
|6429|6429| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6428|6428| UnitAI.prototype.IsAttackingAsFormation = function()
|6429|6429| {
|6430|6430| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6431|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6432|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6431|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6432|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6433|6433| };
|6434|6434| 
|6435|6435| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6432|6432| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6433|6433| };
|6434|6434| 
|6435|    |-//// Animal specific functions ////
|    |6435|+// // Animal specific functions ////
|6436|6436| 
|6437|6437| UnitAI.prototype.MoveRandomly = function(distance)
|6438|6438| {

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|1874| »   »   »   "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
|4041| »   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
|5026| »   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
|5041| »   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
|5087| »   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
|5110| »   »   ····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
|2144| »   »   »   »   »   »   &&·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
|3179| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|6028| »   »   »   »   &&·!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
|6031| »   »   »   »   &&·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
|6219| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

binaries/data/mods/public/simulation/components/Attack.js
| 445| »   return·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Function expected no return value.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1826/display/redirect

Stan added inline comments.Feb 29 2020, 12:51 PM
binaries/data/mods/public/simulation/components/Attack.js
149

ground → a specific area ?

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

Those conditions sound fishy. Maybe they could be merged somehow.

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

Check for cmp?

1223–1224

Check?

1856

Missing return false?

4484

I assume you can use square distances for comparisons here?

5089

To bad we don't have an object for invalid position.

Silier added inline comments.Mar 9 2020, 1:36 PM
binaries/data/mods/public/simulation/components/UnitAI.js
4518

No because that means it would be in two different states FORMATIONCONTROLLER and FORMATIONMEMBER.
Also you are not allowed to select and control formation controllers directly. You select their members and code sends your commands to formation controllers instead.

Freagarach updated this revision to Diff 11497.Mar 17 2020, 8:23 PM
Freagarach marked 6 inline comments as done.
  • Rebased.
  • Some inlines.
Owners added a subscriber: Restricted Owners Package.Mar 17 2020, 8:23 PM

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

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

binaries/data/mods/public/simulation/components/Attack.js
| 447| »   return·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Function expected no return value.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 828| 828| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 829| 829| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 830| 830| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 831|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 831|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 832| 832| 	}
| 833| 833| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 834| 834| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1661|1661| 			{
|1662|1662| 				minDist2 = dist2;
|1663|1663| 				minDistEntitySnapData = {
|1664|    |-						"x": pos.x,
|    |1664|+					"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1662|1662| 				minDist2 = dist2;
|1663|1663| 				minDistEntitySnapData = {
|1664|1664| 						"x": pos.x,
|1665|    |-						"z": pos.z,
|    |1665|+					"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|1668|1668| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1663|1663| 				minDistEntitySnapData = {
|1664|1664| 						"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|    |-						"angle": cmpPosition.GetRotation().y,
|    |1666|+					"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|1668|1668| 				};
|1669|1669| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1664|1664| 						"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|    |-						"ent": ent
|    |1667|+					"ent": ent
|1668|1668| 				};
|1669|1669| 			}
|1670|1670| 		}
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'execute'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
| 564| 564| 
| 565| 565| 	"cancel-setup-trade-route":
| 566| 566| 	{
| 567|    |-		"execute":function(target, action, selection, queued)
|    | 567|+		"execute": function(target, action, selection, queued)
| 568| 568| 		{
| 569| 569| 			Engine.PostNetworkCommand({
| 570| 570| 				"type": "cancel-setup-trade-route",
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
| 609| 609| 				"cursor": "action-cancel-setup-trade-route",
| 610| 610| 				"tooltip": actionInfo.tooltip,
| 611| 611| 				"target": target
| 612|    |-			}
|    | 612|+			};
| 613| 613| 		},
| 614| 614| 		"specificness": 2,
| 615| 615| 	},

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

binaries/data/mods/public/gui/session/unit_actions.js
| 612| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 337| 337| 	}
| 338| 338| 
| 339| 339| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 340|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 340|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 341| 341| 	{
| 342| 342| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 343| 343| 		return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 487| 487| 	mouseIsOverObject = (hoveredObject != null);
| 488| 488| 
| 489| 489| 	// Close the menu when interacting with the game world
| 490|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 491|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 490|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 491|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 492| 492| 		g_Menu.close();
| 493| 493| 
| 494| 494| 	// State-machine processing:
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 648| 648| 		// user to continue building walls.
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651|    |-			case "mousemotion":
|    | 651|+		case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651| 651| 			case "mousemotion":
| 652|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 652|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 651| 651| 			case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654|    |-				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 654|+			// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655|    |-				// the ending point and the starting point to snap to.
|    | 655|+			// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656|    |-				//
|    | 656|+			//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 657|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 658|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 659|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 660|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 661|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662|    |-				// points.
|    | 662|+			// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 664|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 665|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667|    |-				if (result && result.cost)
|    | 667|+			if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668|    |-				{
|    | 668|+			{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 669|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670|    |-					placementSupport.tooltipMessage = [
|    | 670|+				placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671|    |-						getEntityCostTooltip(result),
|    | 671|+					getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672|    |-						getNeededResourcesTooltip(neededResources)
|    | 672|+					getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673|    |-					].filter(tip => tip).join("\n");
|    | 673|+				].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676| 676| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674|    |-				}
|    | 674|+			}
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676|    |-				break;
|    | 676|+			break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
| 678|    |-			case "mousebuttondown":
|    | 678|+		case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 676| 676| 				break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 679|+			if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680|    |-				{
|    | 680|+			{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 681|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682|    |-					if (tryPlaceWall(queued))
|    | 682|+				if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683|    |-					{
|    | 683|+				{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684|    |-						if (queued)
|    | 684|+					if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685|    |-						{
|    | 685|+					{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686|    |-							// continue building, just set a new starting position where we left off
|    | 686|+						// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 687|+						placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688|    |-							placementSupport.wallEndPosition = undefined;
|    | 688|+						placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 690|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691|    |-						}
|    | 691|+					}
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692|    |-						else
|    | 692|+					else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693|    |-						{
|    | 693|+					{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
| 694|    |-							placementSupport.Reset();
|    | 694|+						placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695|    |-							inputState = INPUT_NORMAL;
|    | 695|+						inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696|    |-						}
|    | 696|+					}
| 697| 697| 					}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697|    |-					}
|    | 697|+				}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698|    |-					else
|    | 698|+				else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
| 699|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 699|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701|    |-					updateBuildingPlacementPreview();
|    | 701|+				updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 704|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705|    |-				{
|    | 705|+			{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706|    |-					// reset to normal input mode
|    | 706|+				// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707|    |-					placementSupport.Reset();
|    | 707|+				placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708|    |-					updateBuildingPlacementPreview();
|    | 708|+				updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710|    |-					inputState = INPUT_NORMAL;
|    | 710|+				inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713| 713| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711|    |-					return true;
|    | 711|+				return true;
| 712| 712| 				}
| 713| 713| 				break;
| 714| 714| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712|    |-				}
|    | 712|+			}
| 713| 713| 				break;
| 714| 714| 		}
| 715| 715| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713|    |-				break;
|    | 713|+			break;
| 714| 714| 		}
| 715| 715| 		break;
| 716| 716| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 852| 852| 			break;
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 855|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856|    |-				{
|    | 856|+			{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857|    |-					let now = Date.now();
|    | 857|+				let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 858|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859|    |-					{
|    | 859|+				{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 860|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861|    |-						{
|    | 861|+					{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862|    |-							var sptr = ev.hotkey.split(".");
|    | 862|+						var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863|    |-							performGroup("snap", sptr[3]);
|    | 863|+						performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864|    |-						}
|    | 864|+					}
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865|    |-					}
|    | 865|+				}
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866|    |-					else
|    | 866|+				else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
| 867|    |-					{
|    | 867|+				{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
| 868|    |-						var sptr = ev.hotkey.split(".");
|    | 868|+					var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869|    |-						performGroup(sptr[2], sptr[3]);
|    | 869|+					performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871|    |-						doublePressTimer = now;
|    | 871|+					doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872|    |-						prevHotkey = ev.hotkey;
|    | 872|+					prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875| 875| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873|    |-					}
|    | 873|+				}
| 874| 874| 				}
| 875| 875| 				break;
| 876| 876| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874|    |-				}
|    | 874|+			}
| 875| 875| 				break;
| 876| 876| 		}
| 877| 877| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875|    |-				break;
|    | 875|+			break;
| 876| 876| 		}
| 877| 877| 		break;
| 878| 878| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1604|1604| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1605|1605| 
|1606|1606| 	// Reset the last idle unit, etc., if the selection type has changed.
|1607|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1607|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1608|1608| 		resetIdleUnit();
|1609|1609| 	lastIdleClasses = classes;
|1610|1610| 

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 734| ·»   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 735| ·»   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 740| ·»   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1060| ·»   »   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1061| ·»   »   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1062| ·»   »   »   »   »   "z":·placementSupport.position.z,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1065| ·»   »   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 491| »   »   &&·(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
| 521| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 524| »   »   »   »   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
| 681| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 934| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 542| 542| 			if (cmpGarrisonHolder)
| 543| 543| 			{
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546|    |-				    && player != +cmd.owner)
|    | 545|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 546|+				    player != +cmd.owner)
| 547| 547| 						continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545| 545| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546| 546| 				    && player != +cmd.owner)
| 547|    |-						continue;
|    | 547|+					continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 550| 550| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1265|1265| 		}
|1266|1266| 
|1267|1267| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1268|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1268|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1269|1269| 	}
|1270|1270| 
|1271|1271| 	var i = 0;
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1329|1329| 
|1330|1330| 				if (i > 0)
|1331|1331| 				{
|1332|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1332|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1333|1333| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1334|1334| 					// TODO: ensure that cmpPreviousObstruction exists
|1335|1335| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1492|1492| 		// Check that all its members are selected
|1493|1493| 		var fid = formationIds[0];
|1494|1494| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1495|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1496|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1495|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1496|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1497|1497| 		{
|1498|1498| 			cmpFormation.DeleteTwinFormations();
|1499|1499| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1600|1600| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1601|1601| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1602|1602| 				if (matrix[i][j] < distSq)
|1603|    |-					closeClusters = [i,j];
|    |1603|+					closeClusters = [i, j];
|1604|1604| 
|1605|1605| 		// if no more close clusters found, just return all found clusters so far
|1606|1606| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1622|1622| 		}
|1623|1623| 		// remove the rows and columns in the matrix for the merged clusters,
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|    |-		clusters.splice(closeClusters[0],1);
|    |1625|+		clusters.splice(closeClusters[0], 1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1623|1623| 		// remove the rows and columns in the matrix for the merged clusters,
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|    |-		clusters.splice(closeClusters[1],1);
|    |1626|+		clusters.splice(closeClusters[1], 1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|    |-		matrix.splice(closeClusters[0],1);
|    |1627|+		matrix.splice(closeClusters[0], 1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|    |-		matrix.splice(closeClusters[1],1);
|    |1628|+		matrix.splice(closeClusters[1], 1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|1632|    |-				matrix[i].splice(closeClusters[0],1);
|    |1632|+				matrix[i].splice(closeClusters[0], 1);
|1633|1633| 			if (matrix[i].length > closeClusters[1])
|1634|1634| 				matrix[i].splice(closeClusters[1],1);
|1635|1635| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|1632|1632| 				matrix[i].splice(closeClusters[0],1);
|1633|1633| 			if (matrix[i].length > closeClusters[1])
|1634|    |-				matrix[i].splice(closeClusters[1],1);
|    |1634|+				matrix[i].splice(closeClusters[1], 1);
|1635|1635| 		}
|1636|1636| 		// add a new row of distances to the matrix and the new cluster
|1637|1637| 		clusters.push(newCluster);

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1519| »   »   »   »   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
|1598| »   »   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
|1615| »   »   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
|1629| »   »   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
| 546| »   »   »   »   ····&&·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
| 741| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1555| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 819| 819| 					this.FinishOrder();
| 820| 820| 					return;
| 821| 821| 				}
| 822|    |-				else
| 823|    |-				{
|    | 822|+				
| 824| 823| 					this.SetNextState("GARRISON.APPROACHING");
| 825| 824| 					return;
| 826|    |-				}
|    | 825|+				
| 827| 826| 			}
| 828| 827| 
| 829| 828| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1091|1091| 			},
|1092|1092| 		},
|1093|1093| 
|1094|    |-		"GARRISON":{
|    |1094|+		"GARRISON": {
|1095|1095| 			"APPROACHING": {
|1096|1096| 				"enter": function() {
|1097|1097| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2145|2145| 
|2146|2146| 				"Attacked": function(msg) {
|2147|2147| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2148|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2149|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2148|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2149|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2150|2150| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2151|2151| 				},
|2152|2152| 			},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2883|2883| 					{
|2884|2884| 						// The building was already finished/fully repaired before we arrived;
|2885|2885| 						// let the ConstructionFinished handler handle this.
|2886|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2886|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2887|2887| 						return true;
|2888|2888| 					}
|2889|2889| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2883|2883| 					{
|2884|2884| 						// The building was already finished/fully repaired before we arrived;
|2885|2885| 						// let the ConstructionFinished handler handle this.
|2886|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2886|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2887|2887| 						return true;
|2888|2888| 					}
|2889|2889| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3181|3181| 				this.StopTimer();
|3182|3182| 				this.ResetAnimation();
|3183|3183| 				if (this.formationAnimationVariant)
|3184|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3184|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3185|3185| 				else
|3186|3186| 					this.SetDefaultAnimationVariant();
|3187|3187| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3407|3407| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3408|3408| 
|3409|3409| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3410|    |-							// only used for domestic animals
|    |3410|+		// only used for domestic animals
|3411|3411| 
|3412|3412| 		// Reuse the same garrison behaviour for animals.
|3413|3413| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3469|3469| 
|3470|3470| UnitAI.prototype.IsAnimal = function()
|3471|3471| {
|3472|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3472|+	return (!!this.template.NaturalBehaviour);
|3473|3473| };
|3474|3474| 
|3475|3475| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3585|3585| 		{
|3586|3586| 			let index = this.GetCurrentState().indexOf(".");
|3587|3587| 			if (index != -1)
|3588|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3588|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3589|3589| 			this.Stop(false);
|3590|3590| 		}
|3591|3591| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3641|3641| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3642|3642| 			continue;
|3643|3643| 		if (i == 0)
|3644|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3644|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3645|3645| 		else
|3646|3646| 			this.orderQueue.splice(i, 1);
|3647|3647| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3641|3641| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3642|3642| 			continue;
|3643|3643| 		if (i == 0)
|3644|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3644|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3645|3645| 		else
|3646|3646| 			this.orderQueue.splice(i, 1);
|3647|3647| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3728|3728| };
|3729|3729| 
|3730|3730| 
|3731|    |-//// FSM linkage functions ////
|    |3731|+// // FSM linkage functions ////
|3732|3732| 
|3733|3733| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3734|3734| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3899|3899| 				continue;
|3900|3900| 			if (this.orderQueue[i].type == type)
|3901|3901| 				continue;
|3902|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3902|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3903|3903| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3904|3904| 			return;
|3905|3905| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3899|3899| 				continue;
|3900|3900| 			if (this.orderQueue[i].type == type)
|3901|3901| 				continue;
|3902|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3902|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3903|3903| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3904|3904| 			return;
|3905|3905| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4141|4141| 	if (data.timerRepeat === undefined)
|4142|4142| 		this.timer = undefined;
|4143|4143| 
|4144|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4144|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4145|4145| };
|4146|4146| 
|4147|4147| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4141|4141| 	if (data.timerRepeat === undefined)
|4142|4142| 		this.timer = undefined;
|4143|4143| 
|4144|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4144|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4145|4145| };
|4146|4146| 
|4147|4147| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4186|4186| 	// TODO: This is a bit inefficient since every unit listens to every
|4187|4187| 	// construction message - ideally we could scope it to only the one we're building
|4188|4188| 
|4189|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4189|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4190|4190| };
|4191|4191| 
|4192|4192| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4186|4186| 	// TODO: This is a bit inefficient since every unit listens to every
|4187|4187| 	// construction message - ideally we could scope it to only the one we're building
|4188|4188| 
|4189|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4189|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4190|4190| };
|4191|4191| 
|4192|4192| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4217|4217| 	if (msg.fromStatusEffect)
|4218|4218| 		return;
|4219|4219| 
|4220|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4220|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4221|4221| };
|4222|4222| 
|4223|4223| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4217|4217| 	if (msg.fromStatusEffect)
|4218|4218| 		return;
|4219|4219| 
|4220|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4220|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4221|4221| };
|4222|4222| 
|4223|4223| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4222|4222| 
|4223|4223| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4224|4224| {
|4225|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4225|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4226|4226| };
|4227|4227| 
|4228|4228| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4222|4222| 
|4223|4223| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4224|4224| {
|4225|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4225|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4226|4226| };
|4227|4227| 
|4228|4228| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4227|4227| 
|4228|4228| UnitAI.prototype.OnHealthChanged = function(msg)
|4229|4229| {
|4230|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4230|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4231|4231| };
|4232|4232| 
|4233|4233| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4227|4227| 
|4228|4228| UnitAI.prototype.OnHealthChanged = function(msg)
|4229|4229| {
|4230|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4230|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4231|4231| };
|4232|4232| 
|4233|4233| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4233|4233| UnitAI.prototype.OnRangeUpdate = function(msg)
|4234|4234| {
|4235|4235| 	if (msg.tag == this.losRangeQuery)
|4236|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4236|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4237|4237| 	else if (msg.tag == this.losHealRangeQuery)
|4238|4238| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4239|4239| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4233|4233| UnitAI.prototype.OnRangeUpdate = function(msg)
|4234|4234| {
|4235|4235| 	if (msg.tag == this.losRangeQuery)
|4236|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4236|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4237|4237| 	else if (msg.tag == this.losHealRangeQuery)
|4238|4238| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4239|4239| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4235|4235| 	if (msg.tag == this.losRangeQuery)
|4236|4236| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4237|4237| 	else if (msg.tag == this.losHealRangeQuery)
|4238|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4238|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4239|4239| };
|4240|4240| 
|4241|4241| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4235|4235| 	if (msg.tag == this.losRangeQuery)
|4236|4236| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4237|4237| 	else if (msg.tag == this.losHealRangeQuery)
|4238|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4238|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4239|4239| };
|4240|4240| 
|4241|4241| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4240|4240| 
|4241|4241| UnitAI.prototype.OnPackFinished = function(msg)
|4242|4242| {
|4243|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4243|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4244|4244| };
|4245|4245| 
|4246|4246| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4240|4240| 
|4241|4241| UnitAI.prototype.OnPackFinished = function(msg)
|4242|4242| {
|4243|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4243|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4244|4244| };
|4245|4245| 
|4246|4246| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4243|4243| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4244|4244| };
|4245|4245| 
|4246|    |-//// Helper functions to be called by the FSM ////
|    |4246|+// // Helper functions to be called by the FSM ////
|4247|4247| 
|4248|4248| UnitAI.prototype.GetWalkSpeed = function()
|4249|4249| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4689|4689| 	{
|4690|4690| 		if (attackEntity)
|4691|4691| 			return cmpUnitMotion.MoveToTargetRange(target, range.min, range.max);
|4692|    |-		else
|4693|    |-			return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|    |4692|+		return cmpUnitMotion.MoveToPointRange(target.x, target.z, range.min, range.max, true);
|4694|4693| 	}
|4695|4694| 
|4696|4695| 	return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4833|4833| 	if (this.IsFormationMember())
|4834|4834| 	{
|4835|4835| 		let cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4836|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4837|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4836|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4837|+			cmpFormationUnitAI.order.data.target == target)
|4838|4838| 			return true;
|4839|4839| 	}
|4840|4840| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5036|5036| UnitAI.prototype.AttackEntityInZone = function(ents)
|5037|5037| {
|5038|5038| 	var target = ents.find(target =>
|5039|    |-		this.CanAttack(target)
|5040|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |5039|+		this.CanAttack(target) &&
|    |5040|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5041|5041| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5042|5042| 	);
|5043|5043| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5037|5037| {
|5038|5038| 	var target = ents.find(target =>
|5039|5039| 		this.CanAttack(target)
|5040|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5041|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |5040|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |5041|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5042|5042| 	);
|5043|5043| 	if (!target)
|5044|5044| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5101|5101| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5102|5102| 	if (this.isGuardOf)
|5103|5103| 	{
|5104|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5104|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5105|5105| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5106|5106| 		if (cmpUnitAI && cmpAttack &&
|5107|5107| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5105|5105| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5106|5106| 		if (cmpUnitAI && cmpAttack &&
|5107|5107| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5108|    |-				return false;
|    |5108|+			return false;
|5109|5109| 	}
|5110|5110| 
|5111|5111| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5143|5143| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5144|5144| 	if (this.isGuardOf)
|5145|5145| 	{
|5146|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5146|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5147|5147| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5148|5148| 		if (cmpUnitAI && cmpAttack &&
|5149|5149| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5156|5156| 	return false;
|5157|5157| };
|5158|5158| 
|5159|    |-//// External interface functions ////
|    |5159|+// // External interface functions ////
|5160|5160| 
|5161|5161| UnitAI.prototype.SetFormationController = function(ent)
|5162|5162| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5355|5355| 	{
|5356|5356| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5357|5357| 			return;
|5358|    |-		else
|5359|    |-			this.RemoveGuard();
|    |5358|+		this.RemoveGuard();
|5360|5359| 	}
|5361|5360| 
|5362|5361| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5703|5703| 
|5704|5704| 	if (this.IsFormationController())
|5705|5705| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5706|    |-}
|    |5706|+};
|5707|5707| /**
|5708|5708|  * Adds trade order to the queue. Either walk to the first market, or
|5709|5709|  * start a new route. Not forced, so it can be interrupted by attacks.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5724|5724| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5725|5725| 	{
|5726|5726| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5727|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5727|+		if (cmpTrader.HasBothMarkets() &&
|5728|5728| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5729|5729| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5730|5730| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6005|6005| 				{
|6006|6006| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|6007|6007| 					var targetClasses = this.order.data.targetClasses;
|6008|    |-					if (targetClasses.attack && cmpIdentity
|6009|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |6008|+					if (targetClasses.attack && cmpIdentity &&
|    |6009|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6010|6010| 						continue;
|6011|6011| 					if (targetClasses.avoid && cmpIdentity
|6012|6012| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6008|6008| 					if (targetClasses.attack && cmpIdentity
|6009|6009| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6010|6010| 						continue;
|6011|    |-					if (targetClasses.avoid && cmpIdentity
|6012|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |6011|+					if (targetClasses.avoid && cmpIdentity &&
|    |6012|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|6013|6013| 						continue;
|6014|6014| 					// Only used by the AIs to prevent some choices of targets
|6015|6015| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6031|6031| 		{
|6032|6032| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|6033|6033| 			var targetClasses = this.order.data.targetClasses;
|6034|    |-			if (cmpIdentity && targetClasses.attack
|6035|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |6034|+			if (cmpIdentity && targetClasses.attack &&
|    |6035|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6036|6036| 				continue;
|6037|6037| 			if (cmpIdentity && targetClasses.avoid
|6038|6038| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6034|6034| 			if (cmpIdentity && targetClasses.attack
|6035|6035| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6036|6036| 				continue;
|6037|    |-			if (cmpIdentity && targetClasses.avoid
|6038|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |6037|+			if (cmpIdentity && targetClasses.avoid &&
|    |6038|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|6039|6039| 				continue;
|6040|6040| 			// Only used by the AIs to prevent some choices of targets
|6041|6041| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6177|6177| 
|6178|6178| UnitAI.prototype.SetHeldPosition = function(x, z)
|6179|6179| {
|6180|    |-	this.heldPosition = {"x": x, "z": z};
|    |6180|+	this.heldPosition = { "x": x, "z": z};
|6181|6181| };
|6182|6182| 
|6183|6183| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6177|6177| 
|6178|6178| UnitAI.prototype.SetHeldPosition = function(x, z)
|6179|6179| {
|6180|    |-	this.heldPosition = {"x": x, "z": z};
|    |6180|+	this.heldPosition = {"x": x, "z": z };
|6181|6181| };
|6182|6182| 
|6183|6183| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6204|6204| 	return false;
|6205|6205| };
|6206|6206| 
|6207|    |-//// Helper functions ////
|    |6207|+// // Helper functions ////
|6208|6208| 
|6209|6209| /**
|6210|6210|  * General getter for ranges.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6223|6223| 		return undefined;
|6224|6224| 
|6225|6225| 	return component.GetRange(type);
|6226|    |-}
|    |6226|+};
|6227|6227| 
|6228|6228| /**
|6229|6229|  * @param {number | Vector3D} target - Either the target entity ID, or a Vector3D of a position to attack.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6232|6232| UnitAI.prototype.TargetIsEntity = function(target)
|6233|6233| {
|6234|6234| 	return typeof target == "number";
|6235|    |-}
|    |6235|+};
|6236|6236| 
|6237|6237| UnitAI.prototype.CanAttack = function(target)
|6238|6238| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6430|6430| 	return cmpPack && cmpPack.IsPacking();
|6431|6431| };
|6432|6432| 
|6433|    |-//// Formation specific functions ////
|    |6433|+// // Formation specific functions ////
|6434|6434| 
|6435|6435| UnitAI.prototype.IsAttackingAsFormation = function()
|6436|6436| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6435|6435| UnitAI.prototype.IsAttackingAsFormation = function()
|6436|6436| {
|6437|6437| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6438|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6439|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6438|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6439|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6440|6440| };
|6441|6441| 
|6442|6442| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6439|6439| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6440|6440| };
|6441|6441| 
|6442|    |-//// Animal specific functions ////
|    |6442|+// // Animal specific functions ////
|6443|6443| 
|6444|6444| UnitAI.prototype.MoveRandomly = function(distance)
|6445|6445| {

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4046| »   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
|5023| »   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
|5038| »   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
|5084| »   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
|5107| »   »   ····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
|2149| »   »   »   »   »   »   &&·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
|3184| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|6035| »   »   »   »   &&·!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
|6038| »   »   »   »   &&·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
|6226| }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1867/display/redirect

Freagarach updated this revision to Diff 11644.Apr 8 2020, 10:35 AM
Freagarach marked 3 inline comments as done.
  • Rebased.
  • Move cmpBuildingAI-check earlier.

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'execute'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
| 568| 568| 
| 569| 569| 	"cancel-setup-trade-route":
| 570| 570| 	{
| 571|    |-		"execute":function(target, action, selection, queued)
|    | 571|+		"execute": function(target, action, selection, queued)
| 572| 572| 		{
| 573| 573| 			Engine.PostNetworkCommand({
| 574| 574| 				"type": "cancel-setup-trade-route",
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
| 613| 613| 				"cursor": "action-cancel-setup-trade-route",
| 614| 614| 				"tooltip": actionInfo.tooltip,
| 615| 615| 				"target": target
| 616|    |-			}
|    | 616|+			};
| 617| 617| 		},
| 618| 618| 		"specificness": 2,
| 619| 619| 	},

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

binaries/data/mods/public/gui/session/unit_actions.js
| 616| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 337| 337| 	}
| 338| 338| 
| 339| 339| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 340|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 340|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 341| 341| 	{
| 342| 342| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 343| 343| 		return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 487| 487| 	mouseIsOverObject = (hoveredObject != null);
| 488| 488| 
| 489| 489| 	// Close the menu when interacting with the game world
| 490|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 491|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 490|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 491|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 492| 492| 		g_Menu.close();
| 493| 493| 
| 494| 494| 	// State-machine processing:
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 648| 648| 		// user to continue building walls.
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651|    |-			case "mousemotion":
|    | 651|+		case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651| 651| 			case "mousemotion":
| 652|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 652|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 651| 651| 			case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654|    |-				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 654|+			// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655|    |-				// the ending point and the starting point to snap to.
|    | 655|+			// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656|    |-				//
|    | 656|+			//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 657|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 658|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 659|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 660|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 661|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662|    |-				// points.
|    | 662|+			// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 664|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 665|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667|    |-				if (result && result.cost)
|    | 667|+			if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668|    |-				{
|    | 668|+			{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 669|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670|    |-					placementSupport.tooltipMessage = [
|    | 670|+				placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671|    |-						getEntityCostTooltip(result),
|    | 671|+					getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672|    |-						getNeededResourcesTooltip(neededResources)
|    | 672|+					getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673|    |-					].filter(tip => tip).join("\n");
|    | 673|+				].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676| 676| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674|    |-				}
|    | 674|+			}
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676|    |-				break;
|    | 676|+			break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
| 678|    |-			case "mousebuttondown":
|    | 678|+		case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 676| 676| 				break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 679|+			if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680|    |-				{
|    | 680|+			{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 681|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682|    |-					if (tryPlaceWall(queued))
|    | 682|+				if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683|    |-					{
|    | 683|+				{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684|    |-						if (queued)
|    | 684|+					if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685|    |-						{
|    | 685|+					{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686|    |-							// continue building, just set a new starting position where we left off
|    | 686|+						// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 687|+						placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688|    |-							placementSupport.wallEndPosition = undefined;
|    | 688|+						placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 690|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691|    |-						}
|    | 691|+					}
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692|    |-						else
|    | 692|+					else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693|    |-						{
|    | 693|+					{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
| 694|    |-							placementSupport.Reset();
|    | 694|+						placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695|    |-							inputState = INPUT_NORMAL;
|    | 695|+						inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696|    |-						}
|    | 696|+					}
| 697| 697| 					}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697|    |-					}
|    | 697|+				}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698|    |-					else
|    | 698|+				else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
| 699|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 699|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701|    |-					updateBuildingPlacementPreview();
|    | 701|+				updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 704|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705|    |-				{
|    | 705|+			{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706|    |-					// reset to normal input mode
|    | 706|+				// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707|    |-					placementSupport.Reset();
|    | 707|+				placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708|    |-					updateBuildingPlacementPreview();
|    | 708|+				updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710|    |-					inputState = INPUT_NORMAL;
|    | 710|+				inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713| 713| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711|    |-					return true;
|    | 711|+				return true;
| 712| 712| 				}
| 713| 713| 				break;
| 714| 714| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712|    |-				}
|    | 712|+			}
| 713| 713| 				break;
| 714| 714| 		}
| 715| 715| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713|    |-				break;
|    | 713|+			break;
| 714| 714| 		}
| 715| 715| 		break;
| 716| 716| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 852| 852| 			break;
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 855|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856|    |-				{
|    | 856|+			{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857|    |-					let now = Date.now();
|    | 857|+				let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 858|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859|    |-					{
|    | 859|+				{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 860|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861|    |-						{
|    | 861|+					{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862|    |-							var sptr = ev.hotkey.split(".");
|    | 862|+						var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863|    |-							performGroup("snap", sptr[3]);
|    | 863|+						performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864|    |-						}
|    | 864|+					}
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865|    |-					}
|    | 865|+				}
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866|    |-					else
|    | 866|+				else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
| 867|    |-					{
|    | 867|+				{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
| 868|    |-						var sptr = ev.hotkey.split(".");
|    | 868|+					var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869|    |-						performGroup(sptr[2], sptr[3]);
|    | 869|+					performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871|    |-						doublePressTimer = now;
|    | 871|+					doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872|    |-						prevHotkey = ev.hotkey;
|    | 872|+					prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875| 875| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873|    |-					}
|    | 873|+				}
| 874| 874| 				}
| 875| 875| 				break;
| 876| 876| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874|    |-				}
|    | 874|+			}
| 875| 875| 				break;
| 876| 876| 		}
| 877| 877| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875|    |-				break;
|    | 875|+			break;
| 876| 876| 		}
| 877| 877| 		break;
| 878| 878| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1604|1604| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1605|1605| 
|1606|1606| 	// Reset the last idle unit, etc., if the selection type has changed.
|1607|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1607|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1608|1608| 		resetIdleUnit();
|1609|1609| 	lastIdleClasses = classes;
|1610|1610| 

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 734| ·»   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 735| ·»   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 740| ·»   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1060| ·»   »   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1061| ·»   »   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1062| ·»   »   »   »   »   "z":·placementSupport.position.z,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1065| ·»   »   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 491| »   »   &&·(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
| 521| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 524| »   »   »   »   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
| 681| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 934| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 542| 542| 			if (cmpGarrisonHolder)
| 543| 543| 			{
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546|    |-				    && player != +cmd.owner)
|    | 545|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 546|+				    player != +cmd.owner)
| 547| 547| 						continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545| 545| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546| 546| 				    && player != +cmd.owner)
| 547|    |-						continue;
|    | 547|+					continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 550| 550| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1265|1265| 		}
|1266|1266| 
|1267|1267| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1268|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1268|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1269|1269| 	}
|1270|1270| 
|1271|1271| 	var i = 0;
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1329|1329| 
|1330|1330| 				if (i > 0)
|1331|1331| 				{
|1332|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1332|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1333|1333| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1334|1334| 					// TODO: ensure that cmpPreviousObstruction exists
|1335|1335| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1492|1492| 		// Check that all its members are selected
|1493|1493| 		var fid = formationIds[0];
|1494|1494| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1495|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1496|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1495|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1496|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1497|1497| 		{
|1498|1498| 			cmpFormation.DeleteTwinFormations();
|1499|1499| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1600|1600| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1601|1601| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1602|1602| 				if (matrix[i][j] < distSq)
|1603|    |-					closeClusters = [i,j];
|    |1603|+					closeClusters = [i, j];
|1604|1604| 
|1605|1605| 		// if no more close clusters found, just return all found clusters so far
|1606|1606| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1622|1622| 		}
|1623|1623| 		// remove the rows and columns in the matrix for the merged clusters,
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|    |-		clusters.splice(closeClusters[0],1);
|    |1625|+		clusters.splice(closeClusters[0], 1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1623|1623| 		// remove the rows and columns in the matrix for the merged clusters,
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|    |-		clusters.splice(closeClusters[1],1);
|    |1626|+		clusters.splice(closeClusters[1], 1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|    |-		matrix.splice(closeClusters[0],1);
|    |1627|+		matrix.splice(closeClusters[0], 1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|    |-		matrix.splice(closeClusters[1],1);
|    |1628|+		matrix.splice(closeClusters[1], 1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|1632|    |-				matrix[i].splice(closeClusters[0],1);
|    |1632|+				matrix[i].splice(closeClusters[0], 1);
|1633|1633| 			if (matrix[i].length > closeClusters[1])
|1634|1634| 				matrix[i].splice(closeClusters[1],1);
|1635|1635| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|1632|1632| 				matrix[i].splice(closeClusters[0],1);
|1633|1633| 			if (matrix[i].length > closeClusters[1])
|1634|    |-				matrix[i].splice(closeClusters[1],1);
|    |1634|+				matrix[i].splice(closeClusters[1], 1);
|1635|1635| 		}
|1636|1636| 		// add a new row of distances to the matrix and the new cluster
|1637|1637| 		clusters.push(newCluster);

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1519| »   »   »   »   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
|1598| »   »   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
|1615| »   »   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
|1629| »   »   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
| 546| »   »   »   »   ····&&·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
| 741| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1555| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 828| 828| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 829| 829| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 830| 830| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 831|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 831|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 832| 832| 	}
| 833| 833| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 834| 834| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1661|1661| 			{
|1662|1662| 				minDist2 = dist2;
|1663|1663| 				minDistEntitySnapData = {
|1664|    |-						"x": pos.x,
|    |1664|+					"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1662|1662| 				minDist2 = dist2;
|1663|1663| 				minDistEntitySnapData = {
|1664|1664| 						"x": pos.x,
|1665|    |-						"z": pos.z,
|    |1665|+					"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|1668|1668| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1663|1663| 				minDistEntitySnapData = {
|1664|1664| 						"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|    |-						"angle": cmpPosition.GetRotation().y,
|    |1666|+					"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|1668|1668| 				};
|1669|1669| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1664|1664| 						"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|    |-						"ent": ent
|    |1667|+					"ent": ent
|1668|1668| 				};
|1669|1669| 			}
|1670|1670| 		}
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 818| 818| 					this.FinishOrder();
| 819| 819| 					return;
| 820| 820| 				}
| 821|    |-				else
| 822|    |-				{
|    | 821|+				
| 823| 822| 					this.SetNextState("GARRISON.APPROACHING");
| 824| 823| 					return;
| 825|    |-				}
|    | 824|+				
| 826| 825| 			}
| 827| 826| 
| 828| 827| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1090|1090| 			},
|1091|1091| 		},
|1092|1092| 
|1093|    |-		"GARRISON":{
|    |1093|+		"GARRISON": {
|1094|1094| 			"APPROACHING": {
|1095|1095| 				"enter": function() {
|1096|1096| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2140|2140| 
|2141|2141| 				"Attacked": function(msg) {
|2142|2142| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2143|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2144|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2143|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2144|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2145|2145| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2146|2146| 				},
|2147|2147| 			},
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2299|2299| 					"MovementUpdate": function(msg) {
|2300|2300| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2301|2301| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2302|    |-						if (msg.likelyFailure || 
|    |2302|+						if (msg.likelyFailure ||
|2303|2303| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2304|2304| 							!msg.obstructed && this.CheckRange(this.order.data))
|2305|2305| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2941|2941| 					{
|2942|2942| 						// The building was already finished/fully repaired before we arrived;
|2943|2943| 						// let the ConstructionFinished handler handle this.
|2944|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2944|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2945|2945| 						return true;
|2946|2946| 					}
|2947|2947| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2941|2941| 					{
|2942|2942| 						// The building was already finished/fully repaired before we arrived;
|2943|2943| 						// let the ConstructionFinished handler handle this.
|2944|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2944|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2945|2945| 						return true;
|2946|2946| 					}
|2947|2947| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3239|3239| 				this.StopTimer();
|3240|3240| 				this.ResetAnimation();
|3241|3241| 				if (this.formationAnimationVariant)
|3242|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3242|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3243|3243| 				else
|3244|3244| 					this.SetDefaultAnimationVariant();
|3245|3245| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3465|3465| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3466|3466| 
|3467|3467| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3468|    |-							// only used for domestic animals
|    |3468|+		// only used for domestic animals
|3469|3469| 
|3470|3470| 		// Reuse the same garrison behaviour for animals.
|3471|3471| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3527|3527| 
|3528|3528| UnitAI.prototype.IsAnimal = function()
|3529|3529| {
|3530|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3530|+	return (!!this.template.NaturalBehaviour);
|3531|3531| };
|3532|3532| 
|3533|3533| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3643|3643| 		{
|3644|3644| 			let index = this.GetCurrentState().indexOf(".");
|3645|3645| 			if (index != -1)
|3646|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3646|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3647|3647| 			this.Stop(false);
|3648|3648| 		}
|3649|3649| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3699|3699| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3700|3700| 			continue;
|3701|3701| 		if (i == 0)
|3702|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3702|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3703|3703| 		else
|3704|3704| 			this.orderQueue.splice(i, 1);
|3705|3705| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3699|3699| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3700|3700| 			continue;
|3701|3701| 		if (i == 0)
|3702|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3702|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3703|3703| 		else
|3704|3704| 			this.orderQueue.splice(i, 1);
|3705|3705| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3786|3786| };
|3787|3787| 
|3788|3788| 
|3789|    |-//// FSM linkage functions ////
|    |3789|+// // FSM linkage functions ////
|3790|3790| 
|3791|3791| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3792|3792| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3957|3957| 				continue;
|3958|3958| 			if (this.orderQueue[i].type == type)
|3959|3959| 				continue;
|3960|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3960|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3961|3961| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3962|3962| 			return;
|3963|3963| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3957|3957| 				continue;
|3958|3958| 			if (this.orderQueue[i].type == type)
|3959|3959| 				continue;
|3960|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3960|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3961|3961| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3962|3962| 			return;
|3963|3963| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4199|4199| 	if (data.timerRepeat === undefined)
|4200|4200| 		this.timer = undefined;
|4201|4201| 
|4202|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4202|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4203|4203| };
|4204|4204| 
|4205|4205| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4199|4199| 	if (data.timerRepeat === undefined)
|4200|4200| 		this.timer = undefined;
|4201|4201| 
|4202|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4202|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4203|4203| };
|4204|4204| 
|4205|4205| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4244|4244| 	// TODO: This is a bit inefficient since every unit listens to every
|4245|4245| 	// construction message - ideally we could scope it to only the one we're building
|4246|4246| 
|4247|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4247|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4248|4248| };
|4249|4249| 
|4250|4250| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4244|4244| 	// TODO: This is a bit inefficient since every unit listens to every
|4245|4245| 	// construction message - ideally we could scope it to only the one we're building
|4246|4246| 
|4247|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4247|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4248|4248| };
|4249|4249| 
|4250|4250| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4275|4275| 	if (msg.fromStatusEffect)
|4276|4276| 		return;
|4277|4277| 
|4278|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4278|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4279|4279| };
|4280|4280| 
|4281|4281| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4275|4275| 	if (msg.fromStatusEffect)
|4276|4276| 		return;
|4277|4277| 
|4278|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4278|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4279|4279| };
|4280|4280| 
|4281|4281| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4280|4280| 
|4281|4281| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4282|4282| {
|4283|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4283|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4284|4284| };
|4285|4285| 
|4286|4286| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4280|4280| 
|4281|4281| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4282|4282| {
|4283|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4283|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4284|4284| };
|4285|4285| 
|4286|4286| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4285|4285| 
|4286|4286| UnitAI.prototype.OnHealthChanged = function(msg)
|4287|4287| {
|4288|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4288|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4289|4289| };
|4290|4290| 
|4291|4291| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4285|4285| 
|4286|4286| UnitAI.prototype.OnHealthChanged = function(msg)
|4287|4287| {
|4288|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4288|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4289|4289| };
|4290|4290| 
|4291|4291| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4291|4291| UnitAI.prototype.OnRangeUpdate = function(msg)
|4292|4292| {
|4293|4293| 	if (msg.tag == this.losRangeQuery)
|4294|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4294|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4295|4295| 	else if (msg.tag == this.losHealRangeQuery)
|4296|4296| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4297|4297| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4291|4291| UnitAI.prototype.OnRangeUpdate = function(msg)
|4292|4292| {
|4293|4293| 	if (msg.tag == this.losRangeQuery)
|4294|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4294|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4295|4295| 	else if (msg.tag == this.losHealRangeQuery)
|4296|4296| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4297|4297| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4293|4293| 	if (msg.tag == this.losRangeQuery)
|4294|4294| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4295|4295| 	else if (msg.tag == this.losHealRangeQuery)
|4296|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4296|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4297|4297| };
|4298|4298| 
|4299|4299| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4293|4293| 	if (msg.tag == this.losRangeQuery)
|4294|4294| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4295|4295| 	else if (msg.tag == this.losHealRangeQuery)
|4296|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4296|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4297|4297| };
|4298|4298| 
|4299|4299| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4298|4298| 
|4299|4299| UnitAI.prototype.OnPackFinished = function(msg)
|4300|4300| {
|4301|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4301|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4302|4302| };
|4303|4303| 
|4304|4304| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4298|4298| 
|4299|4299| UnitAI.prototype.OnPackFinished = function(msg)
|4300|4300| {
|4301|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4301|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4302|4302| };
|4303|4303| 
|4304|4304| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4301|4301| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4302|4302| };
|4303|4303| 
|4304|    |-//// Helper functions to be called by the FSM ////
|    |4304|+// // Helper functions to be called by the FSM ////
|4305|4305| 
|4306|4306| UnitAI.prototype.GetWalkSpeed = function()
|4307|4307| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5083|5083| UnitAI.prototype.AttackEntityInZone = function(ents)
|5084|5084| {
|5085|5085| 	var target = ents.find(target =>
|5086|    |-		this.CanAttack(target)
|5087|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |5086|+		this.CanAttack(target) &&
|    |5087|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5088|5088| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5089|5089| 	);
|5090|5090| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5084|5084| {
|5085|5085| 	var target = ents.find(target =>
|5086|5086| 		this.CanAttack(target)
|5087|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5088|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |5087|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |5088|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5089|5089| 	);
|5090|5090| 	if (!target)
|5091|5091| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5148|5148| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5149|5149| 	if (this.isGuardOf)
|5150|5150| 	{
|5151|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5151|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5152|5152| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5153|5153| 		if (cmpUnitAI && cmpAttack &&
|5154|5154| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5152|5152| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5153|5153| 		if (cmpUnitAI && cmpAttack &&
|5154|5154| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5155|    |-				return false;
|    |5155|+			return false;
|5156|5156| 	}
|5157|5157| 
|5158|5158| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5190|5190| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5191|5191| 	if (this.isGuardOf)
|5192|5192| 	{
|5193|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5193|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5194|5194| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5195|5195| 		if (cmpUnitAI && cmpAttack &&
|5196|5196| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5203|5203| 	return false;
|5204|5204| };
|5205|5205| 
|5206|    |-//// External interface functions ////
|    |5206|+// // External interface functions ////
|5207|5207| 
|5208|5208| UnitAI.prototype.SetFormationController = function(ent)
|5209|5209| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5402|5402| 	{
|5403|5403| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5404|5404| 			return;
|5405|    |-		else
|5406|    |-			this.RemoveGuard();
|    |5405|+		this.RemoveGuard();
|5407|5406| 	}
|5408|5407| 
|5409|5408| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5750|5750| 
|5751|5751| 	if (this.IsFormationController())
|5752|5752| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5753|    |-}
|    |5753|+};
|5754|5754| /**
|5755|5755|  * Adds trade order to the queue. Either walk to the first market, or
|5756|5756|  * start a new route. Not forced, so it can be interrupted by attacks.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5771|5771| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5772|5772| 	{
|5773|5773| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5774|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5774|+		if (cmpTrader.HasBothMarkets() &&
|5775|5775| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5776|5776| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5777|5777| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6052|6052| 				{
|6053|6053| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|6054|6054| 					var targetClasses = this.order.data.targetClasses;
|6055|    |-					if (targetClasses.attack && cmpIdentity
|6056|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |6055|+					if (targetClasses.attack && cmpIdentity &&
|    |6056|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6057|6057| 						continue;
|6058|6058| 					if (targetClasses.avoid && cmpIdentity
|6059|6059| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6055|6055| 					if (targetClasses.attack && cmpIdentity
|6056|6056| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6057|6057| 						continue;
|6058|    |-					if (targetClasses.avoid && cmpIdentity
|6059|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |6058|+					if (targetClasses.avoid && cmpIdentity &&
|    |6059|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|6060|6060| 						continue;
|6061|6061| 					// Only used by the AIs to prevent some choices of targets
|6062|6062| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6078|6078| 		{
|6079|6079| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|6080|6080| 			var targetClasses = this.order.data.targetClasses;
|6081|    |-			if (cmpIdentity && targetClasses.attack
|6082|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |6081|+			if (cmpIdentity && targetClasses.attack &&
|    |6082|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6083|6083| 				continue;
|6084|6084| 			if (cmpIdentity && targetClasses.avoid
|6085|6085| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6081|6081| 			if (cmpIdentity && targetClasses.attack
|6082|6082| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6083|6083| 				continue;
|6084|    |-			if (cmpIdentity && targetClasses.avoid
|6085|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |6084|+			if (cmpIdentity && targetClasses.avoid &&
|    |6085|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|6086|6086| 				continue;
|6087|6087| 			// Only used by the AIs to prevent some choices of targets
|6088|6088| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6224|6224| 
|6225|6225| UnitAI.prototype.SetHeldPosition = function(x, z)
|6226|6226| {
|6227|    |-	this.heldPosition = {"x": x, "z": z};
|    |6227|+	this.heldPosition = { "x": x, "z": z};
|6228|6228| };
|6229|6229| 
|6230|6230| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6224|6224| 
|6225|6225| UnitAI.prototype.SetHeldPosition = function(x, z)
|6226|6226| {
|6227|    |-	this.heldPosition = {"x": x, "z": z};
|    |6227|+	this.heldPosition = {"x": x, "z": z };
|6228|6228| };
|6229|6229| 
|6230|6230| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6251|6251| 	return false;
|6252|6252| };
|6253|6253| 
|6254|    |-//// Helper functions ////
|    |6254|+// // Helper functions ////
|6255|6255| 
|6256|6256| /**
|6257|6257|  * General getter for ranges.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6477|6477| 	return cmpPack && cmpPack.IsPacking();
|6478|6478| };
|6479|6479| 
|6480|    |-//// Formation specific functions ////
|    |6480|+// // Formation specific functions ////
|6481|6481| 
|6482|6482| UnitAI.prototype.IsAttackingAsFormation = function()
|6483|6483| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6482|6482| UnitAI.prototype.IsAttackingAsFormation = function()
|6483|6483| {
|6484|6484| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6485|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6486|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6485|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6486|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6487|6487| };
|6488|6488| 
|6489|6489| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6486|6486| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6487|6487| };
|6488|6488| 
|6489|    |-//// Animal specific functions ////
|    |6489|+// // Animal specific functions ////
|6490|6490| 
|6491|6491| UnitAI.prototype.MoveRandomly = function(distance)
|6492|6492| {

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4104| »   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
|5070| »   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
|5085| »   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
|5131| »   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
|5154| »   »   ····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
|2144| »   »   »   »   »   »   &&·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
|3242| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|6082| »   »   »   »   &&·!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
|6085| »   »   »   »   &&·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
|6486| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1978/display/redirect

Freagarach added inline comments.Apr 8 2020, 10:49 AM
binaries/data/mods/public/simulation/components/FormationAttack.js
54

In another diff I guess.

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

Yeah, would be nice indeed :)

Freagarach updated this revision to Diff 11645.Apr 8 2020, 1:10 PM

Use the icon provided by @Stan :)

Owners added a subscriber: Restricted Owners Package.Apr 8 2020, 1:10 PM
Vulcan added a comment.Apr 8 2020, 1:15 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 542| 542| 			if (cmpGarrisonHolder)
| 543| 543| 			{
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545|    |-				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546|    |-				    && player != +cmd.owner)
|    | 545|+				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits &&
|    | 546|+				    player != +cmd.owner)
| 547| 547| 						continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
| 544| 544| 				// Only the owner of the garrisonHolder may unload entities from any owners
| 545| 545| 				if (!IsOwnedByPlayer(player, garrisonHolder) && !data.controlAllUnits
| 546| 546| 				    && player != +cmd.owner)
| 547|    |-						continue;
|    | 547|+					continue;
| 548| 548| 
| 549| 549| 				if (!cmpGarrisonHolder.UnloadTemplate(cmd.template, cmd.owner, cmd.all))
| 550| 550| 					notifyUnloadFailure(player, garrisonHolder);
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'metadata'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata": cmd.metadata, "owner" : player } );
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Extra space after key 'owner'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner": player } );
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (space-in-parens):
|    | There should be no spaces inside this paren.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1157|1157| 
|1158|1158| 	// send Metadata info if any
|1159|1159| 	if (cmd.metadata)
|1160|    |-		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player } );
|    |1160|+		Engine.PostMessage(ent, MT_AIMetadata, { "id": ent, "metadata" : cmd.metadata, "owner" : player });
|1161|1161| 
|1162|1162| 	// Tell the units to start building this new entity
|1163|1163| 	if (cmd.autorepair)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1265|1265| 		}
|1266|1266| 
|1267|1267| 		lastTowerControlGroup = cmpSnappedStartObstruction.GetControlGroup();
|1268|    |-		//warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|    |1268|+		// warn("setting lastTowerControlGroup to control group of start snapped entity " + cmd.startSnappedEntity + ": " + lastTowerControlGroup);
|1269|1269| 	}
|1270|1270| 
|1271|1271| 	var i = 0;
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1329|1329| 
|1330|1330| 				if (i > 0)
|1331|1331| 				{
|1332|    |-					//warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|    |1332|+					// warn("   updating previous wall piece's secondary control group to " + newTowerControlGroup);
|1333|1333| 					var cmpPreviousObstruction = Engine.QueryInterface(pieces[i-1].ent, IID_Obstruction);
|1334|1334| 					// TODO: ensure that cmpPreviousObstruction exists
|1335|1335| 					// TODO: ensure that the previous obstruction does not yet have a secondary control group set
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1492|1492| 		// Check that all its members are selected
|1493|1493| 		var fid = formationIds[0];
|1494|1494| 		var cmpFormation = Engine.QueryInterface(+fid, IID_Formation);
|1495|    |-		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length
|1496|    |-			&& cmpFormation.GetMemberCount() == formation.entities.length)
|    |1495|+		if (cmpFormation && cmpFormation.GetMemberCount() == formation.members[fid].length &&
|    |1496|+			cmpFormation.GetMemberCount() == formation.entities.length)
|1497|1497| 		{
|1498|1498| 			cmpFormation.DeleteTwinFormations();
|1499|1499| 			// The whole formation was selected, so reuse its controller for this command
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1600|1600| 		for (var i = matrix.length - 1; i >= 0 && !closeClusters; --i)
|1601|1601| 			for (var j = i - 1; j >= 0 && !closeClusters; --j)
|1602|1602| 				if (matrix[i][j] < distSq)
|1603|    |-					closeClusters = [i,j];
|    |1603|+					closeClusters = [i, j];
|1604|1604| 
|1605|1605| 		// if no more close clusters found, just return all found clusters so far
|1606|1606| 		if (!closeClusters)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1622|1622| 		}
|1623|1623| 		// remove the rows and columns in the matrix for the merged clusters,
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|    |-		clusters.splice(closeClusters[0],1);
|    |1625|+		clusters.splice(closeClusters[0], 1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1623|1623| 		// remove the rows and columns in the matrix for the merged clusters,
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|    |-		clusters.splice(closeClusters[1],1);
|    |1626|+		clusters.splice(closeClusters[1], 1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1624|1624| 		// and the clusters themselves from the cluster list
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|    |-		matrix.splice(closeClusters[0],1);
|    |1627|+		matrix.splice(closeClusters[0], 1);
|1628|1628| 		matrix.splice(closeClusters[1],1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1625|1625| 		clusters.splice(closeClusters[0],1);
|1626|1626| 		clusters.splice(closeClusters[1],1);
|1627|1627| 		matrix.splice(closeClusters[0],1);
|1628|    |-		matrix.splice(closeClusters[1],1);
|    |1628|+		matrix.splice(closeClusters[1], 1);
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1629|1629| 		for (let i = 0; i < matrix.length; ++i)
|1630|1630| 		{
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|1632|    |-				matrix[i].splice(closeClusters[0],1);
|    |1632|+				matrix[i].splice(closeClusters[0], 1);
|1633|1633| 			if (matrix[i].length > closeClusters[1])
|1634|1634| 				matrix[i].splice(closeClusters[1],1);
|1635|1635| 		}
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/helpers/Commands.js
|1631|1631| 			if (matrix[i].length > closeClusters[0])
|1632|1632| 				matrix[i].splice(closeClusters[0],1);
|1633|1633| 			if (matrix[i].length > closeClusters[1])
|1634|    |-				matrix[i].splice(closeClusters[1],1);
|    |1634|+				matrix[i].splice(closeClusters[1], 1);
|1635|1635| 		}
|1636|1636| 		// add a new row of distances to the matrix and the new cluster
|1637|1637| 		clusters.push(newCluster);

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1519| »   »   »   »   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
|1598| »   »   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
|1615| »   »   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
|1629| »   »   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
| 546| »   »   »   »   ····&&·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
| 741| »   »   »   »   var·cmpGUIInterface·=·Engine.QueryInterface(SYSTEM_ENTITY,·IID_GuiInterface);
|    | [NORMAL] JSHintBear:
|    | 'cmpGUIInterface' is already defined.

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1555| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (space-unary-ops):
|    | Unary word operator 'typeof' must be followed by whitespace.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 337| 337| 	}
| 338| 338| 
| 339| 339| 	var wallPlacementInfo = updateBuildingPlacementPreview(); // entities making up the wall (wall segments, towers, ...)
| 340|    |-	if (!(wallPlacementInfo === false || typeof(wallPlacementInfo) === "object"))
|    | 340|+	if (!(wallPlacementInfo === false || typeof (wallPlacementInfo) === "object"))
| 341| 341| 	{
| 342| 342| 		error("Invalid updateBuildingPlacementPreview return value: " + uneval(wallPlacementInfo));
| 343| 343| 		return false;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 487| 487| 	mouseIsOverObject = (hoveredObject != null);
| 488| 488| 
| 489| 489| 	// Close the menu when interacting with the game world
| 490|    |-	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown")
| 491|    |-		&& (ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
|    | 490|+	if (!mouseIsOverObject && (ev.type =="mousebuttonup" || ev.type == "mousebuttondown") &&
|    | 491|+		(ev.button == SDL_BUTTON_LEFT || ev.button == SDL_BUTTON_RIGHT))
| 492| 492| 		g_Menu.close();
| 493| 493| 
| 494| 494| 	// State-machine processing:
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 648| 648| 		// user to continue building walls.
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651|    |-			case "mousemotion":
|    | 651|+		case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 649| 649| 		switch (ev.type)
| 650| 650| 		{
| 651| 651| 			case "mousemotion":
| 652|    |-				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
|    | 652|+			placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 651| 651| 			case "mousemotion":
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654|    |-				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
|    | 654|+			// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 652| 652| 				placementSupport.wallEndPosition = Engine.GetTerrainAtScreenPoint(ev.x, ev.y);
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655|    |-				// the ending point and the starting point to snap to.
|    | 655|+			// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 653| 653| 
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656|    |-				//
|    | 656|+			//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 654| 654| 				// Update the structure placement preview, and by extension, the list of snapping candidate entities for both (!)
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657|    |-				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
|    | 657|+			// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 655| 655| 				// the ending point and the starting point to snap to.
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658|    |-				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
|    | 658|+			// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// 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.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 656| 656| 				//
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659|    |-				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
|    | 659|+			// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 657| 657| 				// TODO: Note that here, we need to fetch all similar entities, including any offscreen ones, to support the case
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660|    |-				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
|    | 660|+			// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 658| 658| 				// where the snap entity for the starting point has moved offscreen, or has been deleted/destroyed, or was a
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661|    |-				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
|    | 661|+			// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 659| 659| 				// foundation and has been replaced with a completed entity since the user first chose it. Fetching all towers on
| 660| 660| 				// the entire map instead of only the current screen might get expensive fast since walls all have a ton of towers
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662|    |-				// points.
|    | 662|+			// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 661| 661| 				// in them. Might be useful to query only for entities within a certain range around the starting point and ending
| 662| 662| 				// points.
| 663| 663| 
| 664|    |-				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
|    | 664|+			placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 662| 662| 				// points.
| 663| 663| 
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665|    |-				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
|    | 665|+			var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 664| 664| 				placementSupport.wallSnapEntitiesIncludeOffscreen = true;
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667|    |-				if (result && result.cost)
|    | 667|+			if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 665| 665| 				var result = updateBuildingPlacementPreview(); // includes an update of the snap entity candidates
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668|    |-				{
|    | 668|+			{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 666| 666| 
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669|    |-					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
|    | 669|+				var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 667| 667| 				if (result && result.cost)
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670|    |-					placementSupport.tooltipMessage = [
|    | 670|+				placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 668| 668| 				{
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671|    |-						getEntityCostTooltip(result),
|    | 671|+					getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 669| 669| 					var neededResources = Engine.GuiInterfaceCall("GetNeededResources", { "cost": result.cost });
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672|    |-						getNeededResourcesTooltip(neededResources)
|    | 672|+					getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 670| 670| 					placementSupport.tooltipMessage = [
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673|    |-					].filter(tip => tip).join("\n");
|    | 673|+				].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676| 676| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 671| 671| 						getEntityCostTooltip(result),
| 672| 672| 						getNeededResourcesTooltip(neededResources)
| 673| 673| 					].filter(tip => tip).join("\n");
| 674|    |-				}
|    | 674|+			}
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 673| 673| 					].filter(tip => tip).join("\n");
| 674| 674| 				}
| 675| 675| 
| 676|    |-				break;
|    | 676|+			break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 675| 675| 
| 676| 676| 				break;
| 677| 677| 
| 678|    |-			case "mousebuttondown":
|    | 678|+		case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 676| 676| 				break;
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679|    |-				if (ev.button == SDL_BUTTON_LEFT)
|    | 679|+			if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 677| 677| 
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680|    |-				{
|    | 680|+			{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 678| 678| 			case "mousebuttondown":
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681|    |-					var queued = Engine.HotkeyIsPressed("session.queue");
|    | 681|+				var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 679| 679| 				if (ev.button == SDL_BUTTON_LEFT)
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682|    |-					if (tryPlaceWall(queued))
|    | 682|+				if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 680| 680| 				{
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683|    |-					{
|    | 683|+				{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 681| 681| 					var queued = Engine.HotkeyIsPressed("session.queue");
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684|    |-						if (queued)
|    | 684|+					if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 682| 682| 					if (tryPlaceWall(queued))
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685|    |-						{
|    | 685|+					{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 683| 683| 					{
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686|    |-							// continue building, just set a new starting position where we left off
|    | 686|+						// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 684| 684| 						if (queued)
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687|    |-							placementSupport.position = placementSupport.wallEndPosition;
|    | 687|+						placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 685| 685| 						{
| 686| 686| 							// continue building, just set a new starting position where we left off
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688|    |-							placementSupport.wallEndPosition = undefined;
|    | 688|+						placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 687| 687| 							placementSupport.position = placementSupport.wallEndPosition;
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690|    |-							inputState = INPUT_BUILDING_WALL_CLICK;
|    | 690|+						inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 688| 688| 							placementSupport.wallEndPosition = undefined;
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691|    |-						}
|    | 691|+					}
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 689| 689| 
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692|    |-						else
|    | 692|+					else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 690| 690| 							inputState = INPUT_BUILDING_WALL_CLICK;
| 691| 691| 						}
| 692| 692| 						else
| 693|    |-						{
|    | 693|+					{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 691| 691| 						}
| 692| 692| 						else
| 693| 693| 						{
| 694|    |-							placementSupport.Reset();
|    | 694|+						placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 692| 692| 						else
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695|    |-							inputState = INPUT_NORMAL;
|    | 695|+						inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 693| 693| 						{
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696|    |-						}
|    | 696|+					}
| 697| 697| 					}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 694| 694| 							placementSupport.Reset();
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697|    |-					}
|    | 697|+				}
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 695| 695| 							inputState = INPUT_NORMAL;
| 696| 696| 						}
| 697| 697| 					}
| 698|    |-					else
|    | 698|+				else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 696| 696| 						}
| 697| 697| 					}
| 698| 698| 					else
| 699|    |-						placementSupport.tooltipMessage = translate("Cannot build wall here!");
|    | 699|+					placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 698| 698| 					else
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701|    |-					updateBuildingPlacementPreview();
|    | 701|+				updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 699| 699| 						placementSupport.tooltipMessage = translate("Cannot build wall here!");
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702|    |-					return true;
|    | 702|+				return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 700| 700| 
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703|    |-				}
|    | 703|+			}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 701| 701| 					updateBuildingPlacementPreview();
| 702| 702| 					return true;
| 703| 703| 				}
| 704|    |-				else if (ev.button == SDL_BUTTON_RIGHT)
|    | 704|+			else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 702| 702| 					return true;
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705|    |-				{
|    | 705|+			{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 703| 703| 				}
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706|    |-					// reset to normal input mode
|    | 706|+				// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 704| 704| 				else if (ev.button == SDL_BUTTON_RIGHT)
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707|    |-					placementSupport.Reset();
|    | 707|+				placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 705| 705| 				{
| 706| 706| 					// reset to normal input mode
| 707| 707| 					placementSupport.Reset();
| 708|    |-					updateBuildingPlacementPreview();
|    | 708|+				updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 707| 707| 					placementSupport.Reset();
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710|    |-					inputState = INPUT_NORMAL;
|    | 710|+				inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713| 713| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 708| 708| 					updateBuildingPlacementPreview();
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711|    |-					return true;
|    | 711|+				return true;
| 712| 712| 				}
| 713| 713| 				break;
| 714| 714| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 709| 709| 
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712|    |-				}
|    | 712|+			}
| 713| 713| 				break;
| 714| 714| 		}
| 715| 715| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 710| 710| 					inputState = INPUT_NORMAL;
| 711| 711| 					return true;
| 712| 712| 				}
| 713|    |-				break;
|    | 713|+			break;
| 714| 714| 		}
| 715| 715| 		break;
| 716| 716| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 852| 852| 			break;
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855|    |-				if (ev.hotkey.indexOf("selection.group.") == 0)
|    | 855|+			if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 853| 853| 
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856|    |-				{
|    | 856|+			{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 854| 854| 		case "hotkeydown":
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857|    |-					let now = Date.now();
|    | 857|+				let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 855| 855| 				if (ev.hotkey.indexOf("selection.group.") == 0)
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858|    |-					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
|    | 858|+				if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 856| 856| 				{
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859|    |-					{
|    | 859|+				{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 857| 857| 					let now = Date.now();
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860|    |-						if (ev.hotkey.indexOf("selection.group.select.") == 0)
|    | 860|+					if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 858| 858| 					if (now - doublePressTimer < doublePressTime && ev.hotkey == prevHotkey)
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861|    |-						{
|    | 861|+					{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 859| 859| 					{
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862|    |-							var sptr = ev.hotkey.split(".");
|    | 862|+						var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 6 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 860| 860| 						if (ev.hotkey.indexOf("selection.group.select.") == 0)
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863|    |-							performGroup("snap", sptr[3]);
|    | 863|+						performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 861| 861| 						{
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864|    |-						}
|    | 864|+					}
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 862| 862| 							var sptr = ev.hotkey.split(".");
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865|    |-					}
|    | 865|+				}
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 863| 863| 							performGroup("snap", sptr[3]);
| 864| 864| 						}
| 865| 865| 					}
| 866|    |-					else
|    | 866|+				else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 864| 864| 						}
| 865| 865| 					}
| 866| 866| 					else
| 867|    |-					{
|    | 867|+				{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 865| 865| 					}
| 866| 866| 					else
| 867| 867| 					{
| 868|    |-						var sptr = ev.hotkey.split(".");
|    | 868|+					var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 866| 866| 					else
| 867| 867| 					{
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869|    |-						performGroup(sptr[2], sptr[3]);
|    | 869|+					performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 868| 868| 						var sptr = ev.hotkey.split(".");
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871|    |-						doublePressTimer = now;
|    | 871|+					doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 869| 869| 						performGroup(sptr[2], sptr[3]);
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872|    |-						prevHotkey = ev.hotkey;
|    | 872|+					prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875| 875| 				break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 4 tabs but found 5.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 870| 870| 
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873|    |-					}
|    | 873|+				}
| 874| 874| 				}
| 875| 875| 				break;
| 876| 876| 		}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 871| 871| 						doublePressTimer = now;
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874|    |-				}
|    | 874|+			}
| 875| 875| 				break;
| 876| 876| 		}
| 877| 877| 		break;
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
| 872| 872| 						prevHotkey = ev.hotkey;
| 873| 873| 					}
| 874| 874| 				}
| 875|    |-				break;
|    | 875|+			break;
| 876| 876| 		}
| 877| 877| 		break;
| 878| 878| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/input.js
|1604|1604| 	var selectall = Engine.HotkeyIsPressed("selection.offscreen");
|1605|1605| 
|1606|1606| 	// Reset the last idle unit, etc., if the selection type has changed.
|1607|    |-	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v,i) => v === lastIdleClasses[i]))
|    |1607|+	if (selectall || classes.length != lastIdleClasses.length || !classes.every((v, i) => v === lastIdleClasses[i]))
|1608|1608| 		resetIdleUnit();
|1609|1609| 	lastIdleClasses = classes;
|1610|1610| 

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 734| ·»   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 735| ·»   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
| 740| ·»   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
|1060| ·»   »   »   »   »   "template":·placementSupport.template,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1061| ·»   »   »   »   »   "x":·placementSupport.position.x,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1062| ·»   »   »   »   »   "z":·placementSupport.position.z,
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

binaries/data/mods/public/gui/session/input.js
|1065| ·»   »   »   »   });
|    | [NORMAL] ESLintBear (no-mixed-spaces-and-tabs):
|    | Mixed spaces and tabs.

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

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

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

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

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 491| »   »   &&·(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
| 521| »   »   »   »   var·rect·=·updateBandbox(bandbox,·ev,·true);
|    | [NORMAL] JSHintBear:
|    | 'rect' is already defined.

binaries/data/mods/public/gui/session/input.js
| 524| »   »   »   »   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
| 681| »   »   »   »   »   var·queued·=·Engine.HotkeyIsPressed("session.queue");
|    | [NORMAL] JSHintBear:
|    | 'queued' is already defined.

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

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

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

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

binaries/data/mods/public/gui/session/input.js
| 934| »   »   »   var·ent·=·Engine.PickEntityAtPoint(ev.x,·ev.y);
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'execute'.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
| 568| 568| 
| 569| 569| 	"cancel-setup-trade-route":
| 570| 570| 	{
| 571|    |-		"execute":function(target, action, selection, queued)
|    | 571|+		"execute": function(target, action, selection, queued)
| 572| 572| 		{
| 573| 573| 			Engine.PostNetworkCommand({
| 574| 574| 				"type": "cancel-setup-trade-route",
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/gui/session/unit_actions.js
| 613| 613| 				"cursor": "action-cancel-setup-trade-route",
| 614| 614| 				"tooltip": actionInfo.tooltip,
| 615| 615| 				"target": target
| 616|    |-			}
|    | 616|+			};
| 617| 617| 		},
| 618| 618| 		"specificness": 2,
| 619| 619| 	},

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

binaries/data/mods/public/gui/session/unit_actions.js
| 616| »   »   »   }
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 3.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
| 828| 828| 		updateEntityColor(data.showAllStatusBars && (i == player || player == -1) ?
| 829| 829| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer, IID_StatusBars] :
| 830| 830| 			[IID_Minimap, IID_RangeOverlayRenderer, IID_RallyPointRenderer],
| 831|    |-			cmpRangeManager.GetEntitiesByPlayer(i));
|    | 831|+		cmpRangeManager.GetEntitiesByPlayer(i));
| 832| 832| 	}
| 833| 833| 	updateEntityColor([IID_Selectable, IID_StatusBars], data.selected);
| 834| 834| 	Engine.QueryInterface(SYSTEM_ENTITY, IID_TerritoryManager).UpdateColors();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1661|1661| 			{
|1662|1662| 				minDist2 = dist2;
|1663|1663| 				minDistEntitySnapData = {
|1664|    |-						"x": pos.x,
|    |1664|+					"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1662|1662| 				minDist2 = dist2;
|1663|1663| 				minDistEntitySnapData = {
|1664|1664| 						"x": pos.x,
|1665|    |-						"z": pos.z,
|    |1665|+					"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|1668|1668| 				};
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1663|1663| 				minDistEntitySnapData = {
|1664|1664| 						"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|    |-						"angle": cmpPosition.GetRotation().y,
|    |1666|+					"angle": cmpPosition.GetRotation().y,
|1667|1667| 						"ent": ent
|1668|1668| 				};
|1669|1669| 			}
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 5 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/GuiInterface.js
|1664|1664| 						"x": pos.x,
|1665|1665| 						"z": pos.z,
|1666|1666| 						"angle": cmpPosition.GetRotation().y,
|1667|    |-						"ent": ent
|    |1667|+					"ent": ent
|1668|1668| 				};
|1669|1669| 			}
|1670|1670| 		}
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 818| 818| 					this.FinishOrder();
| 819| 819| 					return;
| 820| 820| 				}
| 821|    |-				else
| 822|    |-				{
|    | 821|+				
| 823| 822| 					this.SetNextState("GARRISON.APPROACHING");
| 824| 823| 					return;
| 825|    |-				}
|    | 824|+				
| 826| 825| 			}
| 827| 826| 
| 828| 827| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1090|1090| 			},
|1091|1091| 		},
|1092|1092| 
|1093|    |-		"GARRISON":{
|    |1093|+		"GARRISON": {
|1094|1094| 			"APPROACHING": {
|1095|1095| 				"enter": function() {
|1096|1096| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2140|2140| 
|2141|2141| 				"Attacked": function(msg) {
|2142|2142| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2143|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2144|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2143|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2144|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2145|2145| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2146|2146| 				},
|2147|2147| 			},
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2299|2299| 					"MovementUpdate": function(msg) {
|2300|2300| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2301|2301| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2302|    |-						if (msg.likelyFailure || 
|    |2302|+						if (msg.likelyFailure ||
|2303|2303| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2304|2304| 							!msg.obstructed && this.CheckRange(this.order.data))
|2305|2305| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2941|2941| 					{
|2942|2942| 						// The building was already finished/fully repaired before we arrived;
|2943|2943| 						// let the ConstructionFinished handler handle this.
|2944|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2944|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2945|2945| 						return true;
|2946|2946| 					}
|2947|2947| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2941|2941| 					{
|2942|2942| 						// The building was already finished/fully repaired before we arrived;
|2943|2943| 						// let the ConstructionFinished handler handle this.
|2944|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2944|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2945|2945| 						return true;
|2946|2946| 					}
|2947|2947| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3239|3239| 				this.StopTimer();
|3240|3240| 				this.ResetAnimation();
|3241|3241| 				if (this.formationAnimationVariant)
|3242|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3242|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3243|3243| 				else
|3244|3244| 					this.SetDefaultAnimationVariant();
|3245|3245| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3465|3465| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3466|3466| 
|3467|3467| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3468|    |-							// only used for domestic animals
|    |3468|+		// only used for domestic animals
|3469|3469| 
|3470|3470| 		// Reuse the same garrison behaviour for animals.
|3471|3471| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3527|3527| 
|3528|3528| UnitAI.prototype.IsAnimal = function()
|3529|3529| {
|3530|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3530|+	return (!!this.template.NaturalBehaviour);
|3531|3531| };
|3532|3532| 
|3533|3533| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3643|3643| 		{
|3644|3644| 			let index = this.GetCurrentState().indexOf(".");
|3645|3645| 			if (index != -1)
|3646|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3646|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3647|3647| 			this.Stop(false);
|3648|3648| 		}
|3649|3649| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3699|3699| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3700|3700| 			continue;
|3701|3701| 		if (i == 0)
|3702|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3702|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3703|3703| 		else
|3704|3704| 			this.orderQueue.splice(i, 1);
|3705|3705| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3699|3699| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3700|3700| 			continue;
|3701|3701| 		if (i == 0)
|3702|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3702|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3703|3703| 		else
|3704|3704| 			this.orderQueue.splice(i, 1);
|3705|3705| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3786|3786| };
|3787|3787| 
|3788|3788| 
|3789|    |-//// FSM linkage functions ////
|    |3789|+// // FSM linkage functions ////
|3790|3790| 
|3791|3791| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3792|3792| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3957|3957| 				continue;
|3958|3958| 			if (this.orderQueue[i].type == type)
|3959|3959| 				continue;
|3960|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3960|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3961|3961| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3962|3962| 			return;
|3963|3963| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3957|3957| 				continue;
|3958|3958| 			if (this.orderQueue[i].type == type)
|3959|3959| 				continue;
|3960|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3960|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3961|3961| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3962|3962| 			return;
|3963|3963| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4199|4199| 	if (data.timerRepeat === undefined)
|4200|4200| 		this.timer = undefined;
|4201|4201| 
|4202|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4202|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4203|4203| };
|4204|4204| 
|4205|4205| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4199|4199| 	if (data.timerRepeat === undefined)
|4200|4200| 		this.timer = undefined;
|4201|4201| 
|4202|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4202|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4203|4203| };
|4204|4204| 
|4205|4205| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4244|4244| 	// TODO: This is a bit inefficient since every unit listens to every
|4245|4245| 	// construction message - ideally we could scope it to only the one we're building
|4246|4246| 
|4247|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4247|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4248|4248| };
|4249|4249| 
|4250|4250| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4244|4244| 	// TODO: This is a bit inefficient since every unit listens to every
|4245|4245| 	// construction message - ideally we could scope it to only the one we're building
|4246|4246| 
|4247|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4247|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4248|4248| };
|4249|4249| 
|4250|4250| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4275|4275| 	if (msg.fromStatusEffect)
|4276|4276| 		return;
|4277|4277| 
|4278|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4278|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4279|4279| };
|4280|4280| 
|4281|4281| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4275|4275| 	if (msg.fromStatusEffect)
|4276|4276| 		return;
|4277|4277| 
|4278|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4278|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4279|4279| };
|4280|4280| 
|4281|4281| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4280|4280| 
|4281|4281| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4282|4282| {
|4283|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4283|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4284|4284| };
|4285|4285| 
|4286|4286| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4280|4280| 
|4281|4281| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4282|4282| {
|4283|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4283|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4284|4284| };
|4285|4285| 
|4286|4286| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4285|4285| 
|4286|4286| UnitAI.prototype.OnHealthChanged = function(msg)
|4287|4287| {
|4288|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4288|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4289|4289| };
|4290|4290| 
|4291|4291| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4285|4285| 
|4286|4286| UnitAI.prototype.OnHealthChanged = function(msg)
|4287|4287| {
|4288|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4288|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4289|4289| };
|4290|4290| 
|4291|4291| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4291|4291| UnitAI.prototype.OnRangeUpdate = function(msg)
|4292|4292| {
|4293|4293| 	if (msg.tag == this.losRangeQuery)
|4294|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4294|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4295|4295| 	else if (msg.tag == this.losHealRangeQuery)
|4296|4296| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4297|4297| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4291|4291| UnitAI.prototype.OnRangeUpdate = function(msg)
|4292|4292| {
|4293|4293| 	if (msg.tag == this.losRangeQuery)
|4294|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4294|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4295|4295| 	else if (msg.tag == this.losHealRangeQuery)
|4296|4296| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4297|4297| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4293|4293| 	if (msg.tag == this.losRangeQuery)
|4294|4294| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4295|4295| 	else if (msg.tag == this.losHealRangeQuery)
|4296|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4296|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4297|4297| };
|4298|4298| 
|4299|4299| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4293|4293| 	if (msg.tag == this.losRangeQuery)
|4294|4294| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4295|4295| 	else if (msg.tag == this.losHealRangeQuery)
|4296|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4296|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4297|4297| };
|4298|4298| 
|4299|4299| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4298|4298| 
|4299|4299| UnitAI.prototype.OnPackFinished = function(msg)
|4300|4300| {
|4301|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4301|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4302|4302| };
|4303|4303| 
|4304|4304| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4298|4298| 
|4299|4299| UnitAI.prototype.OnPackFinished = function(msg)
|4300|4300| {
|4301|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4301|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4302|4302| };
|4303|4303| 
|4304|4304| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4301|4301| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4302|4302| };
|4303|4303| 
|4304|    |-//// Helper functions to be called by the FSM ////
|    |4304|+// // Helper functions to be called by the FSM ////
|4305|4305| 
|4306|4306| UnitAI.prototype.GetWalkSpeed = function()
|4307|4307| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5083|5083| UnitAI.prototype.AttackEntityInZone = function(ents)
|5084|5084| {
|5085|5085| 	var target = ents.find(target =>
|5086|    |-		this.CanAttack(target)
|5087|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |5086|+		this.CanAttack(target) &&
|    |5087|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5088|5088| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5089|5089| 	);
|5090|5090| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5084|5084| {
|5085|5085| 	var target = ents.find(target =>
|5086|5086| 		this.CanAttack(target)
|5087|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5088|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |5087|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |5088|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5089|5089| 	);
|5090|5090| 	if (!target)
|5091|5091| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5148|5148| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5149|5149| 	if (this.isGuardOf)
|5150|5150| 	{
|5151|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5151|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5152|5152| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5153|5153| 		if (cmpUnitAI && cmpAttack &&
|5154|5154| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5152|5152| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5153|5153| 		if (cmpUnitAI && cmpAttack &&
|5154|5154| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5155|    |-				return false;
|    |5155|+			return false;
|5156|5156| 	}
|5157|5157| 
|5158|5158| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5190|5190| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5191|5191| 	if (this.isGuardOf)
|5192|5192| 	{
|5193|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5193|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5194|5194| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5195|5195| 		if (cmpUnitAI && cmpAttack &&
|5196|5196| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5203|5203| 	return false;
|5204|5204| };
|5205|5205| 
|5206|    |-//// External interface functions ////
|    |5206|+// // External interface functions ////
|5207|5207| 
|5208|5208| UnitAI.prototype.SetFormationController = function(ent)
|5209|5209| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5402|5402| 	{
|5403|5403| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5404|5404| 			return;
|5405|    |-		else
|5406|    |-			this.RemoveGuard();
|    |5405|+		this.RemoveGuard();
|5407|5406| 	}
|5408|5407| 
|5409|5408| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5750|5750| 
|5751|5751| 	if (this.IsFormationController())
|5752|5752| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5753|    |-}
|    |5753|+};
|5754|5754| /**
|5755|5755|  * Adds trade order to the queue. Either walk to the first market, or
|5756|5756|  * start a new route. Not forced, so it can be interrupted by attacks.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5771|5771| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5772|5772| 	{
|5773|5773| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5774|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5774|+		if (cmpTrader.HasBothMarkets() &&
|5775|5775| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5776|5776| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5777|5777| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6052|6052| 				{
|6053|6053| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|6054|6054| 					var targetClasses = this.order.data.targetClasses;
|6055|    |-					if (targetClasses.attack && cmpIdentity
|6056|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |6055|+					if (targetClasses.attack && cmpIdentity &&
|    |6056|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6057|6057| 						continue;
|6058|6058| 					if (targetClasses.avoid && cmpIdentity
|6059|6059| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6055|6055| 					if (targetClasses.attack && cmpIdentity
|6056|6056| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6057|6057| 						continue;
|6058|    |-					if (targetClasses.avoid && cmpIdentity
|6059|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |6058|+					if (targetClasses.avoid && cmpIdentity &&
|    |6059|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|6060|6060| 						continue;
|6061|6061| 					// Only used by the AIs to prevent some choices of targets
|6062|6062| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6078|6078| 		{
|6079|6079| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|6080|6080| 			var targetClasses = this.order.data.targetClasses;
|6081|    |-			if (cmpIdentity && targetClasses.attack
|6082|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |6081|+			if (cmpIdentity && targetClasses.attack &&
|    |6082|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6083|6083| 				continue;
|6084|6084| 			if (cmpIdentity && targetClasses.avoid
|6085|6085| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6081|6081| 			if (cmpIdentity && targetClasses.attack
|6082|6082| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|6083|6083| 				continue;
|6084|    |-			if (cmpIdentity && targetClasses.avoid
|6085|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |6084|+			if (cmpIdentity && targetClasses.avoid &&
|    |6085|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|6086|6086| 				continue;
|6087|6087| 			// Only used by the AIs to prevent some choices of targets
|6088|6088| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6224|6224| 
|6225|6225| UnitAI.prototype.SetHeldPosition = function(x, z)
|6226|6226| {
|6227|    |-	this.heldPosition = {"x": x, "z": z};
|    |6227|+	this.heldPosition = { "x": x, "z": z};
|6228|6228| };
|6229|6229| 
|6230|6230| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6224|6224| 
|6225|6225| UnitAI.prototype.SetHeldPosition = function(x, z)
|6226|6226| {
|6227|    |-	this.heldPosition = {"x": x, "z": z};
|    |6227|+	this.heldPosition = {"x": x, "z": z };
|6228|6228| };
|6229|6229| 
|6230|6230| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6251|6251| 	return false;
|6252|6252| };
|6253|6253| 
|6254|    |-//// Helper functions ////
|    |6254|+// // Helper functions ////
|6255|6255| 
|6256|6256| /**
|6257|6257|  * General getter for ranges.
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6477|6477| 	return cmpPack && cmpPack.IsPacking();
|6478|6478| };
|6479|6479| 
|6480|    |-//// Formation specific functions ////
|    |6480|+// // Formation specific functions ////
|6481|6481| 
|6482|6482| UnitAI.prototype.IsAttackingAsFormation = function()
|6483|6483| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6482|6482| UnitAI.prototype.IsAttackingAsFormation = function()
|6483|6483| {
|6484|6484| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6485|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6486|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6485|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6486|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6487|6487| };
|6488|6488| 
|6489|6489| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6486|6486| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6487|6487| };
|6488|6488| 
|6489|    |-//// Animal specific functions ////
|    |6489|+// // Animal specific functions ////
|6490|6490| 
|6491|6491| UnitAI.prototype.MoveRandomly = function(distance)
|6492|6492| {

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4104| »   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
|5070| »   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
|5085| »   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
|5131| »   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
|5154| »   »   ····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
|2144| »   »   »   »   »   »   &&·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
|3242| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|6082| »   »   »   »   &&·!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
|6085| »   »   »   »   &&·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
|6486| »   »   &&·this.GetCurrentState()·==·"FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1979/display/redirect

Silier requested changes to this revision.May 11 2020, 8:41 PM

not done yet with complete rewiev

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

I think better would be Attack selected position.
Attack selected ground sounds weird.

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

result.elevationBonus < 0

This revision now requires changes to proceed.May 11 2020, 8:41 PM
wraitii requested changes to this revision.May 24 2020, 8:16 AM

This diff has improved a lot since its early days, and it looks quite clean now, good work !
Please read the inlines, I've wrote a whole book' of em and I think you'll find them instructive.

The "request change" is mostly over the UnitAI stuff, mostly these two https://code.wildfiregames.com/D1971#inline-53881, https://code.wildfiregames.com/D1971#inline-53886

The 'big' change I'm requesting is this:

  • in UnitAI, "target" must remain an entityID/null/INVALID_ENTITY). Too much code expects this, it will crash and it will introduce technical debt to change that. Attack can keep the 'variant'.
  • Since JS is untyped, you have to rely on context and variable names to figure types out. This "target" confusion is annoying. Simply rename all 'target' that can be either an Vector3D or an entity ID to "attackTarget". After that, you won't have to comment everywhere that target can be an entity ID or a vector3 -> target is always null or an entity ID, and attackTarget is always either an entityID or a vector3. And by "all", I do mean all in Attack.js and UnitAI.js, and it's also likely cleaner in the GUI code.
  • To fix UnitAI after that change: set both attackTarget and either targetand {x,y,z} in the attack order. That way, the existing code checks still all pass properly and without changes, and you can add additional functionality with no conflicts. Best of both worlds.

This will let you remove all the changes to "checkrange" and "moveTo" functions, and I think you can mostly just get away with updating some parameter names and MoveToTargetAttackRange, which you can then just rename to MoveToAttackTargetRange(attackTarget) and you're good to go.

I think that's the only really major change preventing this from being committed (bar committing D2746 which this seems to depend on), so again, good work!

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

I realise this is strictly a preselected thing for now, but I think you should still give this a slightly lower specificness than regular "attack".

1346

There's also no selection involved ;)

Fire on the given position or something?

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

I suppose it doesn't per se hurt, but these two type comments are rather stating the obvious, and I think you can do without them. Alternatively, remove to top-line comment, which is also just another way of stating CanAttackGround(attackType)

496

I think it would be better with consistent checks. Either everything uses target instanceof Vector3D or everything uses typeof target == "number".

My preference, all else being equal, goes to target instanceof Vector3D because number isn't obviously an entity.

binaries/data/mods/public/simulation/components/DelayedDamage.js
58–59

cf above

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

'Meh' comments. I haven't said it for every function, but I think I might :p
It's not a big issue of course, but comments do also become outdated and so only writing the necessary ones is good practice.
I think a good rule-of-thumb is 'document the unexpected'.

These comments don't add much that's very useful:

  • "to use" is just noise (if it's not to use, why are you giving it, after all)
  • "target" is indeed a target
  • the natural instinct is that these values are all numbers.

Stating that we return an object with { "min": ..., "max": ..., "elevationBonus": ... } structure is more useful, however it's also stated right in the first line of the function.
I believe the valid jsdoc is {{ min: number, max: number, elevationBonus: number}} and that might be good to still use typing hints with IDEs in calling code.


That being said, I think the first line is useful in this instance: it's not obvious that this would query individual members (it makes sense, but we could be doing something else). What it doesn't really state is what it does: average it out? max?)

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

I'd need to read this more carefully but this code, even in svn, seems like it should just do this.setNextState("APPROACHING").

I think this "pushOrder" was necessary back when orders were calling Move, but since I changed that to be done in APPROACHING.enter it's un-necessary and you can do the normal thing.

1252

likewise.

1864

You seem to assume that this only gets called in the "attack ground" path, but it gets called even if you explicitly enter "INDIVIDUAL.COMBAT.APPROACHING" (that's the point of an FSM, the enter-leave clauses are _always_ called).

Further, it seems rather equivalent to just moving to APPROACHING.

I agree that conceptually it's probably good cleanup, but I would much prefer if you tried changing unitAI minimally as there are always unintended consequences.

In this instance, for example, you're calling "Pack" stuff in the order, whereas svn only does it in EnsureCorrectPackStateForAttack in the Order itself. That changes behaviour in somewhat unpredictable way, I think, and even if it ends up fixing things, it should be done in a separate diff because it complicates testing and reviewing this particular patch.

1884

Technically, the map can change, so elevation can change, so range and LOS stuff could probably be checked.

I think there is already at least one confirmed subtle bug: CheckTargetDistanceFromHeldPosition is apparently only called in "ShouldAbandonChase". And I do believe we can't make assumptions on "SetHeldPosition" here.
That being said, attack-ground is probably only ever going to be a player-given order, which means the held position will be the current position, I assume.

When in doubt, don't try to be too clever. Attack-ground is unlikely to be a large performance issue. Maybe just bump the timer interval in that case to like 2s since, indeed, ground doesn't really run away.

(also based on my "minimal changes to unitAI" approach, this is 'meh')

4414

Again, these don't feel super useful. And, in this instance, they're also wrong in subtle ways (which is the worst kind of wrong if technically right is the best kind of right).

The thing is, MoveToTargetRange doesn't actually move the entity.
It makes the entity "order a move", which essentially means, from the perspective of unitAI, "ordering a taxi". You might be able to order a taxi, and it might take you to your destination, but maybe there's no taxi and you're stuck here. Or maybe it's not a real taxi and you end up kidnapped. Or something.
Point is: this doesn't return whether the move has succeeded, but whether "ordering a taxi" has succeeded, which is a rather different thing. Conflating the two is partly why there was a mess in UnitAI/UnitMotion before, and I'd rather comments didn't reintroduce the mistake ;)


In fact, based on the "state the unexpected" mantra above, this might actually warrant a comment.
Perhaps these should all be renamed to "TryMoving".

4430

(post-recap edit: this is where I figure out the attackTarget business)

Beyond the comment issue, I don't really like this change (and others like it).
In Attack, it makes sense that the notion of "target" can be a position or an entity. It's what you're firing on.

In unitAI, basically all of the code is split on a "point/target" distinction. WalkToTarget means an entity, WalkToPoint means a position. Everything is set up like that, and that's why MoveTo and CheckRange can do the correct thing by just looking at the order data. One could argue that, from the beginning, we should have had a "target", that could be either an entity or a position, but in JS it's easier and more natural to check for properties than types, and we have to live with that for now.

And this diff breaks that assumption. I think it's for the worse. So I'll state that I was wrong here: use target for everything _except_ in UnitAI.

Simply add "attackTarget" property to the order, and use that in attack-related stuff that needs to deal with both types. That "attackTarget" can be a entity ID or a Vector3, but other code will not use it so they can't be wrong. Anywhere else, just use either target or x,y,z directly.

4441

With the attackTarget change, this should be renamed to MoveToAttackTargetRange, and should handle calling "MoveToPoint" or "MoveToTarget" explicitly.

4614

Same remark as MoveToTarget Range for the code.

The comments are accurate this time, but they're still kinda useless :p

Oh and one final thing: I was wondering if you should prefer typeof attackTarget == "number" or attackTarget instanceOf Vector3D or attackTarget instanceOf Object.
Based on a quick reading of the SM code, I would expect typeof attackTarget to compile better/be faster.
It would be nice to check, though.
The basic check is to run an AI-AI game or maybe Combat Demo Huge in non-visual replay and check if the runtime is appreciably different.
After that (and I do mean after, because with a JIT you can't expect specific profiling to perfectly reflect absolute behaviour), you could use simple custom trigger to run the checks 1000 times and see what happens.

You need to rebase this one m8 :p

One idea I just had -> it would be cool if for some units this acted as "attack random unit in zone". E.G. a group of archer, "attack zone", and the archers would each pick a random unit in that zone, instead of the closest. Would reduce the micro to avoid "overkill" with many archers.

Freagarach added a comment.EditedJan 23 2021, 7:46 AM

Attack-zone was also an idea I had some time ago, yeah.

[EDIT[: #5967

marder added a subscriber: marder.Oct 11 2021, 5:36 PM

any update on this?

needs rebase

any update on this? needs rebase

Silier resigned from this revision.Jul 31 2023, 5:26 PM