Page MenuHomeWildfire Games

Move the controllability of an entity from "UnitAI.js" to "Commands.js" and untie it from whether the entity is an animal.
Needs ReviewPublic

Authored by Freagarach on Jun 8 2019, 7:11 PM.

Details

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

This patch lets players be able to move any unit under their control around. Cf. this thread.
One can add "Uncontrollable" to a entity classes to prevent this behaviour for that unit.

The check whether a unit can be controlled is moved higher up the command-chain, which seems more logical to me.
When the ControllAllUnits-cheat is on, it can still be controlled.

Test Plan
  • Give oneself a non-domestic animal and watch how you can move it around.
  • Add the Uncontrollable class to a entity and see that it cannot be ordered anymore.

Diff Detail

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

Event Timeline

Freagarach created this revision.Jun 8 2019, 7:11 PM
Vulcan added a comment.Jun 8 2019, 7:13 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  35|  35| 
|  36|  36| 
|  37|  37| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  38|    |-		SetInterval: function() { },
|    |  38|+		"SetInterval": function() { },
|  39|  39| 		SetTimeout: function() { },
|  40|  40| 	});
|  41|  41| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  36|  36| 
|  37|  37| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
|  38|  38| 		SetInterval: function() { },
|  39|    |-		SetTimeout: function() { },
|    |  39|+		"SetTimeout": function() { },
|  40|  40| 	});
|  41|  41| 
|  42|  42| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  40|  40| 	});
|  41|  41| 
|  42|  42| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|  43|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    |  43|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
|  44|  44| 			return 1;
|  45|  45| 		},
|  46|  46| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  43|  43| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|  44|  44| 			return 1;
|  45|  45| 		},
|  46|    |-		EnableActiveQuery: function(id) { },
|    |  46|+		"EnableActiveQuery": function(id) { },
|  47|  47| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  48|  48| 		DisableActiveQuery: function(id) { },
|  49|  49| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  44|  44| 			return 1;
|  45|  45| 		},
|  46|  46| 		EnableActiveQuery: function(id) { },
|  47|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  47|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
|  48|  48| 		DisableActiveQuery: function(id) { },
|  49|  49| 		GetEntityFlagMask: function(identifier) { },
|  50|  50| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  44|  44| 			return 1;
|  45|  45| 		},
|  46|  46| 		EnableActiveQuery: function(id) { },
|  47|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    |  47|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
|  48|  48| 		DisableActiveQuery: function(id) { },
|  49|  49| 		GetEntityFlagMask: function(identifier) { },
|  50|  50| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  45|  45| 		},
|  46|  46| 		EnableActiveQuery: function(id) { },
|  47|  47| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  48|    |-		DisableActiveQuery: function(id) { },
|    |  48|+		"DisableActiveQuery": function(id) { },
|  49|  49| 		GetEntityFlagMask: function(identifier) { },
|  50|  50| 	});
|  51|  51| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  46|  46| 		EnableActiveQuery: function(id) { },
|  47|  47| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|  48|  48| 		DisableActiveQuery: function(id) { },
|  49|    |-		GetEntityFlagMask: function(identifier) { },
|    |  49|+		"GetEntityFlagMask": function(identifier) { },
|  50|  50| 	});
|  51|  51| 
|  52|  52| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  50|  50| 	});
|  51|  51| 
|  52|  52| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|  53|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    |  53|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
|  54|  54| 	});
|  55|  55| 
|  56|  56| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  54|  54| 	});
|  55|  55| 
|  56|  56| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  57|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    |  57|+		"GetPlayerByID": function(id) { return playerEntity; },
|  58|  58| 		GetNumPlayers: function() { return 2; },
|  59|  59| 	});
|  60|  60| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  55|  55| 
|  56|  56| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|  57|  57| 		GetPlayerByID: function(id) { return playerEntity; },
|  58|    |-		GetNumPlayers: function() { return 2; },
|    |  58|+		"GetNumPlayers": function() { return 2; },
|  59|  59| 	});
|  60|  60| 
|  61|  61| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  59|  59| 	});
|  60|  60| 
|  61|  61| 	AddMock(playerEntity, IID_Player, {
|  62|    |-		IsAlly: function() { return false; },
|    |  62|+		"IsAlly": function() { return false; },
|  63|  63| 		IsEnemy: function() { return true; },
|  64|  64| 		GetEnemies: function() { return []; },
|  65|  65| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  60|  60| 
|  61|  61| 	AddMock(playerEntity, IID_Player, {
|  62|  62| 		IsAlly: function() { return false; },
|  63|    |-		IsEnemy: function() { return true; },
|    |  63|+		"IsEnemy": function() { return true; },
|  64|  64| 		GetEnemies: function() { return []; },
|  65|  65| 	});
|  66|  66| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  61|  61| 	AddMock(playerEntity, IID_Player, {
|  62|  62| 		IsAlly: function() { return false; },
|  63|  63| 		IsEnemy: function() { return true; },
|  64|    |-		GetEnemies: function() { return []; },
|    |  64|+		"GetEnemies": function() { return []; },
|  65|  65| 	});
|  66|  66| 
|  67|  67| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  71|  71| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Identity, {
|  74|    |-		GetClassesList: function() { return []; },
|    |  74|+		"GetClassesList": function() { return []; },
|  75|  75| 		HasClass: function() { return false; },
|  76|  76| 	});
|  77|  77| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'HasClass' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  72|  72| 
|  73|  73| 	AddMock(unit, IID_Identity, {
|  74|  74| 		GetClassesList: function() { return []; },
|  75|    |-		HasClass: function() { return false; },
|    |  75|+		"HasClass": function() { return false; },
|  76|  76| 	});
|  77|  77| 
|  78|  78| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  76|  76| 	});
|  77|  77| 
|  78|  78| 	AddMock(unit, IID_Ownership, {
|  79|    |-		GetOwner: function() { return 1; },
|    |  79|+		"GetOwner": function() { return 1; },
|  80|  80| 	});
|  81|  81| 
|  82|  82| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  80|  80| 	});
|  81|  81| 
|  82|  82| 	AddMock(unit, IID_Position, {
|  83|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    |  83|+		"GetTurretParent": function() { return INVALID_ENTITY; },
|  84|  84| 		GetPosition: function() { return new Vector3D(); },
|  85|  85| 		GetPosition2D: function() { return new Vector2D(); },
|  86|  86| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  81|  81| 
|  82|  82| 	AddMock(unit, IID_Position, {
|  83|  83| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  84|    |-		GetPosition: function() { return new Vector3D(); },
|    |  84|+		"GetPosition": function() { return new Vector3D(); },
|  85|  85| 		GetPosition2D: function() { return new Vector2D(); },
|  86|  86| 		GetRotation: function() { return { "y": 0 }; },
|  87|  87| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  82|  82| 	AddMock(unit, IID_Position, {
|  83|  83| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  84|  84| 		GetPosition: function() { return new Vector3D(); },
|  85|    |-		GetPosition2D: function() { return new Vector2D(); },
|    |  85|+		"GetPosition2D": function() { return new Vector2D(); },
|  86|  86| 		GetRotation: function() { return { "y": 0 }; },
|  87|  87| 		IsInWorld: function() { return true; },
|  88|  88| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  83|  83| 		GetTurretParent: function() { return INVALID_ENTITY; },
|  84|  84| 		GetPosition: function() { return new Vector3D(); },
|  85|  85| 		GetPosition2D: function() { return new Vector2D(); },
|  86|    |-		GetRotation: function() { return { "y": 0 }; },
|    |  86|+		"GetRotation": function() { return { "y": 0 }; },
|  87|  87| 		IsInWorld: function() { return true; },
|  88|  88| 	});
|  89|  89| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  84|  84| 		GetPosition: function() { return new Vector3D(); },
|  85|  85| 		GetPosition2D: function() { return new Vector2D(); },
|  86|  86| 		GetRotation: function() { return { "y": 0 }; },
|  87|    |-		IsInWorld: function() { return true; },
|    |  87|+		"IsInWorld": function() { return true; },
|  88|  88| 	});
|  89|  89| 
|  90|  90| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  96|  96| 	});
|  97|  97| 
|  98|  98| 	AddMock(unit, IID_Vision, {
|  99|    |-		GetRange: function() { return 10; },
|    |  99|+		"GetRange": function() { return 10; },
| 100| 100| 	});
| 101| 101| 
| 102| 102| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 100| 100| 	});
| 101| 101| 
| 102| 102| 	AddMock(unit, IID_Attack, {
| 103|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 103|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 104| 104| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 105| 105| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 106| 106| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 100| 100| 	});
| 101| 101| 
| 102| 102| 	AddMock(unit, IID_Attack, {
| 103|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 103|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 104| 104| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 105| 105| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 106| 106| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 101| 101| 
| 102| 102| 	AddMock(unit, IID_Attack, {
| 103| 103| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 104|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 104|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 105| 105| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 106| 106| 		GetPreference: function(t) { return 0; },
| 107| 107| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 101| 101| 
| 102| 102| 	AddMock(unit, IID_Attack, {
| 103| 103| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 104|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 104|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 105| 105| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 106| 106| 		GetPreference: function(t) { return 0; },
| 107| 107| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 102| 102| 	AddMock(unit, IID_Attack, {
| 103| 103| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 104| 104| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 105|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 105|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 106| 106| 		GetPreference: function(t) { return 0; },
| 107| 107| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 108| 108| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 103| 103| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 104| 104| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 105| 105| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 106|    |-		GetPreference: function(t) { return 0; },
|    | 106|+		"GetPreference": function(t) { return 0; },
| 107| 107| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 108| 108| 		CanAttack: function(v) { return true; },
| 109| 109| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 104| 104| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 105| 105| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 106| 106| 		GetPreference: function(t) { return 0; },
| 107|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 107|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 108| 108| 		CanAttack: function(v) { return true; },
| 109| 109| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 110| 110| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 105| 105| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 106| 106| 		GetPreference: function(t) { return 0; },
| 107| 107| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 108|    |-		CanAttack: function(v) { return true; },
|    | 108|+		"CanAttack": function(v) { return true; },
| 109| 109| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 110| 110| 	});
| 111| 111| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 106| 106| 		GetPreference: function(t) { return 0; },
| 107| 107| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 108| 108| 		CanAttack: function(v) { return true; },
| 109|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 109|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 110| 110| 	});
| 111| 111| 
| 112| 112| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 117| 117| 	if (mode == 1)
| 118| 118| 	{
| 119| 119| 		AddMock(enemy, IID_Health, {
| 120|    |-			GetHitpoints: function() { return 10; },
|    | 120|+			"GetHitpoints": function() { return 10; },
| 121| 121| 		});
| 122| 122| 		AddMock(enemy, IID_UnitAI, {
| 123| 123| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 120| 120| 			GetHitpoints: function() { return 10; },
| 121| 121| 		});
| 122| 122| 		AddMock(enemy, IID_UnitAI, {
| 123|    |-			IsAnimal: function() { return false; }
|    | 123|+			"IsAnimal": function() { return false; }
| 124| 124| 		});
| 125| 125| 	}
| 126| 126| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 125| 125| 	}
| 126| 126| 	else if (mode == 2)
| 127| 127| 		AddMock(enemy, IID_Health, {
| 128|    |-			GetHitpoints: function() { return 0; },
|    | 128|+			"GetHitpoints": function() { return 0; },
| 129| 129| 		});
| 130| 130| 
| 131| 131| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 			GetHitpoints: function() { return 0; },
| 129| 129| 		});
| 130| 130| 
| 131|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 131|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 132| 132| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 133| 133| 
| 134| 134| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 			GetHitpoints: function() { return 0; },
| 129| 129| 		});
| 130| 130| 
| 131|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 131|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 132| 132| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 133| 133| 
| 134| 134| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 132| 132| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 133| 133| 
| 134| 134| 	AddMock(controller, IID_Position, {
| 135|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 135|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 136| 136| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 137| 137| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 138| 138| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 
| 134| 134| 	AddMock(controller, IID_Position, {
| 135| 135| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 136|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 136|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 137| 137| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 138| 138| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 139| 139| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 134| 134| 	AddMock(controller, IID_Position, {
| 135| 135| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 136| 136| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 137|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 137|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 138| 138| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 139| 139| 		GetRotation: function() { return { "y": 0 }; },
| 140| 140| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 135| 135| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 136| 136| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 137| 137| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 138|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 138|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 139| 139| 		GetRotation: function() { return { "y": 0 }; },
| 140| 140| 		IsInWorld: function() { return true; },
| 141| 141| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 136| 136| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 137| 137| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 138| 138| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 139|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 139|+		"GetRotation": function() { return { "y": 0 }; },
| 140| 140| 		IsInWorld: function() { return true; },
| 141| 141| 	});
| 142| 142| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 138| 138| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 139| 139| 		GetRotation: function() { return { "y": 0 }; },
| 140|    |-		IsInWorld: function() { return true; },
|    | 140|+		"IsInWorld": function() { return true; },
| 141| 141| 	});
| 142| 142| 
| 143| 143| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 185| 185| 	var unitAIs = [];
| 186| 186| 
| 187| 187| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 188|    |-		SetInterval: function() { },
|    | 188|+		"SetInterval": function() { },
| 189| 189| 		SetTimeout: function() { },
| 190| 190| 	});
| 191| 191| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 186| 186| 
| 187| 187| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 188| 188| 		SetInterval: function() { },
| 189|    |-		SetTimeout: function() { },
|    | 189|+		"SetTimeout": function() { },
| 190| 190| 	});
| 191| 191| 
| 192| 192| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 191| 191| 
| 192| 192| 
| 193| 193| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 194|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 194|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 195| 195| 			return 1;
| 196| 196| 		},
| 197| 197| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 194| 194| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 195| 195| 			return 1;
| 196| 196| 		},
| 197|    |-		EnableActiveQuery: function(id) { },
|    | 197|+		"EnableActiveQuery": function(id) { },
| 198| 198| 		ResetActiveQuery: function(id) { return [enemy]; },
| 199| 199| 		DisableActiveQuery: function(id) { },
| 200| 200| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 195| 195| 			return 1;
| 196| 196| 		},
| 197| 197| 		EnableActiveQuery: function(id) { },
| 198|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 198|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 199| 199| 		DisableActiveQuery: function(id) { },
| 200| 200| 		GetEntityFlagMask: function(identifier) { },
| 201| 201| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 196| 196| 		},
| 197| 197| 		EnableActiveQuery: function(id) { },
| 198| 198| 		ResetActiveQuery: function(id) { return [enemy]; },
| 199|    |-		DisableActiveQuery: function(id) { },
|    | 199|+		"DisableActiveQuery": function(id) { },
| 200| 200| 		GetEntityFlagMask: function(identifier) { },
| 201| 201| 	});
| 202| 202| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 197| 197| 		EnableActiveQuery: function(id) { },
| 198| 198| 		ResetActiveQuery: function(id) { return [enemy]; },
| 199| 199| 		DisableActiveQuery: function(id) { },
| 200|    |-		GetEntityFlagMask: function(identifier) { },
|    | 200|+		"GetEntityFlagMask": function(identifier) { },
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 201| 201| 	});
| 202| 202| 
| 203| 203| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 204|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 204|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 205| 205| 	});
| 206| 206| 
| 207| 207| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 205| 205| 	});
| 206| 206| 
| 207| 207| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 208|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 208|+		"GetPlayerByID": function(id) { return playerEntity; },
| 209| 209| 		GetNumPlayers: function() { return 2; },
| 210| 210| 	});
| 211| 211| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 206| 206| 
| 207| 207| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 208| 208| 		GetPlayerByID: function(id) { return playerEntity; },
| 209|    |-		GetNumPlayers: function() { return 2; },
|    | 209|+		"GetNumPlayers": function() { return 2; },
| 210| 210| 	});
| 211| 211| 
| 212| 212| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 214| 214| 	});
| 215| 215| 
| 216| 216| 	AddMock(playerEntity, IID_Player, {
| 217|    |-		IsAlly: function() { return false; },
|    | 217|+		"IsAlly": function() { return false; },
| 218| 218| 		IsEnemy: function() { return true; },
| 219| 219| 		GetEnemies: function() { return []; },
| 220| 220| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 215| 215| 
| 216| 216| 	AddMock(playerEntity, IID_Player, {
| 217| 217| 		IsAlly: function() { return false; },
| 218|    |-		IsEnemy: function() { return true; },
|    | 218|+		"IsEnemy": function() { return true; },
| 219| 219| 		GetEnemies: function() { return []; },
| 220| 220| 	});
| 221| 221| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 216| 216| 	AddMock(playerEntity, IID_Player, {
| 217| 217| 		IsAlly: function() { return false; },
| 218| 218| 		IsEnemy: function() { return true; },
| 219|    |-		GetEnemies: function() { return []; },
|    | 219|+		"GetEnemies": function() { return []; },
| 220| 220| 	});
| 221| 221| 
| 222| 222| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 227| 227| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Identity, {
| 230|    |-			GetClassesList: function() { return []; },
|    | 230|+			"GetClassesList": function() { return []; },
| 231| 231| 			HasClass: function() { return false; },
| 232| 232| 		});
| 233| 233| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'HasClass' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 228| 228| 
| 229| 229| 		AddMock(unit + i, IID_Identity, {
| 230| 230| 			GetClassesList: function() { return []; },
| 231|    |-			HasClass: function() { return false; },
|    | 231|+			"HasClass": function() { return false; },
| 232| 232| 		});
| 233| 233| 
| 234| 234| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 232| 232| 		});
| 233| 233| 
| 234| 234| 		AddMock(unit + i, IID_Ownership, {
| 235|    |-			GetOwner: function() { return 1; },
|    | 235|+			"GetOwner": function() { return 1; },
| 236| 236| 		});
| 237| 237| 
| 238| 238| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 236| 236| 		});
| 237| 237| 
| 238| 238| 		AddMock(unit + i, IID_Position, {
| 239|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 239|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 240| 240| 			GetPosition: function() { return new Vector3D(); },
| 241| 241| 			GetPosition2D: function() { return new Vector2D(); },
| 242| 242| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 237| 237| 
| 238| 238| 		AddMock(unit + i, IID_Position, {
| 239| 239| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 240|    |-			GetPosition: function() { return new Vector3D(); },
|    | 240|+			"GetPosition": function() { return new Vector3D(); },
| 241| 241| 			GetPosition2D: function() { return new Vector2D(); },
| 242| 242| 			GetRotation: function() { return { "y": 0 }; },
| 243| 243| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 238| 238| 		AddMock(unit + i, IID_Position, {
| 239| 239| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 240| 240| 			GetPosition: function() { return new Vector3D(); },
| 241|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 241|+			"GetPosition2D": function() { return new Vector2D(); },
| 242| 242| 			GetRotation: function() { return { "y": 0 }; },
| 243| 243| 			IsInWorld: function() { return true; },
| 244| 244| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 239| 239| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 240| 240| 			GetPosition: function() { return new Vector3D(); },
| 241| 241| 			GetPosition2D: function() { return new Vector2D(); },
| 242|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 242|+			"GetRotation": function() { return { "y": 0 }; },
| 243| 243| 			IsInWorld: function() { return true; },
| 244| 244| 		});
| 245| 245| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 240| 240| 			GetPosition: function() { return new Vector3D(); },
| 241| 241| 			GetPosition2D: function() { return new Vector2D(); },
| 242| 242| 			GetRotation: function() { return { "y": 0 }; },
| 243|    |-			IsInWorld: function() { return true; },
|    | 243|+			"IsInWorld": function() { return true; },
| 244| 244| 		});
| 245| 245| 
| 246| 246| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 252| 252| 		});
| 253| 253| 
| 254| 254| 		AddMock(unit + i, IID_Vision, {
| 255|    |-			GetRange: function() { return 10; },
|    | 255|+			"GetRange": function() { return 10; },
| 256| 256| 		});
| 257| 257| 
| 258| 258| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 256| 256| 		});
| 257| 257| 
| 258| 258| 		AddMock(unit + i, IID_Attack, {
| 259|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 259|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 260| 260| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 256| 256| 		});
| 257| 257| 
| 258| 258| 		AddMock(unit + i, IID_Attack, {
| 259|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 259|+			GetRange: function() { return { "max":10, "min": 0}; },
| 260| 260| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 256| 256| 		});
| 257| 257| 
| 258| 258| 		AddMock(unit + i, IID_Attack, {
| 259|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 259|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 260| 260| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 256| 256| 		});
| 257| 257| 
| 258| 258| 		AddMock(unit + i, IID_Attack, {
| 259|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 259|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 260| 260| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 257| 257| 
| 258| 258| 		AddMock(unit + i, IID_Attack, {
| 259| 259| 			GetRange: function() { return {"max":10, "min": 0}; },
| 260|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 260|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 263| 263| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 257| 257| 
| 258| 258| 		AddMock(unit + i, IID_Attack, {
| 259| 259| 			GetRange: function() { return {"max":10, "min": 0}; },
| 260|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 260|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 263| 263| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 258| 258| 		AddMock(unit + i, IID_Attack, {
| 259| 259| 			GetRange: function() { return {"max":10, "min": 0}; },
| 260| 260| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 261|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 261|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 263| 263| 			CanAttack: function(v) { return true; },
| 264| 264| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 259| 259| 			GetRange: function() { return {"max":10, "min": 0}; },
| 260| 260| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 262|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 263| 263| 			CanAttack: function(v) { return true; },
| 264| 264| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 265| 265| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 260| 260| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 263|    |-			CanAttack: function(v) { return true; },
|    | 263|+			"CanAttack": function(v) { return true; },
| 264| 264| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 265| 265| 		});
| 266| 266| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 261| 261| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 262| 262| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 263| 263| 			CanAttack: function(v) { return true; },
| 264|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 264|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 265| 265| 		});
| 266| 266| 
| 267| 267| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 273| 273| 
| 274| 274| 	// create enemy
| 275| 275| 	AddMock(enemy, IID_Health, {
| 276|    |-		GetHitpoints: function() { return 40; },
|    | 276|+		"GetHitpoints": function() { return 40; },
| 277| 277| 	});
| 278| 278| 
| 279| 279| 	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 276| 276| 		GetHitpoints: function() { return 40; },
| 277| 277| 	});
| 278| 278| 
| 279|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 279|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 280| 280| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 281| 281| 
| 282| 282| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 276| 276| 		GetHitpoints: function() { return 40; },
| 277| 277| 	});
| 278| 278| 
| 279|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 279|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 280| 280| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 281| 281| 
| 282| 282| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 280| 280| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 281| 281| 
| 282| 282| 	AddMock(controller, IID_Position, {
| 283|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 283|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 284| 284| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 285| 285| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 286| 286| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 281| 281| 
| 282| 282| 	AddMock(controller, IID_Position, {
| 283| 283| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 284|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 284|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 285| 285| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 286| 286| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 287| 287| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 	AddMock(controller, IID_Position, {
| 283| 283| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 284| 284| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 285|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 285|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 286| 286| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 287| 287| 		GetRotation: function() { return { "y": 0 }; },
| 288| 288| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 284| 284| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 285| 285| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 286|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 286|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 287| 287| 		GetRotation: function() { return { "y": 0 }; },
| 288| 288| 		IsInWorld: function() { return true; },
| 289| 289| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 284| 284| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 285| 285| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 286| 286| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 287|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 287|+		"GetRotation": function() { return { "y": 0 }; },
| 288| 288| 		IsInWorld: function() { return true; },
| 289| 289| 	});
| 290| 290| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 285| 285| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 286| 286| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 287| 287| 		GetRotation: function() { return { "y": 0 }; },
| 288|    |-		IsInWorld: function() { return true; },
|    | 288|+		"IsInWorld": function() { return true; },
| 289| 289| 	});
| 290| 290| 
| 291| 291| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 297| 297| 	});
| 298| 298| 
| 299| 299| 	AddMock(controller, IID_Attack, {
| 300|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 300|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 301| 301| 		CanAttackAsFormation: function() { return false; },
| 302| 302| 	});
| 303| 303| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 297| 297| 	});
| 298| 298| 
| 299| 299| 	AddMock(controller, IID_Attack, {
| 300|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 300|+		GetRange: function() { return { "max":10, "min": 0}; },
| 301| 301| 		CanAttackAsFormation: function() { return false; },
| 302| 302| 	});
| 303| 303| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 297| 297| 	});
| 298| 298| 
| 299| 299| 	AddMock(controller, IID_Attack, {
| 300|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 300|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 301| 301| 		CanAttackAsFormation: function() { return false; },
| 302| 302| 	});
| 303| 303| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 297| 297| 	});
| 298| 298| 
| 299| 299| 	AddMock(controller, IID_Attack, {
| 300|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 300|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 301| 301| 		CanAttackAsFormation: function() { return false; },
| 302| 302| 	});
| 303| 303| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 298| 298| 
| 299| 299| 	AddMock(controller, IID_Attack, {
| 300| 300| 		GetRange: function() { return {"max":10, "min": 0}; },
| 301|    |-		CanAttackAsFormation: function() { return false; },
|    | 301|+		"CanAttackAsFormation": function() { return false; },
| 302| 302| 	});
| 303| 303| 
| 304| 304| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 310| 310| 	for (var ent of unitAIs)
| 311| 311| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 312| 312| 
| 313|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 313|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 314| 314| 
| 315| 315| 	// let all units be in position
| 316| 316| 	for (var ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 310| 310| 	for (var ent of unitAIs)
| 311| 311| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 312| 312| 
| 313|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 313|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 314| 314| 
| 315| 315| 	// let all units be in position
| 316| 316| 	for (var ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|  47| »   »   ResetActiveQuery:·function(id)·{·if·(mode·==·0)·return·[];·else·return·[enemy];·},
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Closing curly brace appears on the same line as the subsequent block.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 223| »   for·(var·i·=·0;·i·<·unitCount;·i++)·{
|    | [NORMAL] ESLintBear (brace-rules/brace-on-same-line):
|    | Opening curly brace appears on the same line as controlling statement.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 316| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 319| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 311| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 320| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 351| 351| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 352| 352| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 353| 353| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 354|    |-		{
|    | 354|+		
| 355| 355| 			// we were already on the shoreline, and have not moved since
| 356| 356| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 357| 357| 				needToMove = false;
| 358|    |-		}
|    | 358|+		
| 359| 359| 
| 360| 360| 		if (needToMove)
| 361| 361| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 349| 349| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 350| 350| 		var needToMove = true;
| 351| 351| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 352|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 353|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 352|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 353|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 354| 354| 		{
| 355| 355| 			// we were already on the shoreline, and have not moved since
| 356| 356| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 520| 520| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 521| 521| 				}
| 522| 522| 				else
| 523|    |-				{
|    | 523|+				
| 524| 524| 					// We couldn't move there, or the target moved away
| 525| 525| 					this.FinishOrder();
| 526|    |-				}
|    | 526|+				
| 527| 527| 				return;
| 528| 528| 			}
| 529| 529| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 795| 795| 			}
| 796| 796| 			// Check if we are already in range, otherwise walk there
| 797| 797| 			if (!this.CheckGarrisonRange(msg.data.target))
| 798|    |-			{
|    | 798|+			
| 799| 799| 				if (!this.CheckTargetVisible(msg.data.target))
| 800| 800| 				{
| 801| 801| 					this.FinishOrder();
| 806| 806| 					this.SetNextState("GARRISON.APPROACHING");
| 807| 807| 					return;
| 808| 808| 				}
| 809|    |-			}
|    | 809|+			
| 810| 810| 
| 811| 811| 			this.SetNextState("GARRISON.GARRISONING");
| 812| 812| 		},
|    | [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
| 801| 801| 					this.FinishOrder();
| 802| 802| 					return;
| 803| 803| 				}
| 804|    |-				else
| 805|    |-				{
|    | 804|+				
| 806| 805| 					this.SetNextState("GARRISON.APPROACHING");
| 807| 806| 					return;
| 808|    |-				}
|    | 807|+				
| 809| 808| 			}
| 810| 809| 
| 811| 810| 			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
| 824| 824| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 825| 825| 					}
| 826| 826| 					else
| 827|    |-					{
|    | 827|+					
| 828| 828| 						// We couldn't move there, or the target moved away
| 829| 829| 						this.FinishOrder();
| 830|    |-					}
|    | 830|+					
| 831| 831| 					return;
| 832| 832| 				}
| 833| 833| 
|    | [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
|1055|1055| 			},
|1056|1056| 		},
|1057|1057| 
|1058|    |-		"GARRISON":{
|    |1058|+		"GARRISON": {
|1059|1059| 			"enter": function() {
|1060|1060| 				// If the garrisonholder should pickup, warn it so it can take needed action
|1061|1061| 				var cmpGarrisonHolder = Engine.QueryInterface(this.order.data.target, IID_GarrisonHolder);
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1266|1266| 			// If the controller handled an order but some members rejected it,
|1267|1267| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1268|1268| 			if (this.orderQueue.length)
|1269|    |-			{
|    |1269|+			
|1270|1270| 				// We're leaving the formation, so stop our FormationWalk order
|1271|1271| 				if (this.FinishOrder())
|1272|1272| 					return;
|1273|    |-			}
|    |1273|+			
|1274|1274| 
|1275|1275| 			// No orders left, we're an individual now
|1276|1276| 			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
|1294|1294| 			// Move a tile outside the building
|1295|1295| 			let range = 4;
|1296|1296| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1297|    |-			{
|    |1297|+			
|1298|1298| 				// We are already at the target, or can't move at all
|1299|1299| 				this.FinishOrder();
|1300|    |-			}
|    |1300|+			
|1301|1301| 			else
|1302|1302| 			{
|1303|1303| 				this.order.data.min = range;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1509|1509| 
|1510|1510| 			"LosRangeUpdate": function(msg) {
|1511|1511| 				if (this.GetStance().targetVisibleEnemies)
|1512|    |-				{
|    |1512|+				
|1513|1513| 					// Start attacking one of the newly-seen enemy (if any)
|1514|1514| 					this.AttackEntitiesByPreference(msg.data.added);
|1515|    |-				}
|    |1515|+				
|1516|1516| 			},
|1517|1517| 
|1518|1518| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1542|1542| 				this.SelectAnimation("move");
|1543|1543| 			},
|1544|1544| 
|1545|    |-			"leave": function () {
|    |1545|+			"leave": function() {
|1546|1546| 				this.SelectAnimation("idle");
|1547|1547| 				this.StopMoving();
|1548|1548| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1718|1718| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1719|1719| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1720|1720| 						if (cmpHealth && cmpHealth.IsInjured())
|1721|    |-						{
|    |1721|+						
|1722|1722| 							if (this.CanHeal(this.isGuardOf))
|1723|1723| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1724|1724| 							else if (this.CanRepair(this.isGuardOf))
|1725|1725| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1726|    |-						}
|    |1726|+						
|1727|1727| 					}
|1728|1728| 				},
|1729|1729| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1821|1821| 				"MoveCompleted": function() {
|1822|1822| 
|1823|1823| 					if (this.CheckTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1824|    |-					{
|    |1824|+					
|1825|1825| 						// If the unit needs to unpack, do so
|1826|1826| 						if (this.CanUnpack())
|1827|1827| 						{
|1830|1830| 						}
|1831|1831| 						else
|1832|1832| 							this.SetNextState("ATTACKING");
|1833|    |-					}
|    |1833|+					
|1834|1834| 					else
|1835|1835| 					{
|1836|1836| 						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
|1828|1828| 							this.PushOrderFront("Unpack", { "force": true });
|1829|1829| 							return;
|1830|1830| 						}
|1831|    |-						else
|1832|    |-							this.SetNextState("ATTACKING");
|    |1831|+						this.SetNextState("ATTACKING");
|1833|1832| 					}
|1834|1833| 					else
|1835|1834| 					{
|    | [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
|1832|1832| 							this.SetNextState("ATTACKING");
|1833|1833| 					}
|1834|1834| 					else
|1835|    |-					{
|    |1835|+					
|1836|1836| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1837|1837| 						{
|1838|1838| 							this.SetNextState("APPROACHING");
|1842|1842| 							// Give up
|1843|1843| 							this.FinishOrder();
|1844|1844| 						}
|1845|    |-					}
|    |1845|+					
|1846|1846| 				},
|1847|1847| 			},
|1848|1848| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1834|1834| 					else
|1835|1835| 					{
|1836|1836| 						if (this.MoveToTargetAttackRange(this.order.data.target, this.order.data.attackType))
|1837|    |-						{
|    |1837|+						
|1838|1838| 							this.SetNextState("APPROACHING");
|1839|    |-						}
|    |1839|+						
|1840|1840| 						else
|1841|1841| 						{
|1842|1842| 							// 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
|1838|1838| 							this.SetNextState("APPROACHING");
|1839|1839| 						}
|1840|1840| 						else
|1841|    |-						{
|    |1841|+						
|1842|1842| 							// Give up
|1843|1843| 							this.FinishOrder();
|1844|    |-						}
|    |1844|+						
|1845|1845| 					}
|1846|1846| 				},
|1847|1847| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1859|1859| 					}
|1860|1860| 					// Check the target is still alive and attackable
|1861|1861| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1862|    |-					{
|    |1862|+					
|1863|1863| 						// Can't reach it - try to chase after it
|1864|1864| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1865|1865| 						{
|1874|1874| 								return true;
|1875|1875| 							}
|1876|1876| 						}
|1877|    |-					}
|    |1877|+					
|1878|1878| 
|1879|1879| 					this.StopMoving();
|1880|1880| 
|    | [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
|1907|1907| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1908|1908| 
|1909|1909| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1910|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1910|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1911|1911| 
|1912|1912| 					this.FaceTowardsTarget(this.order.data.target);
|1913|1913| 
|    | [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
|2036|2036| 
|2037|2037| 				"Attacked": function(msg) {
|2038|2038| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2039|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2040|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2039|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2040|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2041|2041| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2042|2042| 				},
|2043|2043| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2056|2056| 					this.SelectAnimation("move");
|2057|2057| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|2058|2058| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|2059|    |-					{
|    |2059|+					
|2060|2060| 						// Run after a fleeing target
|2061|2061| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|2062|    |-					}
|    |2062|+					
|2063|2063| 					this.StartTimer(1000, 1000);
|2064|2064| 				},
|2065|2065| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2239|2239| 
|2240|2240| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2241|2241| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2242|    |-					{
|    |2242|+					
|2243|2243| 						// Check we can still reach and gather from the target
|2244|2244| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2245|2245| 						{
|2304|2304| 								return;
|2305|2305| 							}
|2306|2306| 						}
|2307|    |-					}
|    |2307|+					
|2308|2308| 
|2309|2309| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2310|2310| 
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2330|2330| 					// Also don't switch to a different type of huntable animal
|2331|2331| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2332|2332| 						return (
|2333|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2334|    |-							|| (type.specific == resourceType.specific
|    |2333|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2334|+							(type.specific == resourceType.specific
|2335|2335| 							&& (type.specific != "meat" || resourceTemplate == template))
|2336|2336| 						);
|2337|2337| 					});
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2331|2331| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2332|2332| 						return (
|2333|2333| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2334|    |-							|| (type.specific == resourceType.specific
|2335|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2334|+							|| (type.specific == resourceType.specific &&
|    |2335|+							(type.specific != "meat" || resourceTemplate == template))
|2336|2336| 						);
|2337|2337| 					});
|2338|2338| 					if (nearby)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2396|2396| 
|2397|2397| 				"Timer": function(msg) {
|2398|2398| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2399|    |-					{
|    |2399|+					
|2400|2400| 						// Return to our original position unless we have a better order.
|2401|2401| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2402|2402| 							this.WalkToHeldPosition();
|2403|    |-					}
|    |2403|+					
|2404|2404| 				},
|2405|2405| 
|2406|2406| 				"MoveCompleted": function() {
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2430|2430| 					this.StartTimer(prepare, this.healTimers.repeat);
|2431|2431| 
|2432|2432| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2433|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2433|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2434|2434| 
|2435|2435| 					this.FaceTowardsTarget(this.order.data.target);
|2436|2436| 				},
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2642|2642| 					{
|2643|2643| 						// The building was already finished/fully repaired before we arrived;
|2644|2644| 						// let the ConstructionFinished handler handle this.
|2645|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2645|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2646|2646| 						return true;
|2647|2647| 					}
|2648|2648| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2642|2642| 					{
|2643|2643| 						// The building was already finished/fully repaired before we arrived;
|2644|2644| 						// let the ConstructionFinished handler handle this.
|2645|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2645|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2646|2646| 						return true;
|2647|2647| 					}
|2648|2648| 
|    | [NORMAL] ESLintBear (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
|2685|2685| 					if (!inRange && this.MoveToTargetRange(this.repairTarget, IID_Builder))
|2686|2686| 						this.SetNextState("APPROACHING");
|2687|2687| 					else if (!inRange)
|2688|    |-						this.FinishOrder(); //can't approach and isn't in reach
|    |2688|+						this.FinishOrder(); // can't approach and isn't in reach
|2689|2689| 				},
|2690|2690| 			},
|2691|2691| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2772|2772| 
|2773|2773| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2774|2774| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2775|    |-				{
|    |2775|+				
|2776|2776| 					// We're already walking to the given point, so add this as a order.
|2777|2777| 					this.WalkToTarget(msg.data.newentity, true);
|2778|    |-				}
|    |2778|+				
|2779|2779| 			},
|2780|2780| 		},
|2781|2781| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2834|2834| 
|2835|2835| 					// Check that we can garrison here
|2836|2836| 					if (this.CanGarrison(target))
|2837|    |-					{
|    |2837|+					
|2838|2838| 						// Check that we're in range of the garrison target
|2839|2839| 						if (this.CheckGarrisonRange(target))
|2840|2840| 						{
|2910|2910| 								return false;
|2911|2911| 							}
|2912|2912| 						}
|2913|    |-					}
|    |2913|+					
|2914|2914| 					// Garrisoning failed for some reason, so finish the order
|2915|2915| 					this.FinishOrder();
|2916|2916| 					return true;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3031|3031| 		"Attacked": function(msg) {
|3032|3032| 			if (this.template.NaturalBehaviour == "skittish" ||
|3033|3033| 			    this.template.NaturalBehaviour == "passive")
|3034|    |-			{
|    |3034|+			
|3035|3035| 				this.Flee(msg.data.attacker, false);
|3036|    |-			}
|    |3036|+			
|3037|3037| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|3038|3038| 			{
|3039|3039| 				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
|3040|3040| 					this.Attack(msg.data.attacker, false);
|3041|3041| 			}
|3042|3042| 			else if (this.template.NaturalBehaviour == "domestic")
|3043|    |-			{
|    |3043|+			
|3044|3044| 				// Never flee, stop what we were doing
|3045|3045| 				this.SetNextState("IDLE");
|3046|    |-			}
|    |3046|+			
|3047|3047| 		},
|3048|3048| 
|3049|3049| 		"Order.LeaveFoundation": function(msg) {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3054|3054| 				this.FinishOrder();
|3055|3055| 				return;
|3056|3056| 			}
|3057|    |-			else
|3058|    |-			{
|    |3057|+			
|3059|3058| 				this.order.data.min = range;
|3060|3059| 				this.SetNextState("WALKING");
|3061|    |-			}
|    |3060|+			
|3062|3061| 		},
|3063|3062| 
|3064|3063| 		"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
|3098|3098| 				}
|3099|3099| 				// Start attacking one of the newly-seen enemy (if any)
|3100|3100| 				else if (this.IsDangerousAnimal())
|3101|    |-				{
|    |3101|+				
|3102|3102| 					this.AttackVisibleEntity(msg.data.added);
|3103|    |-				}
|    |3103|+				
|3104|3104| 
|3105|3105| 				// TODO: if two units enter our range together, we'll attack the
|3106|3106| 				// 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
|3141|3141| 				}
|3142|3142| 				// Start attacking one of the newly-seen enemy (if any)
|3143|3143| 				else if (this.template.NaturalBehaviour == "violent")
|3144|    |-				{
|    |3144|+				
|3145|3145| 					this.AttackVisibleEntity(msg.data.added);
|3146|    |-				}
|    |3146|+				
|3147|3147| 			},
|3148|3148| 
|3149|3149| 			"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
|3158|3158| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3159|3159| 
|3160|3160| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3161|    |-							// only used for domestic animals
|    |3161|+		// only used for domestic animals
|3162|3162| 	},
|3163|3163| };
|3164|3164| 
|    | [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
|3215|3215| 
|3216|3216| UnitAI.prototype.IsAnimal = function()
|3217|3217| {
|3218|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3218|+	return (!!this.template.NaturalBehaviour);
|3219|3219| };
|3220|3220| 
|3221|3221| 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
|3259|3259| UnitAI.prototype.GetGarrisonHolder = function()
|3260|3260| {
|3261|3261| 	if (this.IsGarrisoned())
|3262|    |-	{
|    |3262|+	
|3263|3263| 		for (let order of this.orderQueue)
|3264|3264| 			if (order.type == "Garrison")
|3265|3265| 				return order.data.target;
|3266|    |-	}
|    |3266|+	
|3267|3267| 	return INVALID_ENTITY;
|3268|3268| };
|3269|3269| 
|    | [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
|3337|3337| 		{
|3338|3338| 			let index = this.GetCurrentState().indexOf(".");
|3339|3339| 			if (index != -1)
|3340|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3340|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3341|3341| 			this.Stop(false);
|3342|3342| 		}
|3343|3343| 
|    | [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
|3393|3393| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3394|3394| 			continue;
|3395|3395| 		if (i == 0)
|3396|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3396|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3397|3397| 		else
|3398|3398| 			this.orderQueue.splice(i, 1);
|3399|3399| 		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
|3393|3393| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3394|3394| 			continue;
|3395|3395| 		if (i == 0)
|3396|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3396|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3397|3397| 		else
|3398|3398| 			this.orderQueue.splice(i, 1);
|3399|3399| 		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
|3477|3477| };
|3478|3478| 
|3479|3479| 
|3480|    |-//// FSM linkage functions ////
|    |3480|+// // FSM linkage functions ////
|3481|3481| 
|3482|3482| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3483|3483| 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
|3649|3649| 				continue;
|3650|3650| 			if (this.orderQueue[i].type == type)
|3651|3651| 				continue;
|3652|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3652|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3653|3653| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3654|3654| 			return;
|3655|3655| 		}
|    | [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
|3649|3649| 				continue;
|3650|3650| 			if (this.orderQueue[i].type == type)
|3651|3651| 				continue;
|3652|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3652|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3653|3653| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3654|3654| 			return;
|3655|3655| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3663|3663| {
|3664|3664| 	// Remember the previous work orders to be able to go back to them later if required
|3665|3665| 	if (data && data.force)
|3666|    |-	{
|    |3666|+	
|3667|3667| 		if (this.IsFormationController())
|3668|3668| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3669|3669| 		else
|3670|3670| 			this.UpdateWorkOrders(type);
|3671|    |-	}
|    |3671|+	
|3672|3672| 
|3673|3673| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3674|3674| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3740|3740| 	{
|3741|3741| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3742|3742| 		if (cmpUnitAI)
|3743|    |-		{
|    |3743|+		
|3744|3744| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3745|3745| 			{
|3746|3746| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3749|3749| 					return;
|3750|3750| 				}
|3751|3751| 			}
|3752|    |-		}
|    |3752|+		
|3753|3753| 	}
|3754|3754| 
|3755|3755| 	// 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
|3742|3742| 		if (cmpUnitAI)
|3743|3743| 		{
|3744|3744| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3745|    |-			{
|    |3745|+			
|3746|3746| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3747|3747| 				{
|3748|3748| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3749|3749| 					return;
|3750|3750| 				}
|3751|    |-			}
|    |3751|+			
|3752|3752| 		}
|3753|3753| 	}
|3754|3754| 
|    | [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
|3754|3754| 
|3755|3755| 	// If nothing found, take the unit orders
|3756|3756| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3757|    |-	{
|    |3757|+	
|3758|3758| 		if (isWorkType(this.orderQueue[i].type))
|3759|3759| 		{
|3760|3760| 			this.workOrders = this.orderQueue.slice(i);
|3761|3761| 			return;
|3762|3762| 		}
|3763|    |-	}
|    |3763|+	
|3764|3764| };
|3765|3765| 
|3766|3766| 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
|3820|3820| 	if (data.timerRepeat === undefined)
|3821|3821| 		this.timer = undefined;
|3822|3822| 
|3823|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3823|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3824|3824| };
|3825|3825| 
|3826|3826| /**
|    | [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
|3820|3820| 	if (data.timerRepeat === undefined)
|3821|3821| 		this.timer = undefined;
|3822|3822| 
|3823|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3823|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3824|3824| };
|3825|3825| 
|3826|3826| /**
|    | [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
|3855|3855| 	this.timer = undefined;
|3856|3856| };
|3857|3857| 
|3858|    |-//// Message handlers /////
|    |3858|+// // Message handlers /////
|3859|3859| 
|3860|3860| UnitAI.prototype.OnMotionChanged = function(msg)
|3861|3861| {
|    | [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
|3867|3867| 	// TODO: This is a bit inefficient since every unit listens to every
|3868|3868| 	// construction message - ideally we could scope it to only the one we're building
|3869|3869| 
|3870|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3870|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3871|3871| };
|3872|3872| 
|3873|3873| 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
|3867|3867| 	// TODO: This is a bit inefficient since every unit listens to every
|3868|3868| 	// construction message - ideally we could scope it to only the one we're building
|3869|3869| 
|3870|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3870|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3871|3871| };
|3872|3872| 
|3873|3873| 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
|3892|3892| 
|3893|3893| UnitAI.prototype.OnAttacked = function(msg)
|3894|3894| {
|3895|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3895|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3896|3896| };
|3897|3897| 
|3898|3898| 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
|3892|3892| 
|3893|3893| UnitAI.prototype.OnAttacked = function(msg)
|3894|3894| {
|3895|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3895|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3896|3896| };
|3897|3897| 
|3898|3898| 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
|3897|3897| 
|3898|3898| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3899|3899| {
|3900|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3900|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3901|3901| };
|3902|3902| 
|3903|3903| 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
|3897|3897| 
|3898|3898| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3899|3899| {
|3900|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3900|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3901|3901| };
|3902|3902| 
|3903|3903| 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
|3902|3902| 
|3903|3903| UnitAI.prototype.OnHealthChanged = function(msg)
|3904|3904| {
|3905|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3905|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3906|3906| };
|3907|3907| 
|3908|3908| 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
|3902|3902| 
|3903|3903| UnitAI.prototype.OnHealthChanged = function(msg)
|3904|3904| {
|3905|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3905|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3906|3906| };
|3907|3907| 
|3908|3908| 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
|3908|3908| UnitAI.prototype.OnRangeUpdate = function(msg)
|3909|3909| {
|3910|3910| 	if (msg.tag == this.losRangeQuery)
|3911|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3911|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3912|3912| 	else if (msg.tag == this.losHealRangeQuery)
|3913|3913| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3914|3914| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3908|3908| UnitAI.prototype.OnRangeUpdate = function(msg)
|3909|3909| {
|3910|3910| 	if (msg.tag == this.losRangeQuery)
|3911|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3911|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3912|3912| 	else if (msg.tag == this.losHealRangeQuery)
|3913|3913| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3914|3914| };
|    | [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
|3910|3910| 	if (msg.tag == this.losRangeQuery)
|3911|3911| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3912|3912| 	else if (msg.tag == this.losHealRangeQuery)
|3913|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3913|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3914|3914| };
|3915|3915| 
|3916|3916| 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
|3910|3910| 	if (msg.tag == this.losRangeQuery)
|3911|3911| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3912|3912| 	else if (msg.tag == this.losHealRangeQuery)
|3913|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3913|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3914|3914| };
|3915|3915| 
|3916|3916| 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
|3915|3915| 
|3916|3916| UnitAI.prototype.OnPackFinished = function(msg)
|3917|3917| {
|3918|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3918|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3919|3919| };
|3920|3920| 
|3921|3921| //// 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
|3915|3915| 
|3916|3916| UnitAI.prototype.OnPackFinished = function(msg)
|3917|3917| {
|3918|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3918|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3919|3919| };
|3920|3920| 
|3921|3921| //// 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
|3918|3918| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3919|3919| };
|3920|3920| 
|3921|    |-//// Helper functions to be called by the FSM ////
|    |3921|+// // Helper functions to be called by the FSM ////
|3922|3922| 
|3923|3923| UnitAI.prototype.GetWalkSpeed = function()
|3924|3924| {
|    | [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
|4020|4020| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|4021|4021| 		return undefined;
|4022|4022| 
|4023|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |4023|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|4024|4024| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|4025|4025| 		return undefined;
|4026|4026| 
|    | [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
|4105|4105| 			PlaySound(name, member);
|4106|4106| 	}
|4107|4107| 	else
|4108|    |-	{
|    |4108|+	
|4109|4109| 		// Otherwise use our own sounds
|4110|4110| 		PlaySound(name, this.entity);
|4111|    |-	}
|    |4111|+	
|4112|4112| };
|4113|4113| 
|4114|4114| /*
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4201|4201| UnitAI.prototype.MoveTo = function(data, iid, type)
|4202|4202| {
|4203|4203| 	if (data["target"])
|4204|    |-	{
|    |4204|+	
|4205|4205| 		if (data["min"] || data["max"])
|4206|4206| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4207|4207| 		else
|4211|4211| 			else
|4212|4212| 				return this.MoveToTargetRange(data.target, iid, type);
|4213|4213| 		}
|4214|    |-	}
|    |4214|+	
|4215|4215| 	else
|4216|4216| 	{
|4217|4217| 		if (data["min"] || data["max"])
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["target"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4200|4200|  */
|4201|4201| UnitAI.prototype.MoveTo = function(data, iid, type)
|4202|4202| {
|4203|    |-	if (data["target"])
|    |4203|+	if (data.target)
|4204|4204| 	{
|4205|4205| 		if (data["min"] || data["max"])
|4206|4206| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["min"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4202|4202| {
|4203|4203| 	if (data["target"])
|4204|4204| 	{
|4205|    |-		if (data["min"] || data["max"])
|    |4205|+		if (data.min || data["max"])
|4206|4206| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4207|4207| 		else
|4208|4208| 		{
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["max"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4202|4202| {
|4203|4203| 	if (data["target"])
|4204|4204| 	{
|4205|    |-		if (data["min"] || data["max"])
|    |4205|+		if (data["min"] || data.max)
|4206|4206| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4207|4207| 		else
|4208|4208| 		{
|    | [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
|4205|4205| 		if (data["min"] || data["max"])
|4206|4206| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4207|4207| 		else
|4208|    |-		{
|    |4208|+		
|4209|4209| 			if (!iid)
|4210|4210| 				return this.MoveToTarget(data.target);
|4211|4211| 			else
|4212|4212| 				return this.MoveToTargetRange(data.target, iid, type);
|4213|    |-		}
|    |4213|+		
|4214|4214| 	}
|4215|4215| 	else
|4216|4216| 	{
|    | [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
|4204|4204| 	{
|4205|4205| 		if (data["min"] || data["max"])
|4206|4206| 			return this.MoveToTargetRangeExplicit(data.target, data.min || -1, data.max || -1);
|4207|    |-		else
|4208|    |-		{
|    |4207|+		
|4209|4208| 			if (!iid)
|4210|4209| 				return this.MoveToTarget(data.target);
|4211|4210| 			else
|4212|4211| 				return this.MoveToTargetRange(data.target, iid, type);
|4213|    |-		}
|    |4212|+		
|4214|4213| 	}
|4215|4214| 	else
|4216|4215| 	{
|    | [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
|4208|4208| 		{
|4209|4209| 			if (!iid)
|4210|4210| 				return this.MoveToTarget(data.target);
|4211|    |-			else
|4212|    |-				return this.MoveToTargetRange(data.target, iid, type);
|    |4211|+			return this.MoveToTargetRange(data.target, iid, type);
|4213|4212| 		}
|4214|4213| 	}
|4215|4214| 	else
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4213|4213| 		}
|4214|4214| 	}
|4215|4215| 	else
|4216|    |-	{
|    |4216|+	
|4217|4217| 		if (data["min"] || data["max"])
|4218|4218| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4219|4219| 		else
|4220|4220| 			return this.MoveToPoint(data.x, data.z);
|4221|    |-	}
|    |4221|+	
|4222|4222| }
|4223|4223| 
|4224|4224| UnitAI.prototype.MoveToPoint = function(x, z)
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["min"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4214|4214| 	}
|4215|4215| 	else
|4216|4216| 	{
|4217|    |-		if (data["min"] || data["max"])
|    |4217|+		if (data.min || data["max"])
|4218|4218| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4219|4219| 		else
|4220|4220| 			return this.MoveToPoint(data.x, data.z);
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["max"] is better written in dot notation.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4214|4214| 	}
|4215|4215| 	else
|4216|4216| 	{
|4217|    |-		if (data["min"] || data["max"])
|    |4217|+		if (data["min"] || data.max)
|4218|4218| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4219|4219| 		else
|4220|4220| 			return this.MoveToPoint(data.x, data.z);
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4216|4216| 	{
|4217|4217| 		if (data["min"] || data["max"])
|4218|4218| 			return this.MoveToPointRange(data.x, data.z, data.min || -1, data.max || -1);
|4219|    |-		else
|4220|    |-			return this.MoveToPoint(data.x, data.z);
|    |4219|+		return this.MoveToPoint(data.x, data.z);
|4221|4220| 	}
|4222|4221| }
|4223|4222| 
|    | [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
|4219|4219| 		else
|4220|4220| 			return this.MoveToPoint(data.x, data.z);
|4221|4221| 	}
|4222|    |-}
|    |4222|+};
|4223|4223| 
|4224|4224| UnitAI.prototype.MoveToPoint = function(x, z)
|4225|4225| {
|    | [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
|4303|4303| 	else
|4304|4304| 		// return false? Or hope you come close enough?
|4305|4305| 		var parabolicMaxRange = 0;
|4306|    |-		//return false;
|    |4306|+		// return false;
|4307|4307| 
|4308|4308| 	// the parabole changes while walking, take something in the middle
|4309|4309| 	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
|4368|4368| 	if (this.IsFormationMember())
|4369|4369| 	{
|4370|4370| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4371|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4372|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4371|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4372|+			cmpFormationUnitAI.order.data.target == target)
|4373|4373| 			return true;
|4374|4374| 	}
|4375|4375| 
|    | [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
|4536|4536| UnitAI.prototype.AttackEntityInZone = function(ents)
|4537|4537| {
|4538|4538| 	var target = ents.find(target =>
|4539|    |-		this.CanAttack(target)
|4540|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4539|+		this.CanAttack(target) &&
|    |4540|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4541|4541| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4542|4542| 	);
|4543|4543| 	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
|4537|4537| {
|4538|4538| 	var target = ents.find(target =>
|4539|4539| 		this.CanAttack(target)
|4540|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4541|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4540|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4541|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4542|4542| 	);
|4543|4543| 	if (!target)
|4544|4544| 		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
|4601|4601| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4602|4602| 	if (this.isGuardOf)
|4603|4603| 	{
|4604|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4604|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4605|4605| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4606|4606| 		if (cmpUnitAI && cmpAttack &&
|4607|4607| 		    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
|4605|4605| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4606|4606| 		if (cmpUnitAI && cmpAttack &&
|4607|4607| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4608|    |-				return false;
|    |4608|+			return false;
|4609|4609| 	}
|4610|4610| 
|4611|4611| 	// 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
|4610|4610| 
|4611|4611| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4612|4612| 	if (this.GetStance().respondHoldGround)
|4613|    |-	{
|    |4613|+	
|4614|4614| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4615|4615| 			return true;
|4616|    |-	}
|    |4616|+	
|4617|4617| 
|4618|4618| 	// Stop if it's left our vision range, unless we're especially persistent
|4619|4619| 	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
|4617|4617| 
|4618|4618| 	// Stop if it's left our vision range, unless we're especially persistent
|4619|4619| 	if (!this.GetStance().respondChaseBeyondVision)
|4620|    |-	{
|    |4620|+	
|4621|4621| 		if (!this.CheckTargetIsInVisionRange(target))
|4622|4622| 			return true;
|4623|    |-	}
|    |4623|+	
|4624|4624| 
|4625|4625| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4626|4626| 	// 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
|4643|4643| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4644|4644| 	if (this.isGuardOf)
|4645|4645| 	{
|4646|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4646|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4647|4647| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4648|4648| 		if (cmpUnitAI && cmpAttack &&
|4649|4649| 		    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
|4656|4656| 	return false;
|4657|4657| };
|4658|4658| 
|4659|    |-//// External interface functions ////
|    |4659|+// // External interface functions ////
|4660|4660| 
|4661|4661| UnitAI.prototype.SetFormationController = function(ent)
|4662|4662| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4666|4666| 	// of our own formation (or ourself if not in formation)
|4667|4667| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4668|4668| 	if (cmpObstruction)
|4669|    |-	{
|    |4669|+	
|4670|4670| 		if (ent == INVALID_ENTITY)
|4671|4671| 			cmpObstruction.SetControlGroup(this.entity);
|4672|4672| 		else
|4673|4673| 			cmpObstruction.SetControlGroup(ent);
|4674|    |-	}
|    |4674|+	
|4675|4675| 
|4676|4676| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4677|4677| 	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
|4809|4809| 	// if we already had an old guard order, do nothing if the target is the same
|4810|4810| 	// and the order is running, otherwise remove the previous order
|4811|4811| 	if (this.isGuardOf)
|4812|    |-	{
|    |4812|+	
|4813|4813| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4814|4814| 			return;
|4815|4815| 		else
|4816|4816| 			this.RemoveGuard();
|4817|    |-	}
|    |4817|+	
|4818|4818| 
|4819|4819| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4820|4820| };
|    | [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
|4812|4812| 	{
|4813|4813| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4814|4814| 			return;
|4815|    |-		else
|4816|    |-			this.RemoveGuard();
|    |4815|+		this.RemoveGuard();
|4817|4816| 	}
|4818|4817| 
|4819|4818| 	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
|4983|4983| 			this.WalkToTarget(target, queued);
|4984|4984| 		return;
|4985|4985| 	}
|4986|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |4986|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|4987|4987| };
|4988|4988| 
|4989|4989| /**
|    | [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
|5132|5132| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5133|5133| 	{
|5134|5134| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5135|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5135|+		if (cmpTrader.HasBothMarkets() &&
|5136|5136| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5137|5137| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5138|5138| 		{
|    | [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
|5413|5413| 				{
|5414|5414| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5415|5415| 					var targetClasses = this.order.data.targetClasses;
|5416|    |-					if (targetClasses.attack && cmpIdentity
|5417|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5416|+					if (targetClasses.attack && cmpIdentity &&
|    |5417|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5418|5418| 						continue;
|5419|5419| 					if (targetClasses.avoid && cmpIdentity
|5420|5420| 						&& 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
|5416|5416| 					if (targetClasses.attack && cmpIdentity
|5417|5417| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5418|5418| 						continue;
|5419|    |-					if (targetClasses.avoid && cmpIdentity
|5420|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5419|+					if (targetClasses.avoid && cmpIdentity &&
|    |5420|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5421|5421| 						continue;
|5422|5422| 					// Only used by the AIs to prevent some choices of targets
|5423|5423| 					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
|5439|5439| 		{
|5440|5440| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5441|5441| 			var targetClasses = this.order.data.targetClasses;
|5442|    |-			if (cmpIdentity && targetClasses.attack
|5443|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5442|+			if (cmpIdentity && targetClasses.attack &&
|    |5443|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5444|5444| 				continue;
|5445|5445| 			if (cmpIdentity && targetClasses.avoid
|5446|5446| 				&& 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
|5442|5442| 			if (cmpIdentity && targetClasses.attack
|5443|5443| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5444|5444| 				continue;
|5445|    |-			if (cmpIdentity && targetClasses.avoid
|5446|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5445|+			if (cmpIdentity && targetClasses.avoid &&
|    |5446|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5447|5447| 				continue;
|5448|5448| 			// Only used by the AIs to prevent some choices of targets
|5449|5449| 			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
|5585|5585| 
|5586|5586| UnitAI.prototype.SetHeldPosition = function(x, z)
|5587|5587| {
|5588|    |-	this.heldPosition = {"x": x, "z": z};
|    |5588|+	this.heldPosition = { "x": x, "z": z};
|5589|5589| };
|5590|5590| 
|5591|5591| 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
|5585|5585| 
|5586|5586| UnitAI.prototype.SetHeldPosition = function(x, z)
|5587|5587| {
|5588|    |-	this.heldPosition = {"x": x, "z": z};
|    |5588|+	this.heldPosition = {"x": x, "z": z };
|5589|5589| };
|5590|5590| 
|5591|5591| 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
|5612|5612| 	return false;
|5613|5613| };
|5614|5614| 
|5615|    |-//// Helper functions ////
|    |5615|+// // Helper functions ////
|5616|5616| 
|5617|5617| UnitAI.prototype.CanAttack = function(target)
|5618|5618| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|5816|5816| 	return cmpPack && cmpPack.IsPacking();
|5817|5817| };
|5818|5818| 
|5819|    |-//// Formation specific functions ////
|    |5819|+// // Formation specific functions ////
|5820|5820| 
|5821|5821| UnitAI.prototype.IsAttackingAsFormation = function()
|5822|5822| {
|    | [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
|5821|5821| UnitAI.prototype.IsAttackingAsFormation = function()
|5822|5822| {
|5823|5823| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5824|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5825|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5824|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5825|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5826|5826| };
|5827|5827| 
|5828|5828| //// 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
|5825|5825| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5826|5826| };
|5827|5827| 
|5828|    |-//// Animal specific functions ////
|    |5828|+// // Animal specific functions ////
|5829|5829| 
|5830|5830| UnitAI.prototype.MoveRandomly = function(distance)
|5831|5831| {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|3725| »   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
|4523| »   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
|4538| »   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
|4584| »   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
|4607| »   »   ····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
|5063| »   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
| 353| »   »   ····&&·(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
|1899| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Freagarach added a subscriber: Restricted Owners Package.Jun 11 2019, 5:33 PM
wraitii added a reviewer: Restricted Owners Package.Jun 11 2019, 5:42 PM
wraitii added a subscriber: wraitii.

@Freagarach Change reviewers, not subscribed ;)

@Freagarach Change reviewers, not subscribed ;)

Ah, so if I want something to be reviewed, I can just add a group as a reviewer? I did not know that! I thought that reviewers picked their own 'projects'? But it is up to me then to invite them? Good to know ;)

@Freagarach Change reviewers, not subscribed ;)

Ah, so if I want something to be reviewed, I can just add a group as a reviewer? I did not know that! I thought that reviewers picked their own 'projects'? But it is up to me then to invite them? Good to know ;)

Well at least in my case putting a group I belong to as a reviewer will make the diff pop on my radar. It's no guarantee I'll look at it, but it's a better chance than if I don't see it.

Freagarach updated this revision to Diff 8620.Jun 26 2019, 3:37 PM

Moved Uncontrollable block for a player-issued order to Commands.js.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/helpers/Commands.js
|1556| »   »   »   var·cmpFormation·=·Engine.QueryInterface(formationEnt,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 345| 345| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 346| 346| 		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 347| 347| 		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 348|    |-		{
|    | 348|+		
| 349| 349| 			// we were already on the shoreline, and have not moved since
| 350| 350| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
| 351| 351| 				needToMove = false;
| 352|    |-		}
|    | 352|+		
| 353| 353| 
| 354| 354| 		if (needToMove)
| 355| 355| 			this.SetNextState("INDIVIDUAL.PICKUP.APPROACHING");
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 343| 343| 		// Check if we need to move     TODO implement a better way to know if we are on the shoreline
| 344| 344| 		var needToMove = true;
| 345| 345| 		var cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
| 346|    |-		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x)
| 347|    |-		    && (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
|    | 346|+		if (this.lastShorelinePosition && cmpPosition && (this.lastShorelinePosition.x == cmpPosition.GetPosition().x) &&
|    | 347|+		    (this.lastShorelinePosition.z == cmpPosition.GetPosition().z))
| 348| 348| 		{
| 349| 349| 			// we were already on the shoreline, and have not moved since
| 350| 350| 			if (DistanceBetweenEntities(this.entity, this.order.data.target) < 50)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'else'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 508| 508| 					this.PushOrderFront("Walk", this.order.data.lastPos);
| 509| 509| 				}
| 510| 510| 				else
| 511|    |-				{
|    | 511|+				
| 512| 512| 					// We couldn't move there, or the target moved away
| 513| 513| 					this.FinishOrder();
| 514|    |-				}
|    | 514|+				
| 515| 515| 				return;
| 516| 516| 			}
| 517| 517| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
| 723| 723| 			}
| 724| 724| 			// Check if we are already in range, otherwise walk there
| 725| 725| 			if (!this.CheckGarrisonRange(msg.data.target))
| 726|    |-			{
|    | 726|+			
| 727| 727| 				if (!this.CheckTargetVisible(msg.data.target))
| 728| 728| 				{
| 729| 729| 					this.FinishOrder();
| 734| 734| 					this.SetNextState("GARRISON.APPROACHING");
| 735| 735| 					return;
| 736| 736| 				}
| 737|    |-			}
|    | 737|+			
| 738| 738| 
| 739| 739| 			this.SetNextState("GARRISON.GARRISONING");
| 740| 740| 		},
|    | [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
| 729| 729| 					this.FinishOrder();
| 730| 730| 					return;
| 731| 731| 				}
| 732|    |-				else
| 733|    |-				{
|    | 732|+				
| 734| 733| 					this.SetNextState("GARRISON.APPROACHING");
| 735| 734| 					return;
| 736|    |-				}
|    | 735|+				
| 737| 736| 			}
| 738| 737| 
| 739| 738| 			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
| 752| 752| 						this.PushOrderFront("Walk", msg.data.lastPos);
| 753| 753| 					}
| 754| 754| 					else
| 755|    |-					{
|    | 755|+					
| 756| 756| 						// We couldn't move there, or the target moved away
| 757| 757| 						this.FinishOrder();
| 758|    |-					}
|    | 758|+					
| 759| 759| 					return;
| 760| 760| 				}
| 761| 761| 
|    | [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
| 985| 985| 			},
| 986| 986| 		},
| 987| 987| 
| 988|    |-		"GARRISON":{
|    | 988|+		"GARRISON": {
| 989| 989| 			"enter": function() {
| 990| 990| 				// If the garrisonholder should pickup, warn it so it can take needed action
| 991| 991| 				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
|1198|1198| 			// If the controller handled an order but some members rejected it,
|1199|1199| 			// they will have no orders and be in the FORMATIONMEMBER.IDLE state.
|1200|1200| 			if (this.orderQueue.length)
|1201|    |-			{
|    |1201|+			
|1202|1202| 				// We're leaving the formation, so stop our FormationWalk order
|1203|1203| 				if (this.FinishOrder())
|1204|1204| 					return;
|1205|    |-			}
|    |1205|+			
|1206|1206| 
|1207|1207| 			// No orders left, we're an individual now
|1208|1208| 			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
|1226|1226| 			// Move a tile outside the building
|1227|1227| 			let range = 4;
|1228|1228| 			if (this.CheckTargetRangeExplicit(msg.data.target, range, range))
|1229|    |-			{
|    |1229|+			
|1230|1230| 				// We are already at the target, or can't move at all
|1231|1231| 				this.FinishOrder();
|1232|    |-			}
|    |1232|+			
|1233|1233| 			else
|1234|1234| 			{
|1235|1235| 				this.order.data.min = range;
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1447|1447| 
|1448|1448| 			"LosRangeUpdate": function(msg) {
|1449|1449| 				if (this.GetStance().targetVisibleEnemies)
|1450|    |-				{
|    |1450|+				
|1451|1451| 					// Start attacking one of the newly-seen enemy (if any)
|1452|1452| 					this.AttackEntitiesByPreference(msg.data.added);
|1453|    |-				}
|    |1453|+				
|1454|1454| 			},
|1455|1455| 
|1456|1456| 			"LosHealRangeUpdate": function(msg) {
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1480|1480| 				this.SelectAnimation("move");
|1481|1481| 			},
|1482|1482| 
|1483|    |-			"leave": function () {
|    |1483|+			"leave": function() {
|1484|1484| 				this.SelectAnimation("idle");
|1485|1485| 				this.StopMoving();
|1486|1486| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1660|1660| 						// if nothing better to do, check if the guarded needs to be healed or repaired
|1661|1661| 						var cmpHealth = Engine.QueryInterface(this.isGuardOf, IID_Health);
|1662|1662| 						if (cmpHealth && cmpHealth.IsInjured())
|1663|    |-						{
|    |1663|+						
|1664|1664| 							if (this.CanHeal(this.isGuardOf))
|1665|1665| 								this.PushOrderFront("Heal", { "target": this.isGuardOf, "force": false });
|1666|1666| 							else if (this.CanRepair(this.isGuardOf))
|1667|1667| 								this.PushOrderFront("Repair", { "target": this.isGuardOf, "autocontinue": false, "force": false });
|1668|    |-						}
|    |1668|+						
|1669|1669| 					}
|1670|1670| 				},
|1671|1671| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1787|1787| 					}
|1788|1788| 					// Check the target is still alive and attackable
|1789|1789| 					if (this.CanAttack(target) && !this.CheckTargetAttackRange(target, this.order.data.attackType))
|1790|    |-					{
|    |1790|+					
|1791|1791| 						// Can't reach it - try to chase after it
|1792|1792| 						if (this.ShouldChaseTargetedEntity(target, this.order.data.force))
|1793|1793| 						{
|1800|1800| 							this.SetNextState("COMBAT.CHASING");
|1801|1801| 							return true;
|1802|1802| 						}
|1803|    |-					}
|    |1803|+					
|1804|1804| 
|1805|1805| 					this.StopMoving();
|1806|1806| 
|    | [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
|1833|1833| 					// TODO: we should probably only bother syncing projectile attacks, not melee
|1834|1834| 
|1835|1835| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|1836|    |-					this.resyncAnimation = (prepare != this.attackTimers.prepare) ? true : false;
|    |1836|+					this.resyncAnimation = (prepare != this.attackTimers.prepare);
|1837|1837| 
|1838|1838| 					this.FaceTowardsTarget(this.order.data.target);
|1839|1839| 
|    | [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
|1959|1959| 
|1960|1960| 				"Attacked": function(msg) {
|1961|1961| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|1962|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|1963|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |1962|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |1963|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|1964|1964| 						this.RespondToTargetedEntities([msg.data.attacker]);
|1965|1965| 				},
|1966|1966| 			},
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|1979|1979| 					this.SelectAnimation("move");
|1980|1980| 					var cmpUnitAI = Engine.QueryInterface(this.order.data.target, IID_UnitAI);
|1981|1981| 					if (cmpUnitAI && cmpUnitAI.IsFleeing())
|1982|    |-					{
|    |1982|+					
|1983|1983| 						// Run after a fleeing target
|1984|1984| 						this.SetSpeedMultiplier(this.GetRunMultiplier());
|1985|    |-					}
|    |1985|+					
|1986|1986| 					this.StartTimer(1000, 1000);
|1987|1987| 				},
|1988|1988| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2161|2161| 
|2162|2162| 					var cmpSupply = Engine.QueryInterface(this.gatheringTarget, IID_ResourceSupply);
|2163|2163| 					if (cmpSupply && cmpSupply.IsAvailable(cmpOwnership.GetOwner(), this.entity))
|2164|    |-					{
|    |2164|+					
|2165|2165| 						// Check we can still reach and gather from the target
|2166|2166| 						if (this.CheckTargetRange(this.gatheringTarget, IID_ResourceGatherer) && this.CanGather(this.gatheringTarget))
|2167|2167| 						{
|2212|2212| 								return;
|2213|2213| 							}
|2214|2214| 						}
|2215|    |-					}
|    |2215|+					
|2216|2216| 
|2217|2217| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|2218|2218| 
|    | [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
|2204|2204| 								return;
|2205|2205| 						}
|2206|2206| 						else
|2207|    |-						{
|    |2207|+						
|2208|2208| 							// Try to follow the target
|2209|2209| 							if (this.MoveToTargetRange(this.gatheringTarget, IID_ResourceGatherer))
|2210|2210| 							{
|2211|2211| 								this.SetNextState("APPROACHING");
|2212|2212| 								return;
|2213|2213| 							}
|2214|    |-						}
|    |2214|+						
|2215|2215| 					}
|2216|2216| 
|2217|2217| 					// We're already in range, can't get anywhere near it or the target is exhausted.
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '||' should be placed at the end of the line.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2238|2238| 					// Also don't switch to a different type of huntable animal
|2239|2239| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2240|2240| 						return (
|2241|    |-							(type.generic == "treasure" && resourceType.generic == "treasure")
|2242|    |-							|| (type.specific == resourceType.specific
|    |2241|+							(type.generic == "treasure" && resourceType.generic == "treasure") ||
|    |2242|+							(type.specific == resourceType.specific
|2243|2243| 							&& (type.specific != "meat" || resourceTemplate == template))
|2244|2244| 						);
|2245|2245| 					});
|    | [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
|2239|2239| 					var nearby = this.FindNearbyResource(function(ent, type, template) {
|2240|2240| 						return (
|2241|2241| 							(type.generic == "treasure" && resourceType.generic == "treasure")
|2242|    |-							|| (type.specific == resourceType.specific
|2243|    |-							&& (type.specific != "meat" || resourceTemplate == template))
|    |2242|+							|| (type.specific == resourceType.specific &&
|    |2243|+							(type.specific != "meat" || resourceTemplate == template))
|2244|2244| 						);
|2245|2245| 					});
|2246|2246| 					if (nearby)
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2304|2304| 
|2305|2305| 				"Timer": function(msg) {
|2306|2306| 					if (this.ShouldAbandonChase(this.order.data.target, this.order.data.force, IID_Heal, null))
|2307|    |-					{
|    |2307|+					
|2308|2308| 						// Return to our original position unless we have a better order.
|2309|2309| 						if (!this.FinishOrder() && this.GetStance().respondHoldGround)
|2310|2310| 							this.WalkToHeldPosition();
|2311|    |-					}
|    |2311|+					
|2312|2312| 				},
|2313|2313| 
|2314|2314| 				"MovementUpdate": function() {
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2338|2338| 					this.StartTimer(prepare, this.healTimers.repeat);
|2339|2339| 
|2340|2340| 					// If using a non-default prepare time, re-sync the animation when the timer runs.
|2341|    |-					this.resyncAnimation = (prepare != this.healTimers.prepare) ? true : false;
|    |2341|+					this.resyncAnimation = (prepare != this.healTimers.prepare);
|2342|2342| 
|2343|2343| 					this.FaceTowardsTarget(this.order.data.target);
|2344|2344| 				},
|    | [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
|2551|2551| 					{
|2552|2552| 						// The building was already finished/fully repaired before we arrived;
|2553|2553| 						// let the ConstructionFinished handler handle this.
|2554|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2554|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2555|2555| 						return true;
|2556|2556| 					}
|2557|2557| 
|    | [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
|2551|2551| 					{
|2552|2552| 						// The building was already finished/fully repaired before we arrived;
|2553|2553| 						// let the ConstructionFinished handler handle this.
|2554|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2554|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2555|2555| 						return true;
|2556|2556| 					}
|2557|2557| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2678|2678| 
|2679|2679| 				// Unit was approaching and there's nothing to do now, so switch to walking
|2680|2680| 				if (oldState === "INDIVIDUAL.REPAIR.APPROACHING")
|2681|    |-				{
|    |2681|+				
|2682|2682| 					// We're already walking to the given point, so add this as a order.
|2683|2683| 					this.WalkToTarget(msg.data.newentity, true);
|2684|    |-				}
|    |2684|+				
|2685|2685| 			},
|2686|2686| 		},
|2687|2687| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2741|2741| 
|2742|2742| 					// Check that we can garrison here
|2743|2743| 					if (this.CanGarrison(target))
|2744|    |-					{
|    |2744|+					
|2745|2745| 						// Check that we're in range of the garrison target
|2746|2746| 						if (this.CheckGarrisonRange(target))
|2747|2747| 						{
|2817|2817| 								return false;
|2818|2818| 							}
|2819|2819| 						}
|2820|    |-					}
|    |2820|+					
|2821|2821| 					// Garrisoning failed for some reason, so finish the order
|2822|2822| 					this.FinishOrder();
|2823|2823| 					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
|2939|2939| 		"Attacked": function(msg) {
|2940|2940| 			if (this.template.NaturalBehaviour == "skittish" ||
|2941|2941| 			    this.template.NaturalBehaviour == "passive")
|2942|    |-			{
|    |2942|+			
|2943|2943| 				this.Flee(msg.data.attacker, false);
|2944|    |-			}
|    |2944|+			
|2945|2945| 			else if (this.IsDangerousAnimal() || this.template.NaturalBehaviour == "defensive")
|2946|2946| 			{
|2947|2947| 				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
|2948|2948| 					this.Attack(msg.data.attacker, false);
|2949|2949| 			}
|2950|2950| 			else if (this.template.NaturalBehaviour == "domestic")
|2951|    |-			{
|    |2951|+			
|2952|2952| 				// Never flee, stop what we were doing
|2953|2953| 				this.SetNextState("IDLE");
|2954|    |-			}
|    |2954|+			
|2955|2955| 		},
|2956|2956| 
|2957|2957| 		"Order.LeaveFoundation": function(msg) {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|2962|2962| 				this.FinishOrder();
|2963|2963| 				return;
|2964|2964| 			}
|2965|    |-			else
|2966|    |-			{
|    |2965|+			
|2967|2966| 				this.order.data.min = range;
|2968|2967| 				this.SetNextState("WALKING");
|2969|    |-			}
|    |2968|+			
|2970|2969| 		},
|2971|2970| 
|2972|2971| 		"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
|3006|3006| 				}
|3007|3007| 				// Start attacking one of the newly-seen enemy (if any)
|3008|3008| 				else if (this.IsDangerousAnimal())
|3009|    |-				{
|    |3009|+				
|3010|3010| 					this.AttackVisibleEntity(msg.data.added);
|3011|    |-				}
|    |3011|+				
|3012|3012| 
|3013|3013| 				// TODO: if two units enter our range together, we'll attack the
|3014|3014| 				// 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
|3049|3049| 				}
|3050|3050| 				// Start attacking one of the newly-seen enemy (if any)
|3051|3051| 				else if (this.template.NaturalBehaviour == "violent")
|3052|    |-				{
|    |3052|+				
|3053|3053| 					this.AttackVisibleEntity(msg.data.added);
|3054|    |-				}
|    |3054|+				
|3055|3055| 			},
|3056|3056| 
|3057|3057| 			"Timer": function(msg) {
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3064|3064| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3065|3065| 
|3066|3066| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3067|    |-							// only used for domestic animals
|    |3067|+		// only used for domestic animals
|3068|3068| 	},
|3069|3069| };
|3070|3070| 
|    | [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
|3121|3121| 
|3122|3122| UnitAI.prototype.IsAnimal = function()
|3123|3123| {
|3124|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3124|+	return (!!this.template.NaturalBehaviour);
|3125|3125| };
|3126|3126| 
|3127|3127| 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
|3165|3165| UnitAI.prototype.GetGarrisonHolder = function()
|3166|3166| {
|3167|3167| 	if (this.IsGarrisoned())
|3168|    |-	{
|    |3168|+	
|3169|3169| 		for (let order of this.orderQueue)
|3170|3170| 			if (order.type == "Garrison")
|3171|3171| 				return order.data.target;
|3172|    |-	}
|    |3172|+	
|3173|3173| 	return INVALID_ENTITY;
|3174|3174| };
|3175|3175| 
|    | [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
|3243|3243| 		{
|3244|3244| 			let index = this.GetCurrentState().indexOf(".");
|3245|3245| 			if (index != -1)
|3246|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3246|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3247|3247| 			this.Stop(false);
|3248|3248| 		}
|3249|3249| 
|    | [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
|3299|3299| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3300|3300| 			continue;
|3301|3301| 		if (i == 0)
|3302|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3302|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3303|3303| 		else
|3304|3304| 			this.orderQueue.splice(i, 1);
|3305|3305| 		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
|3299|3299| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3300|3300| 			continue;
|3301|3301| 		if (i == 0)
|3302|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3302|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3303|3303| 		else
|3304|3304| 			this.orderQueue.splice(i, 1);
|3305|3305| 		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
|3383|3383| };
|3384|3384| 
|3385|3385| 
|3386|    |-//// FSM linkage functions ////
|    |3386|+// // FSM linkage functions ////
|3387|3387| 
|3388|3388| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3389|3389| 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
|3555|3555| 				continue;
|3556|3556| 			if (this.orderQueue[i].type == type)
|3557|3557| 				continue;
|3558|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3558|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3559|3559| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3560|3560| 			return;
|3561|3561| 		}
|    | [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
|3555|3555| 				continue;
|3556|3556| 			if (this.orderQueue[i].type == type)
|3557|3557| 				continue;
|3558|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3558|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3559|3559| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3560|3560| 			return;
|3561|3561| 		}
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3569|3569| {
|3570|3570| 	// Remember the previous work orders to be able to go back to them later if required
|3571|3571| 	if (data && data.force)
|3572|    |-	{
|    |3572|+	
|3573|3573| 		if (this.IsFormationController())
|3574|3574| 			this.CallMemberFunction("UpdateWorkOrders", [type]);
|3575|3575| 		else
|3576|3576| 			this.UpdateWorkOrders(type);
|3577|    |-	}
|    |3577|+	
|3578|3578| 
|3579|3579| 	let garrisonHolder = this.IsGarrisoned() && type != "Ungarrison" ? this.GetGarrisonHolder() : null;
|3580|3580| 
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|3646|3646| 	{
|3647|3647| 		var cmpUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|3648|3648| 		if (cmpUnitAI)
|3649|    |-		{
|    |3649|+		
|3650|3650| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3651|3651| 			{
|3652|3652| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3655|3655| 					return;
|3656|3656| 				}
|3657|3657| 			}
|3658|    |-		}
|    |3658|+		
|3659|3659| 	}
|3660|3660| 
|3661|3661| 	// 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
|3648|3648| 		if (cmpUnitAI)
|3649|3649| 		{
|3650|3650| 			for (var i = 0; i < cmpUnitAI.orderQueue.length; ++i)
|3651|    |-			{
|    |3651|+			
|3652|3652| 				if (isWorkType(cmpUnitAI.orderQueue[i].type))
|3653|3653| 				{
|3654|3654| 					this.workOrders = cmpUnitAI.orderQueue.slice(i);
|3655|3655| 					return;
|3656|3656| 				}
|3657|    |-			}
|    |3657|+			
|3658|3658| 		}
|3659|3659| 	}
|3660|3660| 
|    | [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
|3660|3660| 
|3661|3661| 	// If nothing found, take the unit orders
|3662|3662| 	for (var i = 0; i < this.orderQueue.length; ++i)
|3663|    |-	{
|    |3663|+	
|3664|3664| 		if (isWorkType(this.orderQueue[i].type))
|3665|3665| 		{
|3666|3666| 			this.workOrders = this.orderQueue.slice(i);
|3667|3667| 			return;
|3668|3668| 		}
|3669|    |-	}
|    |3669|+	
|3670|3670| };
|3671|3671| 
|3672|3672| 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
|3726|3726| 	if (data.timerRepeat === undefined)
|3727|3727| 		this.timer = undefined;
|3728|3728| 
|3729|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3729|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|3730|3730| };
|3731|3731| 
|3732|3732| /**
|    | [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
|3726|3726| 	if (data.timerRepeat === undefined)
|3727|3727| 		this.timer = undefined;
|3728|3728| 
|3729|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |3729|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|3730|3730| };
|3731|3731| 
|3732|3732| /**
|    | [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
|3761|3761| 	this.timer = undefined;
|3762|3762| };
|3763|3763| 
|3764|    |-//// Message handlers /////
|    |3764|+// // Message handlers /////
|3765|3765| 
|3766|3766| UnitAI.prototype.OnMotionChanged = function(msg)
|3767|3767| {
|    | [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
|3773|3773| 	// TODO: This is a bit inefficient since every unit listens to every
|3774|3774| 	// construction message - ideally we could scope it to only the one we're building
|3775|3775| 
|3776|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3776|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|3777|3777| };
|3778|3778| 
|3779|3779| 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
|3773|3773| 	// TODO: This is a bit inefficient since every unit listens to every
|3774|3774| 	// construction message - ideally we could scope it to only the one we're building
|3775|3775| 
|3776|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |3776|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|3777|3777| };
|3778|3778| 
|3779|3779| 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
|3798|3798| 
|3799|3799| UnitAI.prototype.OnAttacked = function(msg)
|3800|3800| {
|3801|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3801|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|3802|3802| };
|3803|3803| 
|3804|3804| 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
|3798|3798| 
|3799|3799| UnitAI.prototype.OnAttacked = function(msg)
|3800|3800| {
|3801|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |3801|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|3802|3802| };
|3803|3803| 
|3804|3804| 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
|3803|3803| 
|3804|3804| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3805|3805| {
|3806|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3806|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|3807|3807| };
|3808|3808| 
|3809|3809| 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
|3803|3803| 
|3804|3804| UnitAI.prototype.OnGuardedAttacked = function(msg)
|3805|3805| {
|3806|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |3806|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|3807|3807| };
|3808|3808| 
|3809|3809| 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
|3808|3808| 
|3809|3809| UnitAI.prototype.OnHealthChanged = function(msg)
|3810|3810| {
|3811|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3811|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|3812|3812| };
|3813|3813| 
|3814|3814| 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
|3808|3808| 
|3809|3809| UnitAI.prototype.OnHealthChanged = function(msg)
|3810|3810| {
|3811|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |3811|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|3812|3812| };
|3813|3813| 
|3814|3814| 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
|3814|3814| UnitAI.prototype.OnRangeUpdate = function(msg)
|3815|3815| {
|3816|3816| 	if (msg.tag == this.losRangeQuery)
|3817|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3817|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|3818|3818| 	else if (msg.tag == this.losHealRangeQuery)
|3819|3819| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3820|3820| };
|    | [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
|3814|3814| UnitAI.prototype.OnRangeUpdate = function(msg)
|3815|3815| {
|3816|3816| 	if (msg.tag == this.losRangeQuery)
|3817|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |3817|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|3818|3818| 	else if (msg.tag == this.losHealRangeQuery)
|3819|3819| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|3820|3820| };
|    | [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
|3816|3816| 	if (msg.tag == this.losRangeQuery)
|3817|3817| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3818|3818| 	else if (msg.tag == this.losHealRangeQuery)
|3819|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3819|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|3820|3820| };
|3821|3821| 
|3822|3822| 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
|3816|3816| 	if (msg.tag == this.losRangeQuery)
|3817|3817| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|3818|3818| 	else if (msg.tag == this.losHealRangeQuery)
|3819|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |3819|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|3820|3820| };
|3821|3821| 
|3822|3822| 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
|3821|3821| 
|3822|3822| UnitAI.prototype.OnPackFinished = function(msg)
|3823|3823| {
|3824|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3824|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|3825|3825| };
|3826|3826| 
|3827|3827| //// 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
|3821|3821| 
|3822|3822| UnitAI.prototype.OnPackFinished = function(msg)
|3823|3823| {
|3824|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |3824|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|3825|3825| };
|3826|3826| 
|3827|3827| //// 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
|3824|3824| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|3825|3825| };
|3826|3826| 
|3827|    |-//// Helper functions to be called by the FSM ////
|    |3827|+// // Helper functions to be called by the FSM ////
|3828|3828| 
|3829|3829| UnitAI.prototype.GetWalkSpeed = function()
|3830|3830| {
|    | [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
|3926|3926| 	if (!cmpOwnership || cmpOwnership.GetOwner() == INVALID_PLAYER)
|3927|3927| 		return undefined;
|3928|3928| 
|3929|    |-	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position)
|    |3929|+	let cmpPosition = Engine.QueryInterface(this.entity, IID_Position);
|3930|3930| 	if (!cmpPosition || !cmpPosition.IsInWorld())
|3931|3931| 		return undefined;
|3932|3932| 
|    | [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
|4011|4011| 			PlaySound(name, member);
|4012|4012| 	}
|4013|4013| 	else
|4014|    |-	{
|    |4014|+	
|4015|4015| 		// Otherwise use our own sounds
|4016|4016| 		PlaySound(name, this.entity);
|4017|    |-	}
|    |4017|+	
|4018|4018| };
|4019|4019| 
|4020|4020| /*
|    | [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
|4203|4203| 	else
|4204|4204| 		// return false? Or hope you come close enough?
|4205|4205| 		var parabolicMaxRange = 0;
|4206|    |-		//return false;
|    |4206|+		// return false;
|4207|4207| 
|4208|4208| 	// the parabole changes while walking, take something in the middle
|4209|4209| 	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
|4290|4290| 	if (this.IsFormationMember())
|4291|4291| 	{
|4292|4292| 		var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
|4293|    |-		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation()
|4294|    |-			&& cmpFormationUnitAI.order.data.target == target)
|    |4293|+		if (cmpFormationUnitAI && cmpFormationUnitAI.IsAttackingAsFormation() &&
|    |4294|+			cmpFormationUnitAI.order.data.target == target)
|4295|4295| 			return true;
|4296|4296| 	}
|4297|4297| 
|    | [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
|4458|4458| UnitAI.prototype.AttackEntityInZone = function(ents)
|4459|4459| {
|4460|4460| 	var target = ents.find(target =>
|4461|    |-		this.CanAttack(target)
|4462|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4461|+		this.CanAttack(target) &&
|    |4462|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4463|4463| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4464|4464| 	);
|4465|4465| 	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
|4459|4459| {
|4460|4460| 	var target = ents.find(target =>
|4461|4461| 		this.CanAttack(target)
|4462|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4463|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4462|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4463|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4464|4464| 	);
|4465|4465| 	if (!target)
|4466|4466| 		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
|4523|4523| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4524|4524| 	if (this.isGuardOf)
|4525|4525| 	{
|4526|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4526|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4527|4527| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4528|4528| 		if (cmpUnitAI && cmpAttack &&
|4529|4529| 		    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
|4527|4527| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4528|4528| 		if (cmpUnitAI && cmpAttack &&
|4529|4529| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4530|    |-				return false;
|    |4530|+			return false;
|4531|4531| 	}
|4532|4532| 
|4533|4533| 	// 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
|4532|4532| 
|4533|4533| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|4534|4534| 	if (this.GetStance().respondHoldGround)
|4535|    |-	{
|    |4535|+	
|4536|4536| 		if (!this.CheckTargetDistanceFromHeldPosition(target, iid, type))
|4537|4537| 			return true;
|4538|    |-	}
|    |4538|+	
|4539|4539| 
|4540|4540| 	// Stop if it's left our vision range, unless we're especially persistent
|4541|4541| 	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
|4539|4539| 
|4540|4540| 	// Stop if it's left our vision range, unless we're especially persistent
|4541|4541| 	if (!this.GetStance().respondChaseBeyondVision)
|4542|    |-	{
|    |4542|+	
|4543|4543| 		if (!this.CheckTargetIsInVisionRange(target))
|4544|4544| 			return true;
|4545|    |-	}
|    |4545|+	
|4546|4546| 
|4547|4547| 	// (Note that CCmpUnitMotion will detect if the target is lost in FoW,
|4548|4548| 	// 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
|4565|4565| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|4566|4566| 	if (this.isGuardOf)
|4567|4567| 	{
|4568|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4568|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4569|4569| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4570|4570| 		if (cmpUnitAI && cmpAttack &&
|4571|4571| 		    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
|4578|4578| 	return false;
|4579|4579| };
|4580|4580| 
|4581|    |-//// External interface functions ////
|    |4581|+// // External interface functions ////
|4582|4582| 
|4583|4583| UnitAI.prototype.SetFormationController = function(ent)
|4584|4584| {
|    | [NORMAL] ESLintBear (curly):
|    | Unnecessary { after 'if' condition.
|----|    | /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /mnt/data/jenkins-phabricator/workspace/differential/binaries/data/mods/public/simulation/components/UnitAI.js
|4588|4588| 	// of our own formation (or ourself if not in formation)
|4589|4589| 	var cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
|4590|4590| 	if (cmpObstruction)
|4591|    |-	{
|    |4591|+	
|4592|4592| 		if (ent == INVALID_ENTITY)
|4593|4593| 			cmpObstruction.SetControlGroup(this.entity);
|4594|4594| 		else
|4595|4595| 			cmpObstruction.SetControlGroup(ent);
|4596|    |-	}
|    |4596|+	
|4597|4597| 
|4598|4598| 	// If we were removed from a formation, let the FSM switch back to INDIVIDUAL
|4599|4599| 	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
|4731|4731| 	// if we already had an old guard order, do nothing if the target is the same
|4732|4732| 	// and the order is running, otherwise remove the previous order
|4733|4733| 	if (this.isGuardOf)
|4734|    |-	{
|    |4734|+	
|4735|4735| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4736|4736| 			return;
|4737|4737| 		else
|4738|4738| 			this.RemoveGuard();
|4739|    |-	}
|    |4739|+	
|4740|4740| 
|4741|4741| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|4742|4742| };
|    | [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
|4734|4734| 	{
|4735|4735| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|4736|4736| 			return;
|4737|    |-		else
|4738|    |-			this.RemoveGuard();
|    |4737|+		this.RemoveGuard();
|4739|4738| 	}
|4740|4739| 
|4741|4740| 	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
|4905|4905| 			this.WalkToTarget(target, queued);
|4906|4906| 		return;
|4907|4907| 	}
|4908|    |-	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture}, queued);
|    |4908|+	this.AddOrder("Attack", { "target": target, "force": true, "allowCapture": allowCapture }, queued);
|4909|4909| };
|4910|4910| 
|4911|4911| /**
|    | [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
|5054|5054| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5055|5055| 	{
|5056|5056| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5057|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5057|+		if (cmpTrader.HasBothMarkets() &&
|5058|5058| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5059|5059| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5060|5060| 		{
|    | [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
|5335|5335| 				{
|5336|5336| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5337|5337| 					var targetClasses = this.order.data.targetClasses;
|5338|    |-					if (targetClasses.attack && cmpIdentity
|5339|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5338|+					if (targetClasses.attack && cmpIdentity &&
|    |5339|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5340|5340| 						continue;
|5341|5341| 					if (targetClasses.avoid && cmpIdentity
|5342|5342| 						&& 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
|5338|5338| 					if (targetClasses.attack && cmpIdentity
|5339|5339| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5340|5340| 						continue;
|5341|    |-					if (targetClasses.avoid && cmpIdentity
|5342|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5341|+					if (targetClasses.avoid && cmpIdentity &&
|    |5342|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5343|5343| 						continue;
|5344|5344| 					// Only used by the AIs to prevent some choices of targets
|5345|5345| 					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
|5361|5361| 		{
|5362|5362| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5363|5363| 			var targetClasses = this.order.data.targetClasses;
|5364|    |-			if (cmpIdentity && targetClasses.attack
|5365|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5364|+			if (cmpIdentity && targetClasses.attack &&
|    |5365|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5366|5366| 				continue;
|5367|5367| 			if (cmpIdentity && targetClasses.avoid
|5368|5368| 				&& 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
|5364|5364| 			if (cmpIdentity && targetClasses.attack
|5365|5365| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5366|5366| 				continue;
|5367|    |-			if (cmpIdentity && targetClasses.avoid
|5368|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5367|+			if (cmpIdentity && targetClasses.avoid &&
|    |5368|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5369|5369| 				continue;
|5370|5370| 			// Only used by the AIs to prevent some choices of targets
|5371|5371| 			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
|5507|5507| 
|5508|5508| UnitAI.prototype.SetHeldPosition = function(x, z)
|5509|5509| {
|5510|    |-	this.heldPosition = {"x": x, "z": z};
|    |5510|+	this.heldPosition = { "x": x, "z": z};
|5511|5511| };
|5512|5512| 
|5513|5513| 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
|5507|5507| 
|5508|5508| UnitAI.prototype.SetHeldPosition = function(x, z)
|5509|5509| {
|5510|    |-	this.heldPosition = {"x": x, "z": z};
|    |5510|+	this.heldPosition = {"x": x, "z": z };
|5511|5511| };
|5512|5512| 
|5513|5513| 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
|5534|5534| 	return false;
|5535|5535| };
|5536|5536| 
|5537|    |-//// Helper functions ////
|    |5537|+// // Helper functions ////
|5538|5538| 
|5539|5539| UnitAI.prototype.CanAttack = function(target)
|5540|5540| {
|    | [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
|5738|5738| 	return cmpPack && cmpPack.IsPacking();
|5739|5739| };
|5740|5740| 
|5741|    |-//// Formation specific functions ////
|    |5741|+// // Formation specific functions ////
|5742|5742| 
|5743|5743| UnitAI.prototype.IsAttackingAsFormation = function()
|5744|5744| {
|    | [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
|5743|5743| UnitAI.prototype.IsAttackingAsFormation = function()
|5744|5744| {
|5745|5745| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|5746|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|5747|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |5746|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |5747|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5748|5748| };
|5749|5749| 
|5750|5750| //// 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
|5747|5747| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|5748|5748| };
|5749|5749| 
|5750|    |-//// Animal specific functions ////
|    |5750|+// // Animal specific functions ////
|5751|5751| 
|5752|5752| UnitAI.prototype.MoveRandomly = function(distance)
|5753|5753| {

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|3631| »   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
|4445| »   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
|4460| »   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
|4506| »   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
|4529| »   »   ····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
|4985| »   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
| 347| »   »   ····&&·(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
|1825| »   »   »   »   »   »   var·cmpFormation·=·Engine.QueryInterface(this.formationController,·IID_Formation);
|    | [NORMAL] JSHintBear:
|    | 'cmpFormation' is already defined.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Freagarach retitled this revision from Let players move owned animals around. to Move the controllability of an entity from "UnitAI.js" to "Commands.js" and untie it from whether it is an animal..Jun 30 2019, 8:47 AM
Freagarach edited the summary of this revision. (Show Details)
Freagarach edited the test plan for this revision. (Show Details)
Freagarach retitled this revision from Move the controllability of an entity from "UnitAI.js" to "Commands.js" and untie it from whether it is an animal. to Move the controllability of an entity from "UnitAI.js" to "Commands.js" and untie it from whether the entity is an animal..