Page MenuHomeWildfire Games

Remove useless if branch form UnitAI created after rP22023
AbandonedPublic

Authored by Angen on May 14 2019, 10:15 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

@Stan reported that after rP22023 the check done in if branch executes the same code whenever result is true or false.

Test Plan

:) (simple refactor)

Diff Detail

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

Event Timeline

Angen created this revision.May 14 2019, 10:15 AM

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 228| 228| 		// Move a tile outside the building
| 229| 229| 		let range = 4;
| 230| 230| 		if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
| 231|    |-		{
|    | 231|+		
| 232| 232| 			// We've started walking to the given point
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234|    |-		}
|    | 234|+		
| 235| 235| 		else
| 236| 236| 		{
| 237| 237| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 233| 233| 			this.SetNextState("INDIVIDUAL.WALKING");
| 234| 234| 		}
| 235| 235| 		else
| 236|    |-		{
|    | 236|+		
| 237| 237| 			// We are already at the target, or can't move at all
| 238| 238| 			this.FinishOrder();
| 239|    |-		}
|    | 239|+		
| 240| 240| 	},
| 241| 241| 
| 242| 242| 	// Individual orders:
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 335| 335| 
| 336| 336| 		var ok = this.MoveToTarget(this.order.data.target);
| 337| 337| 		if (ok)
| 338|    |-		{
|    | 338|+		
| 339| 339| 			// We've started walking to the given point
| 340| 340| 			if (this.IsAnimal())
| 341| 341| 				this.SetNextState("ANIMAL.WALKING");
| 342| 342| 			else
| 343| 343| 				this.SetNextState("INDIVIDUAL.WALKING");
| 344|    |-		}
|    | 344|+		
| 345| 345| 		else
| 346| 346| 		{
| 347| 347| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364| 364| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365| 365| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366|    |-		{
|    | 366|+		
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 369| 369| 				needToMove = false;
| 370|    |-		}
|    | 370|+		
| 371| 371| 
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 361| 361| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 362| 362| 		var needToMove = true;
| 363| 363| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 364|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 365|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 364|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 365|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 366| 366| 		{
| 367| 367| 			// we were already on the shoreline, and have not moved since
| 368| 368| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 372| 372| 		// TODO: what if the units are on a cliff ? the ship will go below the cliff
| 373| 373| 		// and the units won't be able to garrison. Should go to the nearest (accessible) shore
| 374| 374| 		if (needToMove && this.MoveToTarget(this.order.data.target))
| 375|    |-		{
|    | 375|+		
| 376| 376| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
| 377|    |-		}
|    | 377|+		
| 378| 378| 		else
| 379| 379| 		{
| 380| 380| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 401| 401| 		var distance = DistanceBetweenEntities(this.entity, this.order.data.target) + (+this.template.FleeDistance);
| 402| 402| 		var cmpUnitMotion = Engine.QueryInterface(this.entity, IID_UnitMotion);
| 403| 403| 		if (cmpUnitMotion.MoveToTargetRange(this.order.data.target, distance, -1))
| 404|    |-		{
|    | 404|+		
| 405| 405| 			// We've started fleeing from the given target
| 406| 406| 			if (this.IsAnimal())
| 407| 407| 				this.SetNextState("ANIMAL.FLEEING");
| 408| 408| 			else
| 409| 409| 				this.SetNextState("INDIVIDUAL.FLEEING");
| 410|    |-		}
|    | 410|+		
| 411| 411| 		else
| 412| 412| 		{
| 413| 413| 			// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 570| 570| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 571| 571| 				}
| 572| 572| 				else
| 573|    |-				{
|    | 573|+				
| 574| 574| 					// We couldn't move there, or the target moved away
| 575| 575| 					this.FinishOrder();
| 576|    |-				}
|    | 576|+				
| 577| 577| 				return;
| 578| 578| 			}
| 579| 579| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 583| 583| 
| 584| 584| 		// Try to move within range
| 585| 585| 		if (this.MoveToTargetRange(this.order.data.target, IID_ResourceGatherer))
| 586|    |-		{
|    | 586|+		
| 587| 587| 			// We've started walking to the given point
| 588| 588| 			this.SetNextState("INDIVIDUAL.GATHER.APPROACHING");
| 589|    |-		}
|    | 589|+		
| 590| 590| 		else
| 591| 591| 		{
| 592| 592| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 660| 660| 	"Order.Repair": function(msg) {
| 661| 661| 		// Try to move within range
| 662| 662| 		if (this.MoveToTargetRange(this.order.data.target, IID_Builder))
| 663|    |-		{
|    | 663|+		
| 664| 664| 			// We've started walking to the given point
| 665| 665| 			this.SetNextState("INDIVIDUAL.REPAIR.APPROACHING");
| 666|    |-		}
|    | 666|+		
| 667| 667| 		else
| 668| 668| 		{
| 669| 669| 			// We are already at the target, or can't move at all,
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 696| 696| 		}
| 697| 697| 
| 698| 698| 		if (this.MoveToGarrisonRange(this.order.data.target))
| 699|    |-		{
|    | 699|+		
| 700| 700| 			this.SetNextState("INDIVIDUAL.GARRISON.APPROACHING");
| 701|    |-		}
|    | 701|+		
| 702| 702| 		else
| 703| 703| 		{
| 704| 704| 			// We do a range check before actually garrisoning
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 824| 824| 			if (!this.CheckTargetAttackRange(target, target))
| 825| 825| 			{
| 826| 826| 				if (this.TargetIsAlive(target) && this.CheckTargetVisible(target))
| 827|    |-				{
|    | 827|+				
| 828| 828| 					if (this.MoveToTargetAttackRange(target, target))
| 829| 829| 					{
| 830| 830| 						this.SetNextState("COMBAT.APPROACHING");
| 831| 831| 						return;
| 832| 832| 					}
| 833|    |-				}
|    | 833|+				
| 834| 834| 				this.FinishOrder();
| 835| 835| 				return;
| 836| 836| 			}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 849| 849| 			}
| 850| 850| 			// Check if we are already in range, otherwise walk there
| 851| 851| 			if (!this.CheckGarrisonRange(msg.data.target))
| 852|    |-			{
|    | 852|+			
| 853| 853| 				if (!this.CheckTargetVisible(msg.data.target))
| 854| 854| 				{
| 855| 855| 					this.FinishOrder();
| 864| 864| 						return;
| 865| 865| 					}
| 866| 866| 				}
| 867|    |-			}
|    | 867|+			
| 868| 868| 
| 869| 869| 			this.SetNextState("GARRISON.GARRISONING");
| 870| 870| 		},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 856| 856| 					return;
| 857| 857| 				}
| 858| 858| 				else
| 859|    |-				{
|    | 859|+				
| 860| 860| 					// Out of range; move there in formation
| 861| 861| 					if (this.MoveToGarrisonRange(msg.data.target))
| 862| 862| 					{
| 863| 863| 						this.SetNextState("GARRISON.APPROACHING");
| 864| 864| 						return;
| 865| 865| 					}
| 866|    |-				}
|    | 866|+				
| 867| 867| 			}
| 868| 868| 
| 869| 869| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 855| 855| 					this.FinishOrder();
| 856| 856| 					return;
| 857| 857| 				}
| 858|    |-				else
| 859|    |-				{
|    | 858|+				
| 860| 859| 					// Out of range; move there in formation
| 861| 860| 					if (this.MoveToGarrisonRange(msg.data.target))
| 862| 861| 					{
| 863| 862| 						this.SetNextState("GARRISON.APPROACHING");
| 864| 863| 						return;
| 865| 864| 					}
| 866|    |-				}
|    | 865|+				
| 867| 866| 			}
| 868| 867| 
| 869| 868| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 882| 882| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 883| 883| 					}
| 884| 884| 					else
| 885|    |-					{
|    | 885|+					
| 886| 886| 						// We couldn't move there, or the target moved away
| 887| 887| 						this.FinishOrder();
| 888|    |-					}
|    | 888|+					
| 889| 889| 					return;
| 890| 890| 				}
| 891| 891| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1103|1103| 			},
|1104|1104| 		},
|1105|1105| 
|1106|    |-		"GARRISON":{
|    |1106|+		"GARRISON": {
|1107|1107| 			"enter": function() {
|1108|1108| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1109|1109| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|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| 			if (this.IsAnimal())
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1315|1315| 			// Move a tile outside the building
|1316|1316| 			let range = 4;
|1317|1317| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|1318|    |-			{
|    |1318|+			
|1319|1319| 				// We've started walking to the given point
|1320|1320| 				this.SetNextState("WALKINGTOPOINT");
|1321|    |-			}
|    |1321|+			
|1322|1322| 			else
|1323|1323| 			{
|1324|1324| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1320|1320| 				this.SetNextState("WALKINGTOPOINT");
|1321|1321| 			}
|1322|1322| 			else
|1323|    |-			{
|    |1323|+			
|1324|1324| 				// We are already at the target, or can't move at all
|1325|1325| 				this.FinishOrder();
|1326|    |-			}
|    |1326|+			
|1327|1327| 		},
|1328|1328| 
|1329|1329| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1521|1521| 
|1522|1522| 			"LosRangeUpdate": function(msg) {
|1523|1523| 				if (this.GetStance().targetVisibleEnemies)
|1524|    |-				{
|    |1524|+				
|1525|1525| 					// Start attacking one of the newly-seen enemy (if any)
|1526|1526| 					this.AttackEntitiesByPreference(msg.data.added);
|1527|    |-				}
|    |1527|+				
|1528|1528| 			},
|1529|1529| 
|1530|1530| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1707|1707| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1708|1708| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1709|1709| 						if (cmpHealth && (cmpHealth.GetHitpoints() < cmpHealth.GetMaxHitpoints()))
|1710|    |-						{
|    |1710|+						
|1711|1711| 							if (this.CanHeal(this.isGuardOf))
|1712|1712| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1713|1713| 							else if (this.CanRepair(this.isGuardOf))
|1714|1714| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1715|    |-						}
|    |1715|+						
|1716|1716| 					}
|1717|1717| 				},
|1718|1718| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1792|1792| 				"MoveCompleted": function() {
|1793|1793| 
|1794|1794| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1795|    |-					{
|    |1795|+					
|1796|1796| 						// If the unit needs to unpack, do so
|1797|1797| 						if (this.CanUnpack())
|1798|1798| 						{
|1801|1801| 						}
|1802|1802| 						else
|1803|1803| 							this.SetNextState("ATTACKING");
|1804|    |-					}
|    |1804|+					
|1805|1805| 					else
|1806|1806| 					{
|1807|1807| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1799|1799| 							this.PushOrderFront("Unpack", { "force": true });
|1800|1800| 							return;
|1801|1801| 						}
|1802|    |-						else
|1803|    |-							this.SetNextState("ATTACKING");
|    |1802|+						this.SetNextState("ATTACKING");
|1804|1803| 					}
|1805|1804| 					else
|1806|1805| 					{
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1803|1803| 							this.SetNextState("ATTACKING");
|1804|1804| 					}
|1805|1805| 					else
|1806|    |-					{
|    |1806|+					
|1807|1807| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1808|1808| 						{
|1809|1809| 							this.SetNextState("APPROACHING");
|1813|1813| 							// Give up
|1814|1814| 							this.FinishOrder();
|1815|1815| 						}
|1816|    |-					}
|    |1816|+					
|1817|1817| 				},
|1818|1818| 			},
|1819|1819| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1805|1805| 					else
|1806|1806| 					{
|1807|1807| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1808|    |-						{
|    |1808|+						
|1809|1809| 							this.SetNextState("APPROACHING");
|1810|    |-						}
|    |1810|+						
|1811|1811| 						else
|1812|1812| 						{
|1813|1813| 							// Give up
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1809|1809| 							this.SetNextState("APPROACHING");
|1810|1810| 						}
|1811|1811| 						else
|1812|    |-						{
|    |1812|+						
|1813|1813| 							// Give up
|1814|1814| 							this.FinishOrder();
|1815|    |-						}
|    |1815|+						
|1816|1816| 					}
|1817|1817| 				},
|1818|1818| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1830|1830| 					}
|1831|1831| 					// Check the target is still alive and attackable
|1832|1832| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1833|    |-					{
|    |1833|+					
|1834|1834| 						// Can't reach it - try to chase after it
|1835|1835| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1836|1836| 						{
|1845|1845| 								return;
|1846|1846| 							}
|1847|1847| 						}
|1848|    |-					}
|    |1848|+					
|1849|1849| 
|1850|1850| 					var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|1851|1851| 					this.attackTimers = cmpAttack.GetTimers(this.order.data.attackType);
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1876|1876| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1877|1877| 
|1878|1878| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1879|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1879|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1880|1880| 
|1881|1881| 					this.FaceTowardsTarget(this.order.data.target);
|1882|1882| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2005|2005| 
|2006|2006| 				"Attacked": function(msg) {
|2007|2007| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2008|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2009|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2008|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2009|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2010|2010| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2011|2011| 				},
|2012|2012| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2019|2019| 					this.SelectAnimation("move");
|2020|2020| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2021|2021| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2022|    |-					{
|    |2022|+					
|2023|2023| 						// Run after a fleeing target
|2024|2024| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2025|    |-					}
|    |2025|+					
|2026|2026| 					this.StartTimer(1000, 1000);
|2027|2027| 				},
|2028|2028| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2080|2080| 						// Also don't switch to a different type of huntable animal
|2081|2081| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2082|2082| 							return (
|2083|    |-								ent != oldTarget
|2084|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2083|+								ent != oldTarget &&
|    |2084|+								 ((type.generic == "treasure" && oldType.generic == "treasure")
|2085|2085| 								 || (type.specific == oldType.specific
|2086|2086| 								 && (type.specific != "meat" || oldTemplate == template)))
|2087|2087| 							);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2081|2081| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2082|2082| 							return (
|2083|2083| 								ent != oldTarget
|2084|    |-								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2085|    |-								 || (type.specific == oldType.specific
|    |2084|+								 && ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2085|+								 (type.specific == oldType.specific
|2086|2086| 								 && (type.specific != "meat" || oldTemplate == template)))
|2087|2087| 							);
|2088|2088| 						}, oldTarget);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2082|2082| 							return (
|2083|2083| 								ent != oldTarget
|2084|2084| 								 && ((type.generic == "treasure" && oldType.generic == "treasure")
|2085|    |-								 || (type.specific == oldType.specific
|2086|    |-								 && (type.specific != "meat" || oldTemplate == template)))
|    |2085|+								 || (type.specific == oldType.specific &&
|    |2086|+								 (type.specific != "meat" || oldTemplate == template)))
|2087|2087| 							);
|2088|2088| 						}, oldTarget);
|2089|2089| 						if (nearby)
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2091|2091| 							this.PerformGather(nearby, false, false);
|2092|2092| 							return true;
|2093|2093| 						}
|2094|    |-						else
|2095|    |-						{
|    |2094|+						
|2096|2095| 							// It's probably better in this case, to avoid units getting stuck around a dropsite
|2097|2096| 							// in a "Target is far away, full, nearby are no good resources, return to dropsite" loop
|2098|2097| 							// to order it to GatherNear the resource position.
|2113|2112| 									return true;
|2114|2113| 								}
|2115|2114| 							}
|2116|    |-						}
|    |2115|+						
|2117|2116| 						return true;
|2118|2117| 					}
|2119|2118| 					return false;
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2103|2103| 								this.GatherNearPosition(pos.x, pos.z, oldType, oldTemplate);
|2104|2104| 								return true;
|2105|2105| 							}
|2106|    |-							else
|2107|    |-							{
|    |2106|+							
|2108|2107| 								// we're kind of stuck here. Return resource.
|2109|2108| 								var nearby = this.FindNearestDropsite(oldType.generic);
|2110|2109| 								if (nearby)
|2112|2111| 									this.PushOrderFront("ReturnResource", { "target": nearby, "force": false });
|2113|2112| 									return true;
|2114|2113| 								}
|2115|    |-							}
|    |2114|+							
|2116|2115| 						}
|2117|2116| 						return true;
|2118|2117| 					}
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2145|2145| 						// Also don't switch to a different type of huntable animal
|2146|2146| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2147|2147| 							return (
|2148|    |-								ent != oldTarget
|2149|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|    |2148|+								ent != oldTarget &&
|    |2149|+								((type.generic == "treasure" && oldType.generic == "treasure")
|2150|2150| 								|| (type.specific == oldType.specific
|2151|2151| 								&& (type.specific != "meat" || oldTemplate == template)))
|2152|2152| 							);
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2146|2146| 						var nearby = this.FindNearbyResource(function(ent, type, template) {
|2147|2147| 							return (
|2148|2148| 								ent != oldTarget
|2149|    |-								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2150|    |-								|| (type.specific == oldType.specific
|    |2149|+								&& ((type.generic == "treasure" && oldType.generic == "treasure") ||
|    |2150|+								(type.specific == oldType.specific
|2151|2151| 								&& (type.specific != "meat" || oldTemplate == template)))
|2152|2152| 							);
|2153|2153| 						});
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2147|2147| 							return (
|2148|2148| 								ent != oldTarget
|2149|2149| 								&& ((type.generic == "treasure" && oldType.generic == "treasure")
|2150|    |-								|| (type.specific == oldType.specific
|2151|    |-								&& (type.specific != "meat" || oldTemplate == template)))
|    |2150|+								|| (type.specific == oldType.specific &&
|    |2151|+								(type.specific != "meat" || oldTemplate == template)))
|2152|2152| 							);
|2153|2153| 						});
|2154|2154| 						if (nearby)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2192|2192| 					// Also don't switch to a different type of huntable animal
|2193|2193| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2194|2194| 						return (
|2195|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2196|    |-							|| (type.specific == resourceType.specific
|    |2195|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2196|+							(type.specific == resourceType.specific
|2197|2197| 							&& (type.specific != "meat" || resourceTemplate == template))
|2198|2198| 						);
|2199|2199| 					});
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2193|2193| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2194|2194| 						return (
|2195|2195| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2196|    |-							|| (type.specific == resourceType.specific
|2197|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2196|+							|| (type.specific == resourceType.specific &&
|    |2197|+							(type.specific != "meat" || resourceTemplate == template))
|2198|2198| 						);
|2199|2199| 					});
|2200|2200| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2309|2309| 
|2310|2310| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2311|2311| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2312|    |-					{
|    |2312|+					
|2313|2313| 						// Check we can still reach and gather from the target
|2314|2314| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2315|2315| 						{
|2375|2375| 								return;
|2376|2376| 							}
|2377|2377| 						}
|2378|    |-					}
|    |2378|+					
|2379|2379| 
|2380|2380| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2381|2381| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2401|2401| 					// Also don't switch to a different type of huntable animal
|2402|2402| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2403|2403| 						return (
|2404|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2405|    |-							|| (type.specific == resourceType.specific
|    |2404|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2405|+							(type.specific == resourceType.specific
|2406|2406| 							&& (type.specific != "meat" || resourceTemplate == template))
|2407|2407| 						);
|2408|2408| 					});
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2402|2402| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2403|2403| 						return (
|2404|2404| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2405|    |-							|| (type.specific == resourceType.specific
|2406|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2405|+							|| (type.specific == resourceType.specific &&
|    |2406|+							(type.specific != "meat" || resourceTemplate == template))
|2407|2407| 						);
|2408|2408| 					});
|2409|2409| 					if (nearby)
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2489|2489| 					this.StartTimer(prepare, this.healTimers.repeat);
|2490|2490| 
|2491|2491| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2492|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2492|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2493|2493| 
|2494|2494| 					this.FaceTowardsTarget(this.order.data.target);
|2495|2495| 				},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2704|2704| 					{
|2705|2705| 						// The building was already finished/fully repaired before we arrived;
|2706|2706| 						// let the ConstructionFinished handler handle this.
|2707|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2707|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2708|2708| 						return true;
|2709|2709| 					}
|2710|2710| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2704|2704| 					{
|2705|2705| 						// The building was already finished/fully repaired before we arrived;
|2706|2706| 						// let the ConstructionFinished handler handle this.
|2707|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2707|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2708|2708| 						return true;
|2709|2709| 					}
|2710|2710| 
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2744|2744| 					if (this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2745|2745| 						this.SetNextState("APPROACHING");
|2746|2746| 					else if (!this.CheckTargetRange(this.repairTarget, IID_Builder))
|2747|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2747|+						this.FinishOrder(); // can't approach and isn't in reach
|2748|2748| 				},
|2749|2749| 			},
|2750|2750| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2831|2831| 
|2832|2832| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2833|2833| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2834|    |-				{
|    |2834|+				
|2835|2835| 					// We're already walking to the given point, so add this as a order.
|2836|2836| 					this.WalkToTarget(msg.data.newentity, true);
|2837|    |-				}
|    |2837|+				
|2838|2838| 			},
|2839|2839| 		},
|2840|2840| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2884|2884| 
|2885|2885| 					// Check that we can garrison here
|2886|2886| 					if (this.CanGarrison(target))
|2887|    |-					{
|    |2887|+					
|2888|2888| 						// Check that we're in range of the garrison target
|2889|2889| 						if (this.CheckGarrisonRange(target))
|2890|2890| 						{
|2960|2960| 								return false;
|2961|2961| 							}
|2962|2962| 						}
|2963|    |-					}
|    |2963|+					
|2964|2964| 					// Garrisoning failed for some reason, so finish the order
|2965|2965| 					this.FinishOrder();
|2966|2966| 					return true;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3067|3067| 		"Attacked": function(msg) {
|3068|3068| 			if (this.template.NaturalBehaviour == "skittish" ||
|3069|3069| 			    this.template.NaturalBehaviour == "passive")
|3070|    |-			{
|    |3070|+			
|3071|3071| 				this.Flee(msg.data.attacker, false);
|3072|    |-			}
|    |3072|+			
|3073|3073| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3074|3074| 			{
|3075|3075| 				if (this.CanAttack(msg.data.attacker))
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3076|3076| 					this.Attack(msg.data.attacker, false);
|3077|3077| 			}
|3078|3078| 			else if (this.template.NaturalBehaviour == "domestic")
|3079|    |-			{
|    |3079|+			
|3080|3080| 				// Never flee, stop what we were doing
|3081|3081| 				this.SetNextState("IDLE");
|3082|    |-			}
|    |3082|+			
|3083|3083| 		},
|3084|3084| 
|3085|3085| 		"Order.LeaveFoundation": function(msg) {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3086|3086| 			// Move a tile outside the building
|3087|3087| 			var range = 4;
|3088|3088| 			if (this.MoveToTargetRangeExplicit(msg.data.target, range, range))
|3089|    |-			{
|    |3089|+			
|3090|3090| 				// We've started walking to the given point
|3091|3091| 				this.SetNextState("WALKING");
|3092|    |-			}
|    |3092|+			
|3093|3093| 			else
|3094|3094| 			{
|3095|3095| 				// We are already at the target, or can't move at all
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3091|3091| 				this.SetNextState("WALKING");
|3092|3092| 			}
|3093|3093| 			else
|3094|    |-			{
|    |3094|+			
|3095|3095| 				// We are already at the target, or can't move at all
|3096|3096| 				this.FinishOrder();
|3097|    |-			}
|    |3097|+			
|3098|3098| 		},
|3099|3099| 
|3100|3100| 		"IDLE": {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3133|3133| 				}
|3134|3134| 				// Start attacking one of the newly-seen enemy (if any)
|3135|3135| 				else if (this.IsDangerousAnimal())
|3136|    |-				{
|    |3136|+				
|3137|3137| 					this.AttackVisibleEntity(msg.data.added);
|3138|    |-				}
|    |3138|+				
|3139|3139| 
|3140|3140| 				// TODO: if two units enter our range together, we'll attack the
|3141|3141| 				// first and then the second won't trigger another LosRangeUpdate
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3176|3176| 				}
|3177|3177| 				// Start attacking one of the newly-seen enemy (if any)
|3178|3178| 				else if (this.template.NaturalBehaviour == "violent")
|3179|    |-				{
|    |3179|+				
|3180|3180| 					this.AttackVisibleEntity(msg.data.added);
|3181|    |-				}
|    |3181|+				
|3182|3182| 			},
|3183|3183| 
|3184|3184| 			"MoveCompleted": function() { },
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3193|3193| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3194|3194| 
|3195|3195| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3196|    |-							// only used for domestic animals
|    |3196|+		// only used for domestic animals
|3197|3197| 	},
|3198|3198| };
|3199|3199| 
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3250|3250| 
|3251|3251| UnitAI.prototype.IsAnimal = function()
|3252|3252| {
|3253|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3253|+	return (!!this.template.NaturalBehaviour);
|3254|3254| };
|3255|3255| 
|3256|3256| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3288|3288| UnitAI.prototype.GetGarrisonHolder = function()
|3289|3289| {
|3290|3290| 	if (this.IsGarrisoned())
|3291|    |-	{
|    |3291|+	
|3292|3292| 		for (let order of this.orderQueue)
|3293|3293| 			if (order.type == "Garrison")
|3294|3294| 				return order.data.target;
|3295|    |-	}
|    |3295|+	
|3296|3296| 	return INVALID_ENTITY;
|3297|3297| };
|3298|3298| 
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3366|3366| 		{
|3367|3367| 			let index = this.GetCurrentState().indexOf(".");
|3368|3368| 			if (index != -1)
|3369|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3369|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3370|3370| 			this.Stop(false);
|3371|3371| 		}
|3372|3372| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3422|3422| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3423|3423| 			continue;
|3424|3424| 		if (i == 0)
|3425|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3425|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3426|3426| 		else
|3427|3427| 			this.orderQueue.splice(i, 1);
|3428|3428| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3422|3422| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3423|3423| 			continue;
|3424|3424| 		if (i == 0)
|3425|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3425|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3426|3426| 		else
|3427|3427| 			this.orderQueue.splice(i, 1);
|3428|3428| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3506|3506| };
|3507|3507| 
|3508|3508| 
|3509|    |-//// FSM linkage functions ////
|    |3509|+// // FSM linkage functions ////
|3510|3510| 
|3511|3511| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3512|3512| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3678|3678| 				continue;
|3679|3679| 			if (this.orderQueue[i].type == type)
|3680|3680| 				continue;
|3681|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3681|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3682|3682| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3683|3683| 			return;
|3684|3684| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3678|3678| 				continue;
|3679|3679| 			if (this.orderQueue[i].type == type)
|3680|3680| 				continue;
|3681|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3681|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3682|3682| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3683|3683| 			return;
|3684|3684| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3692|3692| {
|3693|3693| 	// Remember the previous work orders to be able to go back to them later if required
|3694|3694| 	if (data && data.force)
|3695|    |-	{
|    |3695|+	
|3696|3696| 		if (this.IsFormationController())
|3697|3697| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3698|3698| 		else
|3699|3699| 			this.UpdateWorkOrders(type);
|3700|    |-	}
|    |3700|+	
|3701|3701| 
|3702|3702| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3703|3703| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3769|3769| 	{
|3770|3770| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3771|3771| 		if (cmpUnitAI)
|3772|    |-		{
|    |3772|+		
|3773|3773| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3774|3774| 			{
|3775|3775| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3778|3778| 					return;
|3779|3779| 				}
|3780|3780| 			}
|3781|    |-		}
|    |3781|+		
|3782|3782| 	}
|3783|3783| 
|3784|3784| 	// If nothing found, take the unit orders
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3771|3771| 		if (cmpUnitAI)
|3772|3772| 		{
|3773|3773| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3774|    |-			{
|    |3774|+			
|3775|3775| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3776|3776| 				{
|3777|3777| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3778|3778| 					return;
|3779|3779| 				}
|3780|    |-			}
|    |3780|+			
|3781|3781| 		}
|3782|3782| 	}
|3783|3783| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'for' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3783|3783| 
|3784|3784| 	// If nothing found, take the unit orders
|3785|3785| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3786|    |-	{
|    |3786|+	
|3787|3787| 		if (isWorkType(this.orderQueue[i].type))
|3788|3788| 		{
|3789|3789| 			this.workOrders = this.orderQueue.slice(i);
|3790|3790| 			return;
|3791|3791| 		}
|3792|    |-	}
|    |3792|+	
|3793|3793| };
|3794|3794| 
|3795|3795| UnitAI.prototype.BackToWork = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3849|3849| 	if (data.timerRepeat === undefined)
|3850|3850| 		this.timer = undefined;
|3851|3851| 
|3852|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3852|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3853|3853| };
|3854|3854| 
|3855|3855| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3849|3849| 	if (data.timerRepeat === undefined)
|3850|3850| 		this.timer = undefined;
|3851|3851| 
|3852|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3852|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3853|3853| };
|3854|3854| 
|3855|3855| /**
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3884|3884| 	this.timer = undefined;
|3885|3885| };
|3886|3886| 
|3887|    |-//// Message handlers /////
|    |3887|+// // Message handlers /////
|3888|3888| 
|3889|3889| UnitAI.prototype.OnMotionChanged = function(msg)
|3890|3890| {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3889|3889| UnitAI.prototype.OnMotionChanged = function(msg)
|3890|3890| {
|3891|3891| 	if (msg.starting && !msg.error)
|3892|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3892|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveStarted", "data": msg});
|3893|3893| 	else if (!msg.starting || msg.error)
|3894|3894| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3895|3895| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3889|3889| UnitAI.prototype.OnMotionChanged = function(msg)
|3890|3890| {
|3891|3891| 	if (msg.starting && !msg.error)
|3892|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|    |3892|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg });
|3893|3893| 	else if (!msg.starting || msg.error)
|3894|3894| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|3895|3895| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3891|3891| 	if (msg.starting && !msg.error)
|3892|3892| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3893|3893| 	else if (!msg.starting || msg.error)
|3894|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3894|+		this.UnitFsm.ProcessMessage(this, { "type": "MoveCompleted", "data": msg});
|3895|3895| };
|3896|3896| 
|3897|3897| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3891|3891| 	if (msg.starting && !msg.error)
|3892|3892| 		this.UnitFsm.ProcessMessage(this, {"type": "MoveStarted", "data": msg});
|3893|3893| 	else if (!msg.starting || msg.error)
|3894|    |-		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg});
|    |3894|+		this.UnitFsm.ProcessMessage(this, {"type": "MoveCompleted", "data": msg });
|3895|3895| };
|3896|3896| 
|3897|3897| UnitAI.prototype.OnGlobalConstructionFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3899|3899| 	// TODO: This is a bit inefficient since every unit listens to every
|3900|3900| 	// construction message - ideally we could scope it to only the one we're building
|3901|3901| 
|3902|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3902|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3903|3903| };
|3904|3904| 
|3905|3905| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3899|3899| 	// TODO: This is a bit inefficient since every unit listens to every
|3900|3900| 	// construction message - ideally we could scope it to only the one we're building
|3901|3901| 
|3902|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3902|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3903|3903| };
|3904|3904| 
|3905|3905| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3924|3924| 
|3925|3925| UnitAI.prototype.OnAttacked = function(msg)
|3926|3926| {
|3927|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3927|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3928|3928| };
|3929|3929| 
|3930|3930| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3924|3924| 
|3925|3925| UnitAI.prototype.OnAttacked = function(msg)
|3926|3926| {
|3927|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3927|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3928|3928| };
|3929|3929| 
|3930|3930| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3929|3929| 
|3930|3930| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3931|3931| {
|3932|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3932|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3933|3933| };
|3934|3934| 
|3935|3935| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3929|3929| 
|3930|3930| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3931|3931| {
|3932|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3932|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3933|3933| };
|3934|3934| 
|3935|3935| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3934|3934| 
|3935|3935| UnitAI.prototype.OnHealthChanged = function(msg)
|3936|3936| {
|3937|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3937|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3938|3938| };
|3939|3939| 
|3940|3940| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3934|3934| 
|3935|3935| UnitAI.prototype.OnHealthChanged = function(msg)
|3936|3936| {
|3937|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3937|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3938|3938| };
|3939|3939| 
|3940|3940| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3940|3940| UnitAI.prototype.OnRangeUpdate = function(msg)
|3941|3941| {
|3942|3942| 	if (msg.tag == this.losRangeQuery)
|3943|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3943|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3944|3944| 	else if (msg.tag == this.losHealRangeQuery)
|3945|3945| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3946|3946| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3940|3940| UnitAI.prototype.OnRangeUpdate = function(msg)
|3941|3941| {
|3942|3942| 	if (msg.tag == this.losRangeQuery)
|3943|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3943|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3944|3944| 	else if (msg.tag == this.losHealRangeQuery)
|3945|3945| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3946|3946| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3942|3942| 	if (msg.tag == this.losRangeQuery)
|3943|3943| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3944|3944| 	else if (msg.tag == this.losHealRangeQuery)
|3945|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3945|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3946|3946| };
|3947|3947| 
|3948|3948| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3942|3942| 	if (msg.tag == this.losRangeQuery)
|3943|3943| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3944|3944| 	else if (msg.tag == this.losHealRangeQuery)
|3945|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3945|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3946|3946| };
|3947|3947| 
|3948|3948| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3947|3947| 
|3948|3948| UnitAI.prototype.OnPackFinished = function(msg)
|3949|3949| {
|3950|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3950|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3951|3951| };
|3952|3952| 
|3953|3953| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3947|3947| 
|3948|3948| UnitAI.prototype.OnPackFinished = function(msg)
|3949|3949| {
|3950|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3950|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3951|3951| };
|3952|3952| 
|3953|3953| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3950|3950| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3951|3951| };
|3952|3952| 
|3953|    |-//// Helper functions to be called by the FSM ////
|    |3953|+// // Helper functions to be called by the FSM ////
|3954|3954| 
|3955|3955| UnitAI.prototype.GetWalkSpeed = function()
|3956|3956| {
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4052|4052| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4053|4053| 		return undefined;
|4054|4054| 
|4055|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4055|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4056|4056| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4057|4057| 		return undefined;
|4058|4058| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4137|4137| 			PlaySound(name, member);
|4138|4138| 	}
|4139|4139| 	else
|4140|    |-	{
|    |4140|+	
|4141|4141| 		// Otherwise use our own sounds
|4142|4142| 		PlaySound(name, this.entity);
|4143|    |-	}
|    |4143|+	
|4144|4144| };
|4145|4145| 
|4146|4146| /*
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4306|4306| 	else
|4307|4307| 		// return false? Or hope you come close enough?
|4308|4308| 		var parabolicMaxRange = 0;
|4309|    |-		//return false;
|    |4309|+		// return false;
|4310|4310| 
|4311|4311| 	// the parabole changes while walking, take something in the middle
|4312|4312| 	var guessedMaxRange = (range.max + parabolicMaxRange)/2;
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4371|4371| 	if (this.IsFormationMember())
|4372|4372| 	{
|4373|4373| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4374|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4375|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4374|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4375|+			cmpFormationUnitAI.order.data.target == target)
|4376|4376| 			return true;
|4377|4377| 	}
|4378|4378| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4539|4539| UnitAI.prototype.AttackEntityInZone = function(ents)
|4540|4540| {
|4541|4541| 	var target = ents.find(target =>
|4542|    |-		this.CanAttack(target)
|4543|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4542|+		this.CanAttack(target) &&
|    |4543|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4544|4544| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4545|4545| 	);
|4546|4546| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4540|4540| {
|4541|4541| 	var target = ents.find(target =>
|4542|4542| 		this.CanAttack(target)
|4543|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4544|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4543|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4544|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4545|4545| 	);
|4546|4546| 	if (!target)
|4547|4547| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4604|4604| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4605|4605| 	if (this.isGuardOf)
|4606|4606| 	{
|4607|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4607|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4608|4608| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4609|4609| 		if (cmpUnitAI && cmpAttack &&
|4610|4610| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4608|4608| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4609|4609| 		if (cmpUnitAI && cmpAttack &&
|4610|4610| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4611|    |-				return false;
|    |4611|+			return false;
|4612|4612| 	}
|4613|4613| 
|4614|4614| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4613|4613| 
|4614|4614| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4615|4615| 	if (this.GetStance().respondHoldGround)
|4616|    |-	{
|    |4616|+	
|4617|4617| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4618|4618| 			return true;
|4619|    |-	}
|    |4619|+	
|4620|4620| 
|4621|4621| 	// Stop if it's left our vision range, unless we're especially persistent
|4622|4622| 	if (!this.GetStance().respondChaseBeyondVision)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4620|4620| 
|4621|4621| 	// Stop if it's left our vision range, unless we're especially persistent
|4622|4622| 	if (!this.GetStance().respondChaseBeyondVision)
|4623|    |-	{
|    |4623|+	
|4624|4624| 		if (!this.CheckTargetIsInVisionRange(target))
|4625|4625| 			return true;
|4626|    |-	}
|    |4626|+	
|4627|4627| 
|4628|4628| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4629|4629| 	// and will continue moving to its last seen position and then stop)
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4646|4646| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4647|4647| 	if (this.isGuardOf)
|4648|4648| 	{
|4649|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4649|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4650|4650| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4651|4651| 		if (cmpUnitAI && cmpAttack &&
|4652|4652| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4659|4659| 	return false;
|4660|4660| };
|4661|4661| 
|4662|    |-//// External interface functions ////
|    |4662|+// // External interface functions ////
|4663|4663| 
|4664|4664| UnitAI.prototype.SetFormationController = function(ent)
|4665|4665| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4669|4669| 	// of our own formation (or ourself if not in formation)
|4670|4670| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4671|4671| 	if (cmpObstruction)
|4672|    |-	{
|    |4672|+	
|4673|4673| 		if (ent == INVALID_ENTITY)
|4674|4674| 			cmpObstruction.SetControlGroup(this.entity);
|4675|4675| 		else
|4676|4676| 			cmpObstruction.SetControlGroup(ent);
|4677|    |-	}
|    |4677|+	
|4678|4678| 
|4679|4679| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4680|4680| 	if (ent == INVALID_ENTITY)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4812|4812| 	// if we already had an old guard order, do nothing if the target is the same
|4813|4813| 	// and the order is running, otherwise remove the previous order
|4814|4814| 	if (this.isGuardOf)
|4815|    |-	{
|    |4815|+	
|4816|4816| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4817|4817| 			return;
|4818|4818| 		else
|4819|4819| 			this.RemoveGuard();
|4820|    |-	}
|    |4820|+	
|4821|4821| 
|4822|4822| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4823|4823| };
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4815|4815| 	{
|4816|4816| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4817|4817| 			return;
|4818|    |-		else
|4819|    |-			this.RemoveGuard();
|    |4818|+		this.RemoveGuard();
|4820|4819| 	}
|4821|4820| 
|4822|4821| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4986|4986| 			this.WalkToTarget(target, queued);
|4987|4987| 		return;
|4988|4988| 	}
|4989|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |4989|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|4990|4990| };
|4991|4991| 
|4992|4992| /**
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5135|5135| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5136|5136| 	{
|5137|5137| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5138|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5138|+		if (cmpTrader.HasBothMarkets() &&
|5139|5139| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5140|5140| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5141|5141| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5416|5416| 				{
|5417|5417| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5418|5418| 					var targetClasses = this.order.data.targetClasses;
|5419|    |-					if (targetClasses.attack && cmpIdentity
|5420|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5419|+					if (targetClasses.attack && cmpIdentity &&
|    |5420|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5421|5421| 						continue;
|5422|5422| 					if (targetClasses.avoid && cmpIdentity
|5423|5423| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5419|5419| 					if (targetClasses.attack && cmpIdentity
|5420|5420| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5421|5421| 						continue;
|5422|    |-					if (targetClasses.avoid && cmpIdentity
|5423|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5422|+					if (targetClasses.avoid && cmpIdentity &&
|    |5423|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5424|5424| 						continue;
|5425|5425| 					// Only used by the AIs to prevent some choices of targets
|5426|5426| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5442|5442| 		{
|5443|5443| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5444|5444| 			var targetClasses = this.order.data.targetClasses;
|5445|    |-			if (cmpIdentity && targetClasses.attack
|5446|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5445|+			if (cmpIdentity && targetClasses.attack &&
|    |5446|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5447|5447| 				continue;
|5448|5448| 			if (cmpIdentity && targetClasses.avoid
|5449|5449| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5445|5445| 			if (cmpIdentity && targetClasses.attack
|5446|5446| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5447|5447| 				continue;
|5448|    |-			if (cmpIdentity && targetClasses.avoid
|5449|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5448|+			if (cmpIdentity && targetClasses.avoid &&
|    |5449|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5450|5450| 				continue;
|5451|5451| 			// Only used by the AIs to prevent some choices of targets
|5452|5452| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5588|5588| 
|5589|5589| UnitAI.prototype.SetHeldPosition = function(x, z)
|5590|5590| {
|5591|    |-	this.heldPosition = {"x": x, "z": z};
|    |5591|+	this.heldPosition = { "x": x, "z": z};
|5592|5592| };
|5593|5593| 
|5594|5594| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5588|5588| 
|5589|5589| UnitAI.prototype.SetHeldPosition = function(x, z)
|5590|5590| {
|5591|    |-	this.heldPosition = {"x": x, "z": z};
|    |5591|+	this.heldPosition = {"x": x, "z": z };
|5592|5592| };
|5593|5593| 
|5594|5594| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5615|5615| 	return false;
|5616|5616| };
|5617|5617| 
|5618|    |-//// Helper functions ////
|    |5618|+// // Helper functions ////
|5619|5619| 
|5620|5620| UnitAI.prototype.CanAttack = function(target)
|5621|5621| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5819|5819| 	return cmpPack && cmpPack.IsPacking();
|5820|5820| };
|5821|5821| 
|5822|    |-//// Formation specific functions ////
|    |5822|+// // Formation specific functions ////
|5823|5823| 
|5824|5824| UnitAI.prototype.IsAttackingAsFormation = function()
|5825|5825| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5824|5824| UnitAI.prototype.IsAttackingAsFormation = function()
|5825|5825| {
|5826|5826| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5827|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5828|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5827|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5828|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5829|5829| };
|5830|5830| 
|5831|5831| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5828|5828| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5829|5829| };
|5830|5830| 
|5831|    |-//// Animal specific functions ////
|    |5831|+// // Animal specific functions ////
|5832|5832| 
|5833|5833| UnitAI.prototype.MoveRandomly = function(distance)
|5834|5834| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
|3754| »   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
|4526| »   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
|4541| »   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
|4587| »   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
|4610| »   »   ····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
|5066| »   var·lastPos·=·undefined;
|    | [NORMAL] ESLintBear (no-undef-init):
|    | It's not necessary to initialize 'lastPos' to undefined.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|5446| »   »   »   »   &&·!MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.attack))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|5449| »   »   »   »   &&·MatchesClassList(cmpIdentity.GetClassesList(),·targetClasses.avoid))
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

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

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

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

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

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

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

Angen added a reviewer: Restricted Owners Package.May 14 2019, 11:25 AM
Stan added inline comments.May 14 2019, 11:39 AM
binaries/data/mods/public/simulation/components/UnitAI.js
450

Ternary ?

This is also fixed in D1865 - not sure it's worth committing separately.

Angen abandoned this revision.May 14 2019, 1:21 PM

oh well ok then