Page MenuHomeWildfire Games

Split vision range from going-to-attack range in UnitAI.
ClosedPublic

Authored by Freagarach on Jun 19 2020, 9:44 AM.

Details

Reviewers
bb
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP23877: Split attack range and vision range queries.
Summary

Currently, UnitAI does two kind of queries. A "LOS"-query (which actually is related to cmpAttack) and a heal-query.
This diff splits the "LOS"-query in two separate queries, namely one to determine when to attack an entity and one to react on a newly seen enemy.

This is first and foremost needed to fix some issues regarding animal behaviour in D2646, but in the future it can be used for more things, like:

  • D1880.
  • Let entities enter a "READY" stance when sighting an enemy (refs. #16, kind of refs. D1496).
  • Let entities cheer when their hero/king comes nigh.
Test Plan

Test that normal behaviour is preserved, but, given the template change, e.g. deer now run from your units.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Freagarach created this revision.Jun 19 2020, 9:44 AM
Owners added a subscriber: Restricted Owners Package.Jun 19 2020, 9:44 AM
Freagarach added inline comments.Jun 19 2020, 9:51 AM
binaries/data/mods/public/simulation/templates/template_unit_fauna.xml
47 ↗(On Diff #12387)

Only for testing (refs D1880).

Freagarach edited the summary of this revision. (Show Details)Jun 19 2020, 11:01 AM
Freagarach edited the summary of this revision. (Show Details)Jun 19 2020, 11:10 AM

Small cleanup of comments.

Stan added a subscriber: Stan.Jun 19 2020, 12:39 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
1498 ↗(On Diff #12387)

shouldn't you check for msg, msg.data && msg.added?

1515 ↗(On Diff #12387)

I wonder if there is any used to cache the stance

3602 ↗(On Diff #12387)

don't think you need !!

3688 ↗(On Diff #12387)

delete ?

Freagarach added inline comments.Jun 19 2020, 1:55 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1498 ↗(On Diff #12387)

The rest doesn't do that ^^ But it'd be good I guess.

1515 ↗(On Diff #12387)

That is already done? But I guess you mean caching the "effects" of the stance?

3602 ↗(On Diff #12387)

Right.

3688 ↗(On Diff #12387)

But more often than not it is created again, wouldn't that be unnecessary garbage? (I've got no clue about that, but to me it seems that deleting and recreating is more of an effort that reassigning.)

Freagarach added inline comments.Jun 19 2020, 6:46 PM
binaries/data/mods/public/simulation/components/UnitAI.js
3603 ↗(On Diff #12392)

If we'd check here for skittiness we'd save a few queries :) (Of sheep and such and healers don't use this as well.)

Freagarach updated this revision to Diff 12415.Jun 21 2020, 8:43 PM
Freagarach marked 2 inline comments as done.
  • Check for msg && msg.data && msg.data.added.
  • Some styling.
  • Setup LOS query only when needed.
binaries/data/mods/public/simulation/components/UnitAI.js
3698 ↗(On Diff #12392)

Notice this is wrong rP22754.

bb edited reviewers, added: Restricted Owners Package; removed: Restricted Owners Package.Jun 23 2020, 9:24 PM
bb added a subscriber: bb.

Probably only some trivial stuffs

Behaviour looks good, patch seems nice

binaries/data/mods/public/simulation/components/UnitAI.js
1534 ↗(On Diff #12415)

Needs an attack node

3604 ↗(On Diff #12415)

why else?

we seem to order the queries in LOS, HEAL, ATTACK (which is fine), so do that here too

3617 ↗(On Diff #12415)

Though why do we check IsHealer here? and not in the Setup*RangeQuery? performance?

3620 ↗(On Diff #12415)

shouldn't we test for cmpAttack somewhere?

3635–3637 ↗(On Diff #12415)

Why care for players? if a deer sees a gaia soldier (say we play danubius), we should also run away

3694–3696 ↗(On Diff #12415)

while usually this is a nice performance addition, It does stop units from recapturing nearby units (only on the query, on enter/timer idle state we do a different check). Anyway out of scope, but needs some thinking...

3699 ↗(On Diff #12415)

(AHA LOL we require ents to have a cmpResistance here already)

5017 ↗(On Diff #12415)

add the ents param too

5019 ↗(On Diff #12415)

maybe should be above the RespondToHealableEntities function?

5026 ↗(On Diff #12415)

If you think about the behaviour you get something weird but nice: we will flee every time the query responds to the closest new unit. So if units approach from all sides, we will run in different directions. Would get even better if the fleeing state also listens to the query

5984 ↗(On Diff #12415)

Move above heal

Freagarach added inline comments.Jun 23 2020, 9:53 PM
binaries/data/mods/public/simulation/components/UnitAI.js
3604 ↗(On Diff #12415)

For performace, though it's better without ^^

3617 ↗(On Diff #12415)

It doesn't need to be checked since this.losHealRangeQuery won't exist when we're not a healer. (See SetupRangeQueries.)

3620 ↗(On Diff #12415)

(See SetupRangeQueries.)

3624 ↗(On Diff #12415)

JSDOC

3635–3637 ↗(On Diff #12415)

True, so better use all players. Was pondering about that also.

3699 ↗(On Diff #12415)

s/already/still ;)

Freagarach planned changes to this revision.Jun 23 2020, 9:53 PM
Freagarach updated this revision to Diff 12444.Jun 24 2020, 7:00 PM
Freagarach marked 7 inline comments as done.

Inlines.

binaries/data/mods/public/simulation/components/UnitAI.js
3635–3637 ↗(On Diff #12415)

But we don't want them to run away from each other,,,
Better do that kind of stuff in another diff ^^

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.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 118| 118| 
| 119| 119| 
| 120| 120| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 121|    |-		SetInterval: function() { },
|    | 121|+		"SetInterval": function() { },
| 122| 122| 		SetTimeout: function() { },
| 123| 123| 	});
| 124| 124| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 119| 119| 
| 120| 120| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 121| 121| 		SetInterval: function() { },
| 122|    |-		SetTimeout: function() { },
|    | 122|+		"SetTimeout": function() { },
| 123| 123| 	});
| 124| 124| 
| 125| 125| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 123| 123| 	});
| 124| 124| 
| 125| 125| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 126|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 126|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 126| 126| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 127| 127| 			return 1;
| 128| 128| 		},
| 129|    |-		EnableActiveQuery: function(id) { },
|    | 129|+		"EnableActiveQuery": function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    | 130|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    | 130|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131|    |-		DisableActiveQuery: function(id) { },
|    | 131|+		"DisableActiveQuery": function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
| 134| 134| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132|    |-		GetEntityFlagMask: function(identifier) { },
|    | 132|+		"GetEntityFlagMask": function(identifier) { },
| 133| 133| 	});
| 134| 134| 
| 135| 135| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 	});
| 134| 134| 
| 135| 135| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 136|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 136|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 140|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 140|+		"GetPlayerByID": function(id) { return playerEntity; },
| 141| 141| 		GetNumPlayers: function() { return 2; },
| 142| 142| 	});
| 143| 143| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 140| 140| 		GetPlayerByID: function(id) { return playerEntity; },
| 141|    |-		GetNumPlayers: function() { return 2; },
|    | 141|+		"GetNumPlayers": function() { return 2; },
| 142| 142| 	});
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 142| 142| 	});
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145|    |-		IsAlly: function() { return false; },
|    | 145|+		"IsAlly": function() { return false; },
| 146| 146| 		IsEnemy: function() { return true; },
| 147| 147| 		GetEnemies: function() { return [2]; },
| 148| 148| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145| 145| 		IsAlly: function() { return false; },
| 146|    |-		IsEnemy: function() { return true; },
|    | 146|+		"IsEnemy": function() { return true; },
| 147| 147| 		GetEnemies: function() { return [2]; },
| 148| 148| 	});
| 149| 149| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145| 145| 		IsAlly: function() { return false; },
| 146| 146| 		IsEnemy: function() { return true; },
| 147|    |-		GetEnemies: function() { return [2]; },
|    | 147|+		"GetEnemies": function() { return [2]; },
| 148| 148| 	});
| 149| 149| 
| 150| 150| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 154| 154| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 155| 155| 
| 156| 156| 	AddMock(unit, IID_Identity, {
| 157|    |-		GetClassesList: function() { return []; },
|    | 157|+		"GetClassesList": function() { return []; },
| 158| 158| 	});
| 159| 159| 
| 160| 160| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 158| 158| 	});
| 159| 159| 
| 160| 160| 	AddMock(unit, IID_Ownership, {
| 161|    |-		GetOwner: function() { return 1; },
|    | 161|+		"GetOwner": function() { return 1; },
| 162| 162| 	});
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 162| 162| 	});
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
| 165|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 165|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166|    |-		GetPosition: function() { return new Vector3D(); },
|    | 166|+		"GetPosition": function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 164| 164| 	AddMock(unit, IID_Position, {
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167|    |-		GetPosition2D: function() { return new Vector2D(); },
|    | 167|+		"GetPosition2D": function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
| 170| 170| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 168|+		"GetRotation": function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
| 170| 170| 	});
| 171| 171| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169|    |-		IsInWorld: function() { return true; },
|    | 169|+		"IsInWorld": function() { return true; },
| 170| 170| 	});
| 171| 171| 
| 172| 172| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 179| 179| 	});
| 180| 180| 
| 181| 181| 	AddMock(unit, IID_Vision, {
| 182|    |-		GetRange: function() { return 10; },
|    | 182|+		"GetRange": function() { return 10; },
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 186|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 186|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 187|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 187|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 188|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189|    |-		GetPreference: function(t) { return 0; },
|    | 189|+		"GetPreference": function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 190|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 193| 193| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191|    |-		CanAttack: function(v) { return true; },
|    | 191|+		"CanAttack": function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 193| 193| 	});
| 194| 194| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 192|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 193| 193| 	});
| 194| 194| 
| 195| 195| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 200| 200| 	if (mode == 1)
| 201| 201| 	{
| 202| 202| 		AddMock(enemy, IID_Health, {
| 203|    |-			GetHitpoints: function() { return 10; },
|    | 203|+			"GetHitpoints": function() { return 10; },
| 204| 204| 		});
| 205| 205| 		AddMock(enemy, IID_UnitAI, {
| 206| 206| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 203| 203| 			GetHitpoints: function() { return 10; },
| 204| 204| 		});
| 205| 205| 		AddMock(enemy, IID_UnitAI, {
| 206|    |-			IsAnimal: function() { return false; }
|    | 206|+			"IsAnimal": function() { return false; }
| 207| 207| 		});
| 208| 208| 	}
| 209| 209| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 208| 208| 	}
| 209| 209| 	else if (mode == 2)
| 210| 210| 		AddMock(enemy, IID_Health, {
| 211|    |-			GetHitpoints: function() { return 0; },
|    | 211|+			"GetHitpoints": function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214| 214| 	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 '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 211| 211| 			GetHitpoints: function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 214|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 211| 211| 			GetHitpoints: function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 214|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
| 218|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 218|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 219|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 217| 217| 	AddMock(controller, IID_Position, {
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 220|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 221|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
| 224| 224| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 222|+		"GetRotation": function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
| 224| 224| 	});
| 225| 225| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223|    |-		IsInWorld: function() { return true; },
|    | 223|+		"IsInWorld": function() { return true; },
| 224| 224| 	});
| 225| 225| 
| 226| 226| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 271| 271| 	var unitAIs = [];
| 272| 272| 
| 273| 273| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 274|    |-		SetInterval: function() { },
|    | 274|+		"SetInterval": function() { },
| 275| 275| 		SetTimeout: function() { },
| 276| 276| 	});
| 277| 277| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 272| 272| 
| 273| 273| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 274| 274| 		SetInterval: function() { },
| 275|    |-		SetTimeout: function() { },
|    | 275|+		"SetTimeout": function() { },
| 276| 276| 	});
| 277| 277| 
| 278| 278| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 277| 277| 
| 278| 278| 
| 279| 279| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 280|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 280|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 281| 281| 			return 1;
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 280| 280| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 281| 281| 			return 1;
| 282| 282| 		},
| 283|    |-		EnableActiveQuery: function(id) { },
|    | 283|+		"EnableActiveQuery": function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 281| 281| 			return 1;
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 284|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
| 287| 287| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285|    |-		DisableActiveQuery: function(id) { },
|    | 285|+		"DisableActiveQuery": function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
| 287| 287| 	});
| 288| 288| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286|    |-		GetEntityFlagMask: function(identifier) { },
|    | 286|+		"GetEntityFlagMask": function(identifier) { },
| 287| 287| 	});
| 288| 288| 
| 289| 289| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 287| 287| 	});
| 288| 288| 
| 289| 289| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 290|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 290|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 291| 291| 	});
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 291| 291| 	});
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 294|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 294|+		"GetPlayerByID": function(id) { return playerEntity; },
| 295| 295| 		GetNumPlayers: function() { return 2; },
| 296| 296| 	});
| 297| 297| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 294| 294| 		GetPlayerByID: function(id) { return playerEntity; },
| 295|    |-		GetNumPlayers: function() { return 2; },
|    | 295|+		"GetNumPlayers": function() { return 2; },
| 296| 296| 	});
| 297| 297| 
| 298| 298| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 300| 300| 	});
| 301| 301| 
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303|    |-		IsAlly: function() { return false; },
|    | 303|+		"IsAlly": function() { return false; },
| 304| 304| 		IsEnemy: function() { return true; },
| 305| 305| 		GetEnemies: function() { return [2]; },
| 306| 306| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 301| 301| 
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303| 303| 		IsAlly: function() { return false; },
| 304|    |-		IsEnemy: function() { return true; },
|    | 304|+		"IsEnemy": function() { return true; },
| 305| 305| 		GetEnemies: function() { return [2]; },
| 306| 306| 	});
| 307| 307| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303| 303| 		IsAlly: function() { return false; },
| 304| 304| 		IsEnemy: function() { return true; },
| 305|    |-		GetEnemies: function() { return [2]; },
|    | 305|+		"GetEnemies": function() { return [2]; },
| 306| 306| 	});
| 307| 307| 
| 308| 308| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 313| 313| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 314| 314| 
| 315| 315| 		AddMock(unit + i, IID_Identity, {
| 316|    |-			GetClassesList: function() { return []; },
|    | 316|+			"GetClassesList": function() { return []; },
| 317| 317| 		});
| 318| 318| 
| 319| 319| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 317| 317| 		});
| 318| 318| 
| 319| 319| 		AddMock(unit + i, IID_Ownership, {
| 320|    |-			GetOwner: function() { return 1; },
|    | 320|+			"GetOwner": function() { return 1; },
| 321| 321| 		});
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 321| 321| 		});
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 324|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325|    |-			GetPosition: function() { return new Vector3D(); },
|    | 325|+			"GetPosition": function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 326|+			"GetPosition2D": function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
| 329| 329| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 327|+			"GetRotation": function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
| 329| 329| 		});
| 330| 330| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328|    |-			IsInWorld: function() { return true; },
|    | 328|+			"IsInWorld": function() { return true; },
| 329| 329| 		});
| 330| 330| 
| 331| 331| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 338| 338| 		});
| 339| 339| 
| 340| 340| 		AddMock(unit + i, IID_Vision, {
| 341|    |-			GetRange: function() { return 10; },
|    | 341|+			"GetRange": function() { return 10; },
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return { "max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 346|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 346|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 347|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 348|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 351| 351| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349|    |-			CanAttack: function(v) { return true; },
|    | 349|+			"CanAttack": function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 351| 351| 		});
| 352| 352| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 350|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 351| 351| 		});
| 352| 352| 
| 353| 353| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 359| 359| 
| 360| 360| 	// create enemy
| 361| 361| 	AddMock(enemy, IID_Health, {
| 362|    |-		GetHitpoints: function() { return 40; },
|    | 362|+		"GetHitpoints": function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365| 365| 	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 '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 362| 362| 		GetHitpoints: function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 365|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 362| 362| 		GetHitpoints: function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 365|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
| 369|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 369|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 370|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 368| 368| 	AddMock(controller, IID_Position, {
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 371|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 372|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
| 375| 375| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 373|+		"GetRotation": function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
| 375| 375| 	});
| 376| 376| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374|    |-		IsInWorld: function() { return true; },
|    | 374|+		"IsInWorld": function() { return true; },
| 375| 375| 	});
| 376| 376| 
| 377| 377| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return { "max":10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387| 387| 		GetRange: function() { return {"max":10, "min": 0}; },
| 388|    |-		CanAttackAsFormation: function() { return false; },
|    | 388|+		"CanAttackAsFormation": function() { return false; },
| 389| 389| 	});
| 390| 390| 
| 391| 391| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 397| 397| 	for (let ent of unitAIs)
| 398| 398| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 399| 399| 
| 400|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 400|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 401| 401| 
| 402| 402| 	// let all units be in position
| 403| 403| 	for (let ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 397| 397| 	for (let ent of unitAIs)
| 398| 398| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 399| 399| 
| 400|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 400|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 401| 401| 
| 402| 402| 	// let all units be in position
| 403| 403| 	for (let ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 130| »   »   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
| 309| »   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
| 398| »   »   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
| 407| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 795| 795| 					this.FinishOrder();
| 796| 796| 					return;
| 797| 797| 				}
| 798|    |-				else
| 799|    |-				{
|    | 798|+				
| 800| 799| 					this.SetNextState("GARRISON.APPROACHING");
| 801| 800| 					return;
| 802|    |-				}
|    | 801|+				
| 803| 802| 			}
| 804| 803| 
| 805| 804| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1061|1061| 			},
|1062|1062| 		},
|1063|1063| 
|1064|    |-		"GARRISON":{
|    |1064|+		"GARRISON": {
|1065|1065| 			"APPROACHING": {
|1066|1066| 				"enter": function() {
|1067|1067| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2038|2038| 
|2039|2039| 				"Attacked": function(msg) {
|2040|2040| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2041|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2042|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2041|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2042|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2043|2043| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2044|2044| 				},
|2045|2045| 			},
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2197|2197| 					"MovementUpdate": function(msg) {
|2198|2198| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2199|2199| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2200|    |-						if (msg.likelyFailure || 
|    |2200|+						if (msg.likelyFailure ||
|2201|2201| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2202|2202| 							!msg.obstructed && this.CheckRange(this.order.data))
|2203|2203| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2500|2500| 
|2501|2501| 								return type.specific == resourceType.specific &&
|2502|2502| 								    (type.specific != "meat" || resourceTemplate == template);
|2503|    |-						});
|    |2503|+							});
|2504|2504| 
|2505|2505| 						if (nearbyResource)
|2506|2506| 						{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2832|2832| 					{
|2833|2833| 						// The building was already finished/fully repaired before we arrived;
|2834|2834| 						// let the ConstructionFinished handler handle this.
|2835|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2835|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2836|2836| 						return true;
|2837|2837| 					}
|2838|2838| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2832|2832| 					{
|2833|2833| 						// The building was already finished/fully repaired before we arrived;
|2834|2834| 						// let the ConstructionFinished handler handle this.
|2835|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2835|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2836|2836| 						return true;
|2837|2837| 					}
|2838|2838| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3122|3122| 				this.StopTimer();
|3123|3123| 				this.ResetAnimation();
|3124|3124| 				if (this.formationAnimationVariant)
|3125|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3125|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3126|3126| 				else
|3127|3127| 					this.SetDefaultAnimationVariant();
|3128|3128| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3336|3336| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3337|3337| 
|3338|3338| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3339|    |-							// only used for domestic animals
|    |3339|+		// only used for domestic animals
|3340|3340| 
|3341|3341| 		// Reuse the same garrison behaviour for animals.
|3342|3342| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3388|3388| 
|3389|3389| UnitAI.prototype.IsAnimal = function()
|3390|3390| {
|3391|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3391|+	return (!!this.template.NaturalBehaviour);
|3392|3392| };
|3393|3393| 
|3394|3394| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3528|3528| 		{
|3529|3529| 			let index = this.GetCurrentState().indexOf(".");
|3530|3530| 			if (index != -1)
|3531|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3531|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3532|3532| 			this.Stop(false);
|3533|3533| 		}
|3534|3534| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3585|3585| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3586|3586| 			continue;
|3587|3587| 		if (i == 0)
|3588|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3588|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3589|3589| 		else
|3590|3590| 			this.orderQueue.splice(i, 1);
|3591|3591| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3585|3585| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3586|3586| 			continue;
|3587|3587| 		if (i == 0)
|3588|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3588|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3589|3589| 		else
|3590|3590| 			this.orderQueue.splice(i, 1);
|3591|3591| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3714|3714| };
|3715|3715| 
|3716|3716| 
|3717|    |-//// FSM linkage functions ////
|    |3717|+// // FSM linkage functions ////
|3718|3718| 
|3719|3719| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3720|3720| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3886|3886| 				continue;
|3887|3887| 			if (this.orderQueue[i].type == type)
|3888|3888| 				continue;
|3889|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3889|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3890|3890| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3891|3891| 			return;
|3892|3892| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3886|3886| 				continue;
|3887|3887| 			if (this.orderQueue[i].type == type)
|3888|3888| 				continue;
|3889|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3889|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3890|3890| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3891|3891| 			return;
|3892|3892| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4127|4127| 	if (data.timerRepeat === undefined)
|4128|4128| 		this.timer = undefined;
|4129|4129| 
|4130|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4130|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4131|4131| };
|4132|4132| 
|4133|4133| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4127|4127| 	if (data.timerRepeat === undefined)
|4128|4128| 		this.timer = undefined;
|4129|4129| 
|4130|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4130|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4131|4131| };
|4132|4132| 
|4133|4133| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4172|4172| 	// TODO: This is a bit inefficient since every unit listens to every
|4173|4173| 	// construction message - ideally we could scope it to only the one we're building
|4174|4174| 
|4175|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4175|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4176|4176| };
|4177|4177| 
|4178|4178| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4172|4172| 	// TODO: This is a bit inefficient since every unit listens to every
|4173|4173| 	// construction message - ideally we could scope it to only the one we're building
|4174|4174| 
|4175|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4175|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4176|4176| };
|4177|4177| 
|4178|4178| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4211|4211| 	if (msg.fromStatusEffect)
|4212|4212| 		return;
|4213|4213| 
|4214|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4214|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4215|4215| };
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4211|4211| 	if (msg.fromStatusEffect)
|4212|4212| 		return;
|4213|4213| 
|4214|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4214|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4215|4215| };
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4218|4218| {
|4219|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4219|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4220|4220| };
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4218|4218| {
|4219|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4219|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4220|4220| };
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|4223|4223| {
|4224|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4224|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4225|4225| };
|4226|4226| 
|4227|4227| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|4223|4223| {
|4224|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4224|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4225|4225| };
|4226|4226| 
|4227|4227| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4236|4236| 
|4237|4237| UnitAI.prototype.OnPackFinished = function(msg)
|4238|4238| {
|4239|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4239|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4240|4240| };
|4241|4241| 
|4242|4242| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4236|4236| 
|4237|4237| UnitAI.prototype.OnPackFinished = function(msg)
|4238|4238| {
|4239|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4239|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4240|4240| };
|4241|4241| 
|4242|4242| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4239|4239| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4240|4240| };
|4241|4241| 
|4242|    |-//// Helper functions to be called by the FSM ////
|    |4242|+// // Helper functions to be called by the FSM ////
|4243|4243| 
|4244|4244| UnitAI.prototype.GetWalkSpeed = function()
|4245|4245| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4969|4969| UnitAI.prototype.AttackEntityInZone = function(ents)
|4970|4970| {
|4971|4971| 	var target = ents.find(target =>
|4972|    |-		this.CanAttack(target)
|4973|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4972|+		this.CanAttack(target) &&
|    |4973|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4974|4974| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4975|4975| 	);
|4976|4976| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4970|4970| {
|4971|4971| 	var target = ents.find(target =>
|4972|4972| 		this.CanAttack(target)
|4973|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4974|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4973|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4974|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4975|4975| 	);
|4976|4976| 	if (!target)
|4977|4977| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5054|5054| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5055|5055| 	if (this.isGuardOf)
|5056|5056| 	{
|5057|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5057|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5058|5058| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5059|5059| 		if (cmpUnitAI && cmpAttack &&
|5060|5060| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5058|5058| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5059|5059| 		if (cmpUnitAI && cmpAttack &&
|5060|5060| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5061|    |-				return false;
|    |5061|+			return false;
|5062|5062| 	}
|5063|5063| 
|5064|5064| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5096|5096| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5097|5097| 	if (this.isGuardOf)
|5098|5098| 	{
|5099|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5099|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5100|5100| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5101|5101| 		if (cmpUnitAI && cmpAttack &&
|5102|5102| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5109|5109| 	return false;
|5110|5110| };
|5111|5111| 
|5112|    |-//// External interface functions ////
|    |5112|+// // External interface functions ////
|5113|5113| 
|5114|5114| UnitAI.prototype.SetFormationController = function(ent)
|5115|5115| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5265|5265| 	{
|5266|5266| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5267|5267| 			return;
|5268|    |-		else
|5269|    |-			this.RemoveGuard();
|    |5268|+		this.RemoveGuard();
|5270|5269| 	}
|5271|5270| 
|5272|5271| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5599|5599| 
|5600|5600| 	if (this.IsFormationController())
|5601|5601| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5602|    |-}
|    |5602|+};
|5603|5603| /**
|5604|5604|  * Adds trade order to the queue. Either walk to the first market, or
|5605|5605|  * start a new route. Not forced, so it can be interrupted by attacks.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5620|5620| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5621|5621| 	{
|5622|5622| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5623|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5623|+		if (cmpTrader.HasBothMarkets() &&
|5624|5624| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5625|5625| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5626|5626| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5927|5927| 				{
|5928|5928| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5929|5929| 					var targetClasses = this.order.data.targetClasses;
|5930|    |-					if (targetClasses.attack && cmpIdentity
|5931|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5930|+					if (targetClasses.attack && cmpIdentity &&
|    |5931|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5932|5932| 						continue;
|5933|5933| 					if (targetClasses.avoid && cmpIdentity
|5934|5934| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5930|5930| 					if (targetClasses.attack && cmpIdentity
|5931|5931| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5932|5932| 						continue;
|5933|    |-					if (targetClasses.avoid && cmpIdentity
|5934|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5933|+					if (targetClasses.avoid && cmpIdentity &&
|    |5934|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5935|5935| 						continue;
|5936|5936| 					// Only used by the AIs to prevent some choices of targets
|5937|5937| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5953|5953| 		{
|5954|5954| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5955|5955| 			var targetClasses = this.order.data.targetClasses;
|5956|    |-			if (cmpIdentity && targetClasses.attack
|5957|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5956|+			if (cmpIdentity && targetClasses.attack &&
|    |5957|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5958|5958| 				continue;
|5959|5959| 			if (cmpIdentity && targetClasses.avoid
|5960|5960| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5956|5956| 			if (cmpIdentity && targetClasses.attack
|5957|5957| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5958|5958| 				continue;
|5959|    |-			if (cmpIdentity && targetClasses.avoid
|5960|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5959|+			if (cmpIdentity && targetClasses.avoid &&
|    |5960|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5961|5961| 				continue;
|5962|5962| 			// Only used by the AIs to prevent some choices of targets
|5963|5963| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6109|6109| 
|6110|6110| UnitAI.prototype.SetHeldPosition = function(x, z)
|6111|6111| {
|6112|    |-	this.heldPosition = {"x": x, "z": z};
|    |6112|+	this.heldPosition = { "x": x, "z": z};
|6113|6113| };
|6114|6114| 
|6115|6115| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6109|6109| 
|6110|6110| UnitAI.prototype.SetHeldPosition = function(x, z)
|6111|6111| {
|6112|    |-	this.heldPosition = {"x": x, "z": z};
|    |6112|+	this.heldPosition = {"x": x, "z": z };
|6113|6113| };
|6114|6114| 
|6115|6115| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6136|6136| 	return false;
|6137|6137| };
|6138|6138| 
|6139|    |-//// Helper functions ////
|    |6139|+// // Helper functions ////
|6140|6140| 
|6141|6141| /**
|6142|6142|  * General getter for ranges.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6155|6155| 		return undefined;
|6156|6156| 
|6157|6157| 	return component.GetRange(type);
|6158|    |-}
|    |6158|+};
|6159|6159| 
|6160|6160| UnitAI.prototype.CanAttack = function(target)
|6161|6161| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6331|6331| 	return cmpPack && cmpPack.IsPacking();
|6332|6332| };
|6333|6333| 
|6334|    |-//// Formation specific functions ////
|    |6334|+// // Formation specific functions ////
|6335|6335| 
|6336|6336| UnitAI.prototype.IsAttackingAsFormation = function()
|6337|6337| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6336|6336| UnitAI.prototype.IsAttackingAsFormation = function()
|6337|6337| {
|6338|6338| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6339|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6340|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6339|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6340|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6341|6341| };
|6342|6342| 
|6343|6343| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6340|6340| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6341|6341| };
|6342|6342| 
|6343|    |-//// Animal specific functions ////
|    |6343|+// // Animal specific functions ////
|6344|6344| 
|6345|6345| UnitAI.prototype.MoveRandomly = function(distance)
|6346|6346| {

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4032| »   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
|4956| »   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
|4971| »   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
|5037| »   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
|5060| »   »   ····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
|2042| »   »   »   »   »   »   &&·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
|3125| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

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

Freagarach updated this revision to Diff 12445.Jun 24 2020, 7:06 PM

Remove this.IsHealer() from UpdateRangeQueries.

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.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 118| 118| 
| 119| 119| 
| 120| 120| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 121|    |-		SetInterval: function() { },
|    | 121|+		"SetInterval": function() { },
| 122| 122| 		SetTimeout: function() { },
| 123| 123| 	});
| 124| 124| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 119| 119| 
| 120| 120| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 121| 121| 		SetInterval: function() { },
| 122|    |-		SetTimeout: function() { },
|    | 122|+		"SetTimeout": function() { },
| 123| 123| 	});
| 124| 124| 
| 125| 125| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 123| 123| 	});
| 124| 124| 
| 125| 125| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 126|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 126|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 126| 126| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 127| 127| 			return 1;
| 128| 128| 		},
| 129|    |-		EnableActiveQuery: function(id) { },
|    | 129|+		"EnableActiveQuery": function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    | 130|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    | 130|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131|    |-		DisableActiveQuery: function(id) { },
|    | 131|+		"DisableActiveQuery": function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
| 134| 134| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132|    |-		GetEntityFlagMask: function(identifier) { },
|    | 132|+		"GetEntityFlagMask": function(identifier) { },
| 133| 133| 	});
| 134| 134| 
| 135| 135| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 	});
| 134| 134| 
| 135| 135| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 136|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 136|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 140|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 140|+		"GetPlayerByID": function(id) { return playerEntity; },
| 141| 141| 		GetNumPlayers: function() { return 2; },
| 142| 142| 	});
| 143| 143| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 140| 140| 		GetPlayerByID: function(id) { return playerEntity; },
| 141|    |-		GetNumPlayers: function() { return 2; },
|    | 141|+		"GetNumPlayers": function() { return 2; },
| 142| 142| 	});
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 142| 142| 	});
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145|    |-		IsAlly: function() { return false; },
|    | 145|+		"IsAlly": function() { return false; },
| 146| 146| 		IsEnemy: function() { return true; },
| 147| 147| 		GetEnemies: function() { return [2]; },
| 148| 148| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145| 145| 		IsAlly: function() { return false; },
| 146|    |-		IsEnemy: function() { return true; },
|    | 146|+		"IsEnemy": function() { return true; },
| 147| 147| 		GetEnemies: function() { return [2]; },
| 148| 148| 	});
| 149| 149| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145| 145| 		IsAlly: function() { return false; },
| 146| 146| 		IsEnemy: function() { return true; },
| 147|    |-		GetEnemies: function() { return [2]; },
|    | 147|+		"GetEnemies": function() { return [2]; },
| 148| 148| 	});
| 149| 149| 
| 150| 150| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 154| 154| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 155| 155| 
| 156| 156| 	AddMock(unit, IID_Identity, {
| 157|    |-		GetClassesList: function() { return []; },
|    | 157|+		"GetClassesList": function() { return []; },
| 158| 158| 	});
| 159| 159| 
| 160| 160| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 158| 158| 	});
| 159| 159| 
| 160| 160| 	AddMock(unit, IID_Ownership, {
| 161|    |-		GetOwner: function() { return 1; },
|    | 161|+		"GetOwner": function() { return 1; },
| 162| 162| 	});
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 162| 162| 	});
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
| 165|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 165|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166|    |-		GetPosition: function() { return new Vector3D(); },
|    | 166|+		"GetPosition": function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 164| 164| 	AddMock(unit, IID_Position, {
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167|    |-		GetPosition2D: function() { return new Vector2D(); },
|    | 167|+		"GetPosition2D": function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
| 170| 170| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 168|+		"GetRotation": function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
| 170| 170| 	});
| 171| 171| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169|    |-		IsInWorld: function() { return true; },
|    | 169|+		"IsInWorld": function() { return true; },
| 170| 170| 	});
| 171| 171| 
| 172| 172| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 179| 179| 	});
| 180| 180| 
| 181| 181| 	AddMock(unit, IID_Vision, {
| 182|    |-		GetRange: function() { return 10; },
|    | 182|+		"GetRange": function() { return 10; },
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 186|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 186|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 187|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 187|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 188|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189|    |-		GetPreference: function(t) { return 0; },
|    | 189|+		"GetPreference": function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 190|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 193| 193| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191|    |-		CanAttack: function(v) { return true; },
|    | 191|+		"CanAttack": function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 193| 193| 	});
| 194| 194| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 192|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 193| 193| 	});
| 194| 194| 
| 195| 195| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 200| 200| 	if (mode == 1)
| 201| 201| 	{
| 202| 202| 		AddMock(enemy, IID_Health, {
| 203|    |-			GetHitpoints: function() { return 10; },
|    | 203|+			"GetHitpoints": function() { return 10; },
| 204| 204| 		});
| 205| 205| 		AddMock(enemy, IID_UnitAI, {
| 206| 206| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 203| 203| 			GetHitpoints: function() { return 10; },
| 204| 204| 		});
| 205| 205| 		AddMock(enemy, IID_UnitAI, {
| 206|    |-			IsAnimal: function() { return false; }
|    | 206|+			"IsAnimal": function() { return false; }
| 207| 207| 		});
| 208| 208| 	}
| 209| 209| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 208| 208| 	}
| 209| 209| 	else if (mode == 2)
| 210| 210| 		AddMock(enemy, IID_Health, {
| 211|    |-			GetHitpoints: function() { return 0; },
|    | 211|+			"GetHitpoints": function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214| 214| 	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 '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 211| 211| 			GetHitpoints: function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 214|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 211| 211| 			GetHitpoints: function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 214|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
| 218|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 218|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 219|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 217| 217| 	AddMock(controller, IID_Position, {
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 220|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 221|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
| 224| 224| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 222|+		"GetRotation": function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
| 224| 224| 	});
| 225| 225| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223|    |-		IsInWorld: function() { return true; },
|    | 223|+		"IsInWorld": function() { return true; },
| 224| 224| 	});
| 225| 225| 
| 226| 226| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 271| 271| 	var unitAIs = [];
| 272| 272| 
| 273| 273| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 274|    |-		SetInterval: function() { },
|    | 274|+		"SetInterval": function() { },
| 275| 275| 		SetTimeout: function() { },
| 276| 276| 	});
| 277| 277| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 272| 272| 
| 273| 273| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 274| 274| 		SetInterval: function() { },
| 275|    |-		SetTimeout: function() { },
|    | 275|+		"SetTimeout": function() { },
| 276| 276| 	});
| 277| 277| 
| 278| 278| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 277| 277| 
| 278| 278| 
| 279| 279| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 280|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 280|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 281| 281| 			return 1;
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 280| 280| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 281| 281| 			return 1;
| 282| 282| 		},
| 283|    |-		EnableActiveQuery: function(id) { },
|    | 283|+		"EnableActiveQuery": function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 281| 281| 			return 1;
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 284|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
| 287| 287| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285|    |-		DisableActiveQuery: function(id) { },
|    | 285|+		"DisableActiveQuery": function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
| 287| 287| 	});
| 288| 288| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286|    |-		GetEntityFlagMask: function(identifier) { },
|    | 286|+		"GetEntityFlagMask": function(identifier) { },
| 287| 287| 	});
| 288| 288| 
| 289| 289| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 287| 287| 	});
| 288| 288| 
| 289| 289| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 290|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 290|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 291| 291| 	});
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 291| 291| 	});
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 294|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 294|+		"GetPlayerByID": function(id) { return playerEntity; },
| 295| 295| 		GetNumPlayers: function() { return 2; },
| 296| 296| 	});
| 297| 297| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 294| 294| 		GetPlayerByID: function(id) { return playerEntity; },
| 295|    |-		GetNumPlayers: function() { return 2; },
|    | 295|+		"GetNumPlayers": function() { return 2; },
| 296| 296| 	});
| 297| 297| 
| 298| 298| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 300| 300| 	});
| 301| 301| 
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303|    |-		IsAlly: function() { return false; },
|    | 303|+		"IsAlly": function() { return false; },
| 304| 304| 		IsEnemy: function() { return true; },
| 305| 305| 		GetEnemies: function() { return [2]; },
| 306| 306| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 301| 301| 
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303| 303| 		IsAlly: function() { return false; },
| 304|    |-		IsEnemy: function() { return true; },
|    | 304|+		"IsEnemy": function() { return true; },
| 305| 305| 		GetEnemies: function() { return [2]; },
| 306| 306| 	});
| 307| 307| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303| 303| 		IsAlly: function() { return false; },
| 304| 304| 		IsEnemy: function() { return true; },
| 305|    |-		GetEnemies: function() { return [2]; },
|    | 305|+		"GetEnemies": function() { return [2]; },
| 306| 306| 	});
| 307| 307| 
| 308| 308| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 313| 313| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 314| 314| 
| 315| 315| 		AddMock(unit + i, IID_Identity, {
| 316|    |-			GetClassesList: function() { return []; },
|    | 316|+			"GetClassesList": function() { return []; },
| 317| 317| 		});
| 318| 318| 
| 319| 319| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 317| 317| 		});
| 318| 318| 
| 319| 319| 		AddMock(unit + i, IID_Ownership, {
| 320|    |-			GetOwner: function() { return 1; },
|    | 320|+			"GetOwner": function() { return 1; },
| 321| 321| 		});
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 321| 321| 		});
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 324|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325|    |-			GetPosition: function() { return new Vector3D(); },
|    | 325|+			"GetPosition": function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 326|+			"GetPosition2D": function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
| 329| 329| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 327|+			"GetRotation": function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
| 329| 329| 		});
| 330| 330| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328|    |-			IsInWorld: function() { return true; },
|    | 328|+			"IsInWorld": function() { return true; },
| 329| 329| 		});
| 330| 330| 
| 331| 331| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 338| 338| 		});
| 339| 339| 
| 340| 340| 		AddMock(unit + i, IID_Vision, {
| 341|    |-			GetRange: function() { return 10; },
|    | 341|+			"GetRange": function() { return 10; },
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return { "max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 346|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 346|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 347|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 348|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 351| 351| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349|    |-			CanAttack: function(v) { return true; },
|    | 349|+			"CanAttack": function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 351| 351| 		});
| 352| 352| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 350|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 351| 351| 		});
| 352| 352| 
| 353| 353| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 359| 359| 
| 360| 360| 	// create enemy
| 361| 361| 	AddMock(enemy, IID_Health, {
| 362|    |-		GetHitpoints: function() { return 40; },
|    | 362|+		"GetHitpoints": function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365| 365| 	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 '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 362| 362| 		GetHitpoints: function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 365|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 362| 362| 		GetHitpoints: function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 365|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
| 369|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 369|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 370|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 368| 368| 	AddMock(controller, IID_Position, {
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 371|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 372|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
| 375| 375| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 373|+		"GetRotation": function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
| 375| 375| 	});
| 376| 376| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374|    |-		IsInWorld: function() { return true; },
|    | 374|+		"IsInWorld": function() { return true; },
| 375| 375| 	});
| 376| 376| 
| 377| 377| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return { "max":10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387| 387| 		GetRange: function() { return {"max":10, "min": 0}; },
| 388|    |-		CanAttackAsFormation: function() { return false; },
|    | 388|+		"CanAttackAsFormation": function() { return false; },
| 389| 389| 	});
| 390| 390| 
| 391| 391| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 397| 397| 	for (let ent of unitAIs)
| 398| 398| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 399| 399| 
| 400|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 400|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 401| 401| 
| 402| 402| 	// let all units be in position
| 403| 403| 	for (let ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 397| 397| 	for (let ent of unitAIs)
| 398| 398| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 399| 399| 
| 400|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 400|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 401| 401| 
| 402| 402| 	// let all units be in position
| 403| 403| 	for (let ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 130| »   »   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
| 309| »   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
| 398| »   »   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
| 407| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 795| 795| 					this.FinishOrder();
| 796| 796| 					return;
| 797| 797| 				}
| 798|    |-				else
| 799|    |-				{
|    | 798|+				
| 800| 799| 					this.SetNextState("GARRISON.APPROACHING");
| 801| 800| 					return;
| 802|    |-				}
|    | 801|+				
| 803| 802| 			}
| 804| 803| 
| 805| 804| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1061|1061| 			},
|1062|1062| 		},
|1063|1063| 
|1064|    |-		"GARRISON":{
|    |1064|+		"GARRISON": {
|1065|1065| 			"APPROACHING": {
|1066|1066| 				"enter": function() {
|1067|1067| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2038|2038| 
|2039|2039| 				"Attacked": function(msg) {
|2040|2040| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2041|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2042|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2041|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2042|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2043|2043| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2044|2044| 				},
|2045|2045| 			},
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2197|2197| 					"MovementUpdate": function(msg) {
|2198|2198| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2199|2199| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2200|    |-						if (msg.likelyFailure || 
|    |2200|+						if (msg.likelyFailure ||
|2201|2201| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2202|2202| 							!msg.obstructed && this.CheckRange(this.order.data))
|2203|2203| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2500|2500| 
|2501|2501| 								return type.specific == resourceType.specific &&
|2502|2502| 								    (type.specific != "meat" || resourceTemplate == template);
|2503|    |-						});
|    |2503|+							});
|2504|2504| 
|2505|2505| 						if (nearbyResource)
|2506|2506| 						{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2832|2832| 					{
|2833|2833| 						// The building was already finished/fully repaired before we arrived;
|2834|2834| 						// let the ConstructionFinished handler handle this.
|2835|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2835|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2836|2836| 						return true;
|2837|2837| 					}
|2838|2838| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2832|2832| 					{
|2833|2833| 						// The building was already finished/fully repaired before we arrived;
|2834|2834| 						// let the ConstructionFinished handler handle this.
|2835|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2835|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2836|2836| 						return true;
|2837|2837| 					}
|2838|2838| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3122|3122| 				this.StopTimer();
|3123|3123| 				this.ResetAnimation();
|3124|3124| 				if (this.formationAnimationVariant)
|3125|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3125|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3126|3126| 				else
|3127|3127| 					this.SetDefaultAnimationVariant();
|3128|3128| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3336|3336| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3337|3337| 
|3338|3338| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3339|    |-							// only used for domestic animals
|    |3339|+		// only used for domestic animals
|3340|3340| 
|3341|3341| 		// Reuse the same garrison behaviour for animals.
|3342|3342| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3388|3388| 
|3389|3389| UnitAI.prototype.IsAnimal = function()
|3390|3390| {
|3391|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3391|+	return (!!this.template.NaturalBehaviour);
|3392|3392| };
|3393|3393| 
|3394|3394| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3528|3528| 		{
|3529|3529| 			let index = this.GetCurrentState().indexOf(".");
|3530|3530| 			if (index != -1)
|3531|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3531|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3532|3532| 			this.Stop(false);
|3533|3533| 		}
|3534|3534| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3585|3585| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3586|3586| 			continue;
|3587|3587| 		if (i == 0)
|3588|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3588|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3589|3589| 		else
|3590|3590| 			this.orderQueue.splice(i, 1);
|3591|3591| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3585|3585| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3586|3586| 			continue;
|3587|3587| 		if (i == 0)
|3588|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3588|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3589|3589| 		else
|3590|3590| 			this.orderQueue.splice(i, 1);
|3591|3591| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3714|3714| };
|3715|3715| 
|3716|3716| 
|3717|    |-//// FSM linkage functions ////
|    |3717|+// // FSM linkage functions ////
|3718|3718| 
|3719|3719| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3720|3720| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3886|3886| 				continue;
|3887|3887| 			if (this.orderQueue[i].type == type)
|3888|3888| 				continue;
|3889|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3889|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3890|3890| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3891|3891| 			return;
|3892|3892| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3886|3886| 				continue;
|3887|3887| 			if (this.orderQueue[i].type == type)
|3888|3888| 				continue;
|3889|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3889|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3890|3890| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3891|3891| 			return;
|3892|3892| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4127|4127| 	if (data.timerRepeat === undefined)
|4128|4128| 		this.timer = undefined;
|4129|4129| 
|4130|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4130|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4131|4131| };
|4132|4132| 
|4133|4133| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4127|4127| 	if (data.timerRepeat === undefined)
|4128|4128| 		this.timer = undefined;
|4129|4129| 
|4130|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4130|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4131|4131| };
|4132|4132| 
|4133|4133| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4172|4172| 	// TODO: This is a bit inefficient since every unit listens to every
|4173|4173| 	// construction message - ideally we could scope it to only the one we're building
|4174|4174| 
|4175|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4175|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4176|4176| };
|4177|4177| 
|4178|4178| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4172|4172| 	// TODO: This is a bit inefficient since every unit listens to every
|4173|4173| 	// construction message - ideally we could scope it to only the one we're building
|4174|4174| 
|4175|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4175|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4176|4176| };
|4177|4177| 
|4178|4178| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4211|4211| 	if (msg.fromStatusEffect)
|4212|4212| 		return;
|4213|4213| 
|4214|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4214|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4215|4215| };
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4211|4211| 	if (msg.fromStatusEffect)
|4212|4212| 		return;
|4213|4213| 
|4214|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4214|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4215|4215| };
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4218|4218| {
|4219|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4219|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4220|4220| };
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4218|4218| {
|4219|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4219|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4220|4220| };
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|4223|4223| {
|4224|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4224|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4225|4225| };
|4226|4226| 
|4227|4227| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|4223|4223| {
|4224|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4224|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4225|4225| };
|4226|4226| 
|4227|4227| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4236|4236| 
|4237|4237| UnitAI.prototype.OnPackFinished = function(msg)
|4238|4238| {
|4239|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4239|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4240|4240| };
|4241|4241| 
|4242|4242| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4236|4236| 
|4237|4237| UnitAI.prototype.OnPackFinished = function(msg)
|4238|4238| {
|4239|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4239|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4240|4240| };
|4241|4241| 
|4242|4242| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4239|4239| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4240|4240| };
|4241|4241| 
|4242|    |-//// Helper functions to be called by the FSM ////
|    |4242|+// // Helper functions to be called by the FSM ////
|4243|4243| 
|4244|4244| UnitAI.prototype.GetWalkSpeed = function()
|4245|4245| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4969|4969| UnitAI.prototype.AttackEntityInZone = function(ents)
|4970|4970| {
|4971|4971| 	var target = ents.find(target =>
|4972|    |-		this.CanAttack(target)
|4973|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4972|+		this.CanAttack(target) &&
|    |4973|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4974|4974| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4975|4975| 	);
|4976|4976| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4970|4970| {
|4971|4971| 	var target = ents.find(target =>
|4972|4972| 		this.CanAttack(target)
|4973|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4974|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4973|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4974|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4975|4975| 	);
|4976|4976| 	if (!target)
|4977|4977| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5054|5054| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5055|5055| 	if (this.isGuardOf)
|5056|5056| 	{
|5057|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5057|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5058|5058| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5059|5059| 		if (cmpUnitAI && cmpAttack &&
|5060|5060| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5058|5058| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5059|5059| 		if (cmpUnitAI && cmpAttack &&
|5060|5060| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5061|    |-				return false;
|    |5061|+			return false;
|5062|5062| 	}
|5063|5063| 
|5064|5064| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5096|5096| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5097|5097| 	if (this.isGuardOf)
|5098|5098| 	{
|5099|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5099|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5100|5100| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5101|5101| 		if (cmpUnitAI && cmpAttack &&
|5102|5102| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5109|5109| 	return false;
|5110|5110| };
|5111|5111| 
|5112|    |-//// External interface functions ////
|    |5112|+// // External interface functions ////
|5113|5113| 
|5114|5114| UnitAI.prototype.SetFormationController = function(ent)
|5115|5115| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5265|5265| 	{
|5266|5266| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5267|5267| 			return;
|5268|    |-		else
|5269|    |-			this.RemoveGuard();
|    |5268|+		this.RemoveGuard();
|5270|5269| 	}
|5271|5270| 
|5272|5271| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5599|5599| 
|5600|5600| 	if (this.IsFormationController())
|5601|5601| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5602|    |-}
|    |5602|+};
|5603|5603| /**
|5604|5604|  * Adds trade order to the queue. Either walk to the first market, or
|5605|5605|  * start a new route. Not forced, so it can be interrupted by attacks.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5620|5620| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5621|5621| 	{
|5622|5622| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5623|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5623|+		if (cmpTrader.HasBothMarkets() &&
|5624|5624| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5625|5625| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5626|5626| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5927|5927| 				{
|5928|5928| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5929|5929| 					var targetClasses = this.order.data.targetClasses;
|5930|    |-					if (targetClasses.attack && cmpIdentity
|5931|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5930|+					if (targetClasses.attack && cmpIdentity &&
|    |5931|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5932|5932| 						continue;
|5933|5933| 					if (targetClasses.avoid && cmpIdentity
|5934|5934| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5930|5930| 					if (targetClasses.attack && cmpIdentity
|5931|5931| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5932|5932| 						continue;
|5933|    |-					if (targetClasses.avoid && cmpIdentity
|5934|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5933|+					if (targetClasses.avoid && cmpIdentity &&
|    |5934|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5935|5935| 						continue;
|5936|5936| 					// Only used by the AIs to prevent some choices of targets
|5937|5937| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5953|5953| 		{
|5954|5954| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5955|5955| 			var targetClasses = this.order.data.targetClasses;
|5956|    |-			if (cmpIdentity && targetClasses.attack
|5957|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5956|+			if (cmpIdentity && targetClasses.attack &&
|    |5957|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5958|5958| 				continue;
|5959|5959| 			if (cmpIdentity && targetClasses.avoid
|5960|5960| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5956|5956| 			if (cmpIdentity && targetClasses.attack
|5957|5957| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5958|5958| 				continue;
|5959|    |-			if (cmpIdentity && targetClasses.avoid
|5960|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5959|+			if (cmpIdentity && targetClasses.avoid &&
|    |5960|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5961|5961| 				continue;
|5962|5962| 			// Only used by the AIs to prevent some choices of targets
|5963|5963| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6109|6109| 
|6110|6110| UnitAI.prototype.SetHeldPosition = function(x, z)
|6111|6111| {
|6112|    |-	this.heldPosition = {"x": x, "z": z};
|    |6112|+	this.heldPosition = { "x": x, "z": z};
|6113|6113| };
|6114|6114| 
|6115|6115| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6109|6109| 
|6110|6110| UnitAI.prototype.SetHeldPosition = function(x, z)
|6111|6111| {
|6112|    |-	this.heldPosition = {"x": x, "z": z};
|    |6112|+	this.heldPosition = {"x": x, "z": z };
|6113|6113| };
|6114|6114| 
|6115|6115| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6136|6136| 	return false;
|6137|6137| };
|6138|6138| 
|6139|    |-//// Helper functions ////
|    |6139|+// // Helper functions ////
|6140|6140| 
|6141|6141| /**
|6142|6142|  * General getter for ranges.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6155|6155| 		return undefined;
|6156|6156| 
|6157|6157| 	return component.GetRange(type);
|6158|    |-}
|    |6158|+};
|6159|6159| 
|6160|6160| UnitAI.prototype.CanAttack = function(target)
|6161|6161| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6331|6331| 	return cmpPack && cmpPack.IsPacking();
|6332|6332| };
|6333|6333| 
|6334|    |-//// Formation specific functions ////
|    |6334|+// // Formation specific functions ////
|6335|6335| 
|6336|6336| UnitAI.prototype.IsAttackingAsFormation = function()
|6337|6337| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6336|6336| UnitAI.prototype.IsAttackingAsFormation = function()
|6337|6337| {
|6338|6338| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6339|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6340|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6339|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6340|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6341|6341| };
|6342|6342| 
|6343|6343| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6340|6340| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6341|6341| };
|6342|6342| 
|6343|    |-//// Animal specific functions ////
|    |6343|+// // Animal specific functions ////
|6344|6344| 
|6345|6345| UnitAI.prototype.MoveRandomly = function(distance)
|6346|6346| {

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4032| »   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
|4956| »   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
|4971| »   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
|5037| »   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
|5060| »   »   ····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
|2042| »   »   »   »   »   »   &&·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
|3125| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

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

Freagarach added inline comments.Jun 25 2020, 4:03 PM
binaries/data/mods/public/simulation/components/UnitAI.js
3609 ↗(On Diff #12445)

Notice this goes wrong when an entity can deal damage but not attack (e.g. DeathDamage, ProximityDamage) but that was the case before as well (since the query range would be 0,0). (Unless we are violent.)

But also other code of UnitAI would not be able to cope with entities dealing damage not via cmpAttack.

Freagarach updated this revision to Diff 12456.Jun 25 2020, 4:18 PM

Some var -> let in the vicinity.

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.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 118| 118| 
| 119| 119| 
| 120| 120| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 121|    |-		SetInterval: function() { },
|    | 121|+		"SetInterval": function() { },
| 122| 122| 		SetTimeout: function() { },
| 123| 123| 	});
| 124| 124| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 119| 119| 
| 120| 120| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 121| 121| 		SetInterval: function() { },
| 122|    |-		SetTimeout: function() { },
|    | 122|+		"SetTimeout": function() { },
| 123| 123| 	});
| 124| 124| 
| 125| 125| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 123| 123| 	});
| 124| 124| 
| 125| 125| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 126|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 126|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 126| 126| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 127| 127| 			return 1;
| 128| 128| 		},
| 129|    |-		EnableActiveQuery: function(id) { },
|    | 129|+		"EnableActiveQuery": function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    | 130|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    | 130|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131|    |-		DisableActiveQuery: function(id) { },
|    | 131|+		"DisableActiveQuery": function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
| 134| 134| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132|    |-		GetEntityFlagMask: function(identifier) { },
|    | 132|+		"GetEntityFlagMask": function(identifier) { },
| 133| 133| 	});
| 134| 134| 
| 135| 135| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 	});
| 134| 134| 
| 135| 135| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 136|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 136|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 140|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 140|+		"GetPlayerByID": function(id) { return playerEntity; },
| 141| 141| 		GetNumPlayers: function() { return 2; },
| 142| 142| 	});
| 143| 143| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 140| 140| 		GetPlayerByID: function(id) { return playerEntity; },
| 141|    |-		GetNumPlayers: function() { return 2; },
|    | 141|+		"GetNumPlayers": function() { return 2; },
| 142| 142| 	});
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 142| 142| 	});
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145|    |-		IsAlly: function() { return false; },
|    | 145|+		"IsAlly": function() { return false; },
| 146| 146| 		IsEnemy: function() { return true; },
| 147| 147| 		GetEnemies: function() { return [2]; },
| 148| 148| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145| 145| 		IsAlly: function() { return false; },
| 146|    |-		IsEnemy: function() { return true; },
|    | 146|+		"IsEnemy": function() { return true; },
| 147| 147| 		GetEnemies: function() { return [2]; },
| 148| 148| 	});
| 149| 149| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145| 145| 		IsAlly: function() { return false; },
| 146| 146| 		IsEnemy: function() { return true; },
| 147|    |-		GetEnemies: function() { return [2]; },
|    | 147|+		"GetEnemies": function() { return [2]; },
| 148| 148| 	});
| 149| 149| 
| 150| 150| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 154| 154| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 155| 155| 
| 156| 156| 	AddMock(unit, IID_Identity, {
| 157|    |-		GetClassesList: function() { return []; },
|    | 157|+		"GetClassesList": function() { return []; },
| 158| 158| 	});
| 159| 159| 
| 160| 160| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 158| 158| 	});
| 159| 159| 
| 160| 160| 	AddMock(unit, IID_Ownership, {
| 161|    |-		GetOwner: function() { return 1; },
|    | 161|+		"GetOwner": function() { return 1; },
| 162| 162| 	});
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 162| 162| 	});
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
| 165|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 165|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 163| 163| 
| 164| 164| 	AddMock(unit, IID_Position, {
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166|    |-		GetPosition: function() { return new Vector3D(); },
|    | 166|+		"GetPosition": function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 164| 164| 	AddMock(unit, IID_Position, {
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167|    |-		GetPosition2D: function() { return new Vector2D(); },
|    | 167|+		"GetPosition2D": function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
| 170| 170| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 165| 165| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 168|+		"GetRotation": function() { return { "y": 0 }; },
| 169| 169| 		IsInWorld: function() { return true; },
| 170| 170| 	});
| 171| 171| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 166| 166| 		GetPosition: function() { return new Vector3D(); },
| 167| 167| 		GetPosition2D: function() { return new Vector2D(); },
| 168| 168| 		GetRotation: function() { return { "y": 0 }; },
| 169|    |-		IsInWorld: function() { return true; },
|    | 169|+		"IsInWorld": function() { return true; },
| 170| 170| 	});
| 171| 171| 
| 172| 172| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 179| 179| 	});
| 180| 180| 
| 181| 181| 	AddMock(unit, IID_Vision, {
| 182|    |-		GetRange: function() { return 10; },
|    | 182|+		"GetRange": function() { return 10; },
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 186|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 183| 183| 	});
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 186|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 187|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 184| 184| 
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 187|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 185| 185| 	AddMock(unit, IID_Attack, {
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 188|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 186| 186| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189|    |-		GetPreference: function(t) { return 0; },
|    | 189|+		"GetPreference": function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 187| 187| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 190|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 193| 193| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 188| 188| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191|    |-		CanAttack: function(v) { return true; },
|    | 191|+		"CanAttack": function(v) { return true; },
| 192| 192| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 193| 193| 	});
| 194| 194| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 189| 189| 		GetPreference: function(t) { return 0; },
| 190| 190| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 191| 191| 		CanAttack: function(v) { return true; },
| 192|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 192|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 193| 193| 	});
| 194| 194| 
| 195| 195| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 200| 200| 	if (mode == 1)
| 201| 201| 	{
| 202| 202| 		AddMock(enemy, IID_Health, {
| 203|    |-			GetHitpoints: function() { return 10; },
|    | 203|+			"GetHitpoints": function() { return 10; },
| 204| 204| 		});
| 205| 205| 		AddMock(enemy, IID_UnitAI, {
| 206| 206| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 203| 203| 			GetHitpoints: function() { return 10; },
| 204| 204| 		});
| 205| 205| 		AddMock(enemy, IID_UnitAI, {
| 206|    |-			IsAnimal: function() { return false; }
|    | 206|+			"IsAnimal": function() { return false; }
| 207| 207| 		});
| 208| 208| 	}
| 209| 209| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 208| 208| 	}
| 209| 209| 	else if (mode == 2)
| 210| 210| 		AddMock(enemy, IID_Health, {
| 211|    |-			GetHitpoints: function() { return 0; },
|    | 211|+			"GetHitpoints": function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214| 214| 	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 '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 211| 211| 			GetHitpoints: function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 214|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 211| 211| 			GetHitpoints: function() { return 0; },
| 212| 212| 		});
| 213| 213| 
| 214|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 214|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 215| 215| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
| 218|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 218|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 216| 216| 
| 217| 217| 	AddMock(controller, IID_Position, {
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 219|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 217| 217| 	AddMock(controller, IID_Position, {
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 220|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 218| 218| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 221|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
| 224| 224| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 219| 219| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 222|+		"GetRotation": function() { return { "y": 0 }; },
| 223| 223| 		IsInWorld: function() { return true; },
| 224| 224| 	});
| 225| 225| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 220| 220| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 221| 221| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 222| 222| 		GetRotation: function() { return { "y": 0 }; },
| 223|    |-		IsInWorld: function() { return true; },
|    | 223|+		"IsInWorld": function() { return true; },
| 224| 224| 	});
| 225| 225| 
| 226| 226| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 271| 271| 	var unitAIs = [];
| 272| 272| 
| 273| 273| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 274|    |-		SetInterval: function() { },
|    | 274|+		"SetInterval": function() { },
| 275| 275| 		SetTimeout: function() { },
| 276| 276| 	});
| 277| 277| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 272| 272| 
| 273| 273| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 274| 274| 		SetInterval: function() { },
| 275|    |-		SetTimeout: function() { },
|    | 275|+		"SetTimeout": function() { },
| 276| 276| 	});
| 277| 277| 
| 278| 278| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 277| 277| 
| 278| 278| 
| 279| 279| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 280|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 280|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 281| 281| 			return 1;
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 280| 280| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 281| 281| 			return 1;
| 282| 282| 		},
| 283|    |-		EnableActiveQuery: function(id) { },
|    | 283|+		"EnableActiveQuery": function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 281| 281| 			return 1;
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 284|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
| 287| 287| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 		},
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285|    |-		DisableActiveQuery: function(id) { },
|    | 285|+		"DisableActiveQuery": function(id) { },
| 286| 286| 		GetEntityFlagMask: function(identifier) { },
| 287| 287| 	});
| 288| 288| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 		EnableActiveQuery: function(id) { },
| 284| 284| 		ResetActiveQuery: function(id) { return [enemy]; },
| 285| 285| 		DisableActiveQuery: function(id) { },
| 286|    |-		GetEntityFlagMask: function(identifier) { },
|    | 286|+		"GetEntityFlagMask": function(identifier) { },
| 287| 287| 	});
| 288| 288| 
| 289| 289| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 287| 287| 	});
| 288| 288| 
| 289| 289| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 290|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 290|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 291| 291| 	});
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 291| 291| 	});
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 294|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 294|+		"GetPlayerByID": function(id) { return playerEntity; },
| 295| 295| 		GetNumPlayers: function() { return 2; },
| 296| 296| 	});
| 297| 297| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 292| 292| 
| 293| 293| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 294| 294| 		GetPlayerByID: function(id) { return playerEntity; },
| 295|    |-		GetNumPlayers: function() { return 2; },
|    | 295|+		"GetNumPlayers": function() { return 2; },
| 296| 296| 	});
| 297| 297| 
| 298| 298| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 300| 300| 	});
| 301| 301| 
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303|    |-		IsAlly: function() { return false; },
|    | 303|+		"IsAlly": function() { return false; },
| 304| 304| 		IsEnemy: function() { return true; },
| 305| 305| 		GetEnemies: function() { return [2]; },
| 306| 306| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 301| 301| 
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303| 303| 		IsAlly: function() { return false; },
| 304|    |-		IsEnemy: function() { return true; },
|    | 304|+		"IsEnemy": function() { return true; },
| 305| 305| 		GetEnemies: function() { return [2]; },
| 306| 306| 	});
| 307| 307| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 302| 302| 	AddMock(playerEntity, IID_Player, {
| 303| 303| 		IsAlly: function() { return false; },
| 304| 304| 		IsEnemy: function() { return true; },
| 305|    |-		GetEnemies: function() { return [2]; },
|    | 305|+		"GetEnemies": function() { return [2]; },
| 306| 306| 	});
| 307| 307| 
| 308| 308| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 313| 313| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 314| 314| 
| 315| 315| 		AddMock(unit + i, IID_Identity, {
| 316|    |-			GetClassesList: function() { return []; },
|    | 316|+			"GetClassesList": function() { return []; },
| 317| 317| 		});
| 318| 318| 
| 319| 319| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 317| 317| 		});
| 318| 318| 
| 319| 319| 		AddMock(unit + i, IID_Ownership, {
| 320|    |-			GetOwner: function() { return 1; },
|    | 320|+			"GetOwner": function() { return 1; },
| 321| 321| 		});
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 321| 321| 		});
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 324|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 322| 322| 
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325|    |-			GetPosition: function() { return new Vector3D(); },
|    | 325|+			"GetPosition": function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 323| 323| 		AddMock(unit + i, IID_Position, {
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 326|+			"GetPosition2D": function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
| 329| 329| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 324| 324| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 327|+			"GetRotation": function() { return { "y": 0 }; },
| 328| 328| 			IsInWorld: function() { return true; },
| 329| 329| 		});
| 330| 330| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 325| 325| 			GetPosition: function() { return new Vector3D(); },
| 326| 326| 			GetPosition2D: function() { return new Vector2D(); },
| 327| 327| 			GetRotation: function() { return { "y": 0 }; },
| 328|    |-			IsInWorld: function() { return true; },
|    | 328|+			"IsInWorld": function() { return true; },
| 329| 329| 		});
| 330| 330| 
| 331| 331| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 338| 338| 		});
| 339| 339| 
| 340| 340| 		AddMock(unit + i, IID_Vision, {
| 341|    |-			GetRange: function() { return 10; },
|    | 341|+			"GetRange": function() { return 10; },
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return { "max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 342| 342| 		});
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 345|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 346|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 343| 343| 
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 346|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 344| 344| 		AddMock(unit + i, IID_Attack, {
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 347|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 345| 345| 			GetRange: function() { return {"max":10, "min": 0}; },
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 348|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 351| 351| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 346| 346| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349|    |-			CanAttack: function(v) { return true; },
|    | 349|+			"CanAttack": function(v) { return true; },
| 350| 350| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 351| 351| 		});
| 352| 352| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 347| 347| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 348| 348| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 349| 349| 			CanAttack: function(v) { return true; },
| 350|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 350|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 351| 351| 		});
| 352| 352| 
| 353| 353| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 359| 359| 
| 360| 360| 	// create enemy
| 361| 361| 	AddMock(enemy, IID_Health, {
| 362|    |-		GetHitpoints: function() { return 40; },
|    | 362|+		"GetHitpoints": function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365| 365| 	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 '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 362| 362| 		GetHitpoints: function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 365|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 362| 362| 		GetHitpoints: function() { return 40; },
| 363| 363| 	});
| 364| 364| 
| 365|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 365|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 366| 366| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
| 369|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 369|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 367| 367| 
| 368| 368| 	AddMock(controller, IID_Position, {
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 370|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 368| 368| 	AddMock(controller, IID_Position, {
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 371|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 369| 369| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 372|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
| 375| 375| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 370| 370| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 373|+		"GetRotation": function() { return { "y": 0 }; },
| 374| 374| 		IsInWorld: function() { return true; },
| 375| 375| 	});
| 376| 376| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 371| 371| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 372| 372| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 373| 373| 		GetRotation: function() { return { "y": 0 }; },
| 374|    |-		IsInWorld: function() { return true; },
|    | 374|+		"IsInWorld": function() { return true; },
| 375| 375| 	});
| 376| 376| 
| 377| 377| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return { "max":10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 384| 384| 	});
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 387|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 388| 388| 		CanAttackAsFormation: function() { return false; },
| 389| 389| 	});
| 390| 390| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 385| 385| 
| 386| 386| 	AddMock(controller, IID_Attack, {
| 387| 387| 		GetRange: function() { return {"max":10, "min": 0}; },
| 388|    |-		CanAttackAsFormation: function() { return false; },
|    | 388|+		"CanAttackAsFormation": function() { return false; },
| 389| 389| 	});
| 390| 390| 
| 391| 391| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 397| 397| 	for (let ent of unitAIs)
| 398| 398| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 399| 399| 
| 400|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 400|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 401| 401| 
| 402| 402| 	// let all units be in position
| 403| 403| 	for (let ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 397| 397| 	for (let ent of unitAIs)
| 398| 398| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 399| 399| 
| 400|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 400|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 401| 401| 
| 402| 402| 	// let all units be in position
| 403| 403| 	for (let ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 130| »   »   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
| 309| »   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
| 398| »   »   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
| 407| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 795| 795| 					this.FinishOrder();
| 796| 796| 					return;
| 797| 797| 				}
| 798|    |-				else
| 799|    |-				{
|    | 798|+				
| 800| 799| 					this.SetNextState("GARRISON.APPROACHING");
| 801| 800| 					return;
| 802|    |-				}
|    | 801|+				
| 803| 802| 			}
| 804| 803| 
| 805| 804| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1061|1061| 			},
|1062|1062| 		},
|1063|1063| 
|1064|    |-		"GARRISON":{
|    |1064|+		"GARRISON": {
|1065|1065| 			"APPROACHING": {
|1066|1066| 				"enter": function() {
|1067|1067| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2038|2038| 
|2039|2039| 				"Attacked": function(msg) {
|2040|2040| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2041|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2042|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2041|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2042|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2043|2043| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2044|2044| 				},
|2045|2045| 			},
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2197|2197| 					"MovementUpdate": function(msg) {
|2198|2198| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2199|2199| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2200|    |-						if (msg.likelyFailure || 
|    |2200|+						if (msg.likelyFailure ||
|2201|2201| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2202|2202| 							!msg.obstructed && this.CheckRange(this.order.data))
|2203|2203| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2500|2500| 
|2501|2501| 								return type.specific == resourceType.specific &&
|2502|2502| 								    (type.specific != "meat" || resourceTemplate == template);
|2503|    |-						});
|    |2503|+							});
|2504|2504| 
|2505|2505| 						if (nearbyResource)
|2506|2506| 						{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2832|2832| 					{
|2833|2833| 						// The building was already finished/fully repaired before we arrived;
|2834|2834| 						// let the ConstructionFinished handler handle this.
|2835|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2835|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2836|2836| 						return true;
|2837|2837| 					}
|2838|2838| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2832|2832| 					{
|2833|2833| 						// The building was already finished/fully repaired before we arrived;
|2834|2834| 						// let the ConstructionFinished handler handle this.
|2835|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2835|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2836|2836| 						return true;
|2837|2837| 					}
|2838|2838| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3122|3122| 				this.StopTimer();
|3123|3123| 				this.ResetAnimation();
|3124|3124| 				if (this.formationAnimationVariant)
|3125|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3125|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3126|3126| 				else
|3127|3127| 					this.SetDefaultAnimationVariant();
|3128|3128| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3336|3336| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3337|3337| 
|3338|3338| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3339|    |-							// only used for domestic animals
|    |3339|+		// only used for domestic animals
|3340|3340| 
|3341|3341| 		// Reuse the same garrison behaviour for animals.
|3342|3342| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3388|3388| 
|3389|3389| UnitAI.prototype.IsAnimal = function()
|3390|3390| {
|3391|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3391|+	return (!!this.template.NaturalBehaviour);
|3392|3392| };
|3393|3393| 
|3394|3394| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3528|3528| 		{
|3529|3529| 			let index = this.GetCurrentState().indexOf(".");
|3530|3530| 			if (index != -1)
|3531|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3531|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3532|3532| 			this.Stop(false);
|3533|3533| 		}
|3534|3534| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3585|3585| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3586|3586| 			continue;
|3587|3587| 		if (i == 0)
|3588|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3588|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3589|3589| 		else
|3590|3590| 			this.orderQueue.splice(i, 1);
|3591|3591| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3585|3585| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3586|3586| 			continue;
|3587|3587| 		if (i == 0)
|3588|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3588|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3589|3589| 		else
|3590|3590| 			this.orderQueue.splice(i, 1);
|3591|3591| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3714|3714| };
|3715|3715| 
|3716|3716| 
|3717|    |-//// FSM linkage functions ////
|    |3717|+// // FSM linkage functions ////
|3718|3718| 
|3719|3719| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3720|3720| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3886|3886| 				continue;
|3887|3887| 			if (this.orderQueue[i].type == type)
|3888|3888| 				continue;
|3889|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3889|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3890|3890| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3891|3891| 			return;
|3892|3892| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3886|3886| 				continue;
|3887|3887| 			if (this.orderQueue[i].type == type)
|3888|3888| 				continue;
|3889|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3889|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3890|3890| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3891|3891| 			return;
|3892|3892| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4127|4127| 	if (data.timerRepeat === undefined)
|4128|4128| 		this.timer = undefined;
|4129|4129| 
|4130|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4130|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4131|4131| };
|4132|4132| 
|4133|4133| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4127|4127| 	if (data.timerRepeat === undefined)
|4128|4128| 		this.timer = undefined;
|4129|4129| 
|4130|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4130|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4131|4131| };
|4132|4132| 
|4133|4133| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4172|4172| 	// TODO: This is a bit inefficient since every unit listens to every
|4173|4173| 	// construction message - ideally we could scope it to only the one we're building
|4174|4174| 
|4175|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4175|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4176|4176| };
|4177|4177| 
|4178|4178| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4172|4172| 	// TODO: This is a bit inefficient since every unit listens to every
|4173|4173| 	// construction message - ideally we could scope it to only the one we're building
|4174|4174| 
|4175|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4175|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4176|4176| };
|4177|4177| 
|4178|4178| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4211|4211| 	if (msg.fromStatusEffect)
|4212|4212| 		return;
|4213|4213| 
|4214|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4214|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4215|4215| };
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4211|4211| 	if (msg.fromStatusEffect)
|4212|4212| 		return;
|4213|4213| 
|4214|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4214|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4215|4215| };
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4218|4218| {
|4219|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4219|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4220|4220| };
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4216|4216| 
|4217|4217| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4218|4218| {
|4219|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4219|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4220|4220| };
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|4223|4223| {
|4224|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4224|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4225|4225| };
|4226|4226| 
|4227|4227| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4221|4221| 
|4222|4222| UnitAI.prototype.OnHealthChanged = function(msg)
|4223|4223| {
|4224|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4224|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4225|4225| };
|4226|4226| 
|4227|4227| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4236|4236| 
|4237|4237| UnitAI.prototype.OnPackFinished = function(msg)
|4238|4238| {
|4239|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4239|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4240|4240| };
|4241|4241| 
|4242|4242| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4236|4236| 
|4237|4237| UnitAI.prototype.OnPackFinished = function(msg)
|4238|4238| {
|4239|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4239|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4240|4240| };
|4241|4241| 
|4242|4242| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4239|4239| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4240|4240| };
|4241|4241| 
|4242|    |-//// Helper functions to be called by the FSM ////
|    |4242|+// // Helper functions to be called by the FSM ////
|4243|4243| 
|4244|4244| UnitAI.prototype.GetWalkSpeed = function()
|4245|4245| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4969|4969| UnitAI.prototype.AttackEntityInZone = function(ents)
|4970|4970| {
|4971|4971| 	var target = ents.find(target =>
|4972|    |-		this.CanAttack(target)
|4973|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4972|+		this.CanAttack(target) &&
|    |4973|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4974|4974| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4975|4975| 	);
|4976|4976| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4970|4970| {
|4971|4971| 	var target = ents.find(target =>
|4972|4972| 		this.CanAttack(target)
|4973|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4974|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4973|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4974|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4975|4975| 	);
|4976|4976| 	if (!target)
|4977|4977| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5054|5054| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5055|5055| 	if (this.isGuardOf)
|5056|5056| 	{
|5057|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5057|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5058|5058| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5059|5059| 		if (cmpUnitAI && cmpAttack &&
|5060|5060| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5058|5058| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5059|5059| 		if (cmpUnitAI && cmpAttack &&
|5060|5060| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5061|    |-				return false;
|    |5061|+			return false;
|5062|5062| 	}
|5063|5063| 
|5064|5064| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5096|5096| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5097|5097| 	if (this.isGuardOf)
|5098|5098| 	{
|5099|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5099|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5100|5100| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5101|5101| 		if (cmpUnitAI && cmpAttack &&
|5102|5102| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5109|5109| 	return false;
|5110|5110| };
|5111|5111| 
|5112|    |-//// External interface functions ////
|    |5112|+// // External interface functions ////
|5113|5113| 
|5114|5114| UnitAI.prototype.SetFormationController = function(ent)
|5115|5115| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5265|5265| 	{
|5266|5266| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5267|5267| 			return;
|5268|    |-		else
|5269|    |-			this.RemoveGuard();
|    |5268|+		this.RemoveGuard();
|5270|5269| 	}
|5271|5270| 
|5272|5271| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5599|5599| 
|5600|5600| 	if (this.IsFormationController())
|5601|5601| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5602|    |-}
|    |5602|+};
|5603|5603| /**
|5604|5604|  * Adds trade order to the queue. Either walk to the first market, or
|5605|5605|  * start a new route. Not forced, so it can be interrupted by attacks.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5620|5620| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5621|5621| 	{
|5622|5622| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5623|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5623|+		if (cmpTrader.HasBothMarkets() &&
|5624|5624| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5625|5625| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5626|5626| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5927|5927| 				{
|5928|5928| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5929|5929| 					var targetClasses = this.order.data.targetClasses;
|5930|    |-					if (targetClasses.attack && cmpIdentity
|5931|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5930|+					if (targetClasses.attack && cmpIdentity &&
|    |5931|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5932|5932| 						continue;
|5933|5933| 					if (targetClasses.avoid && cmpIdentity
|5934|5934| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5930|5930| 					if (targetClasses.attack && cmpIdentity
|5931|5931| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5932|5932| 						continue;
|5933|    |-					if (targetClasses.avoid && cmpIdentity
|5934|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5933|+					if (targetClasses.avoid && cmpIdentity &&
|    |5934|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5935|5935| 						continue;
|5936|5936| 					// Only used by the AIs to prevent some choices of targets
|5937|5937| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5953|5953| 		{
|5954|5954| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5955|5955| 			var targetClasses = this.order.data.targetClasses;
|5956|    |-			if (cmpIdentity && targetClasses.attack
|5957|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5956|+			if (cmpIdentity && targetClasses.attack &&
|    |5957|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5958|5958| 				continue;
|5959|5959| 			if (cmpIdentity && targetClasses.avoid
|5960|5960| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5956|5956| 			if (cmpIdentity && targetClasses.attack
|5957|5957| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5958|5958| 				continue;
|5959|    |-			if (cmpIdentity && targetClasses.avoid
|5960|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5959|+			if (cmpIdentity && targetClasses.avoid &&
|    |5960|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5961|5961| 				continue;
|5962|5962| 			// Only used by the AIs to prevent some choices of targets
|5963|5963| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6109|6109| 
|6110|6110| UnitAI.prototype.SetHeldPosition = function(x, z)
|6111|6111| {
|6112|    |-	this.heldPosition = {"x": x, "z": z};
|    |6112|+	this.heldPosition = { "x": x, "z": z};
|6113|6113| };
|6114|6114| 
|6115|6115| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6109|6109| 
|6110|6110| UnitAI.prototype.SetHeldPosition = function(x, z)
|6111|6111| {
|6112|    |-	this.heldPosition = {"x": x, "z": z};
|    |6112|+	this.heldPosition = {"x": x, "z": z };
|6113|6113| };
|6114|6114| 
|6115|6115| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6136|6136| 	return false;
|6137|6137| };
|6138|6138| 
|6139|    |-//// Helper functions ////
|    |6139|+// // Helper functions ////
|6140|6140| 
|6141|6141| /**
|6142|6142|  * General getter for ranges.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6155|6155| 		return undefined;
|6156|6156| 
|6157|6157| 	return component.GetRange(type);
|6158|    |-}
|    |6158|+};
|6159|6159| 
|6160|6160| UnitAI.prototype.CanAttack = function(target)
|6161|6161| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6331|6331| 	return cmpPack && cmpPack.IsPacking();
|6332|6332| };
|6333|6333| 
|6334|    |-//// Formation specific functions ////
|    |6334|+// // Formation specific functions ////
|6335|6335| 
|6336|6336| UnitAI.prototype.IsAttackingAsFormation = function()
|6337|6337| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6336|6336| UnitAI.prototype.IsAttackingAsFormation = function()
|6337|6337| {
|6338|6338| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6339|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6340|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6339|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6340|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6341|6341| };
|6342|6342| 
|6343|6343| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6340|6340| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6341|6341| };
|6342|6342| 
|6343|    |-//// Animal specific functions ////
|    |6343|+// // Animal specific functions ////
|6344|6344| 
|6345|6345| UnitAI.prototype.MoveRandomly = function(distance)
|6346|6346| {

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4032| »   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
|4956| »   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
|4971| »   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
|5037| »   let·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
|5060| »   »   ····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
|2042| »   »   »   »   »   »   &&·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
|3125| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

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

Angen added a subscriber: Angen.Jun 26 2020, 7:45 AM

It is nice idea, but one should do profiling at some point.
Adding another range query is not for free :).
Although I do not expect big perf issue because of that.

This should actually be more performant (in the short run at least) since entities like sheep (non skittish, non attacking) do not have a query anymore, and healers have one (unused) query less now.

A simple "worst-case" perf test would be running Combat Demo Huge and moving some units to attack.

You could then compare the sim update time, since this should not change hashes.

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.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 118| 118| 
| 119| 119| 
| 120| 120| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 121|    |-		SetInterval: function() { },
|    | 121|+		"SetInterval": function() { },
| 122| 122| 		SetTimeout: function() { },
| 123| 123| 	});
| 124| 124| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 119| 119| 
| 120| 120| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 121| 121| 		SetInterval: function() { },
| 122|    |-		SetTimeout: function() { },
|    | 122|+		"SetTimeout": function() { },
| 123| 123| 	});
| 124| 124| 
| 125| 125| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 123| 123| 	});
| 124| 124| 
| 125| 125| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 126|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 126|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 126| 126| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 127| 127| 			return 1;
| 128| 128| 		},
| 129|    |-		EnableActiveQuery: function(id) { },
|    | 129|+		"EnableActiveQuery": function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    | 130|+		"ResetActiveQuery": function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 127| 127| 			return 1;
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130|    |-		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
|    | 130|+		ResetActiveQuery: function(id) { if (mode == 0) return []; return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 128| 128| 		},
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131|    |-		DisableActiveQuery: function(id) { },
|    | 131|+		"DisableActiveQuery": function(id) { },
| 132| 132| 		GetEntityFlagMask: function(identifier) { },
| 133| 133| 	});
| 134| 134| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 129| 129| 		EnableActiveQuery: function(id) { },
| 130| 130| 		ResetActiveQuery: function(id) { if (mode == 0) return []; else return [enemy]; },
| 131| 131| 		DisableActiveQuery: function(id) { },
| 132|    |-		GetEntityFlagMask: function(identifier) { },
|    | 132|+		"GetEntityFlagMask": function(identifier) { },
| 133| 133| 	});
| 134| 134| 
| 135| 135| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 133| 133| 	});
| 134| 134| 
| 135| 135| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 136|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 136|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 137| 137| 	});
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 140|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 140|+		"GetPlayerByID": function(id) { return playerEntity; },
| 141| 141| 		GetNumPlayers: function() { return 2; },
| 142| 142| 	});
| 143| 143| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 138| 138| 
| 139| 139| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 140| 140| 		GetPlayerByID: function(id) { return playerEntity; },
| 141|    |-		GetNumPlayers: function() { return 2; },
|    | 141|+		"GetNumPlayers": function() { return 2; },
| 142| 142| 	});
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 142| 142| 	});
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145|    |-		IsAlly: function() { return false; },
|    | 145|+		"IsAlly": function() { return false; },
| 146| 146| 		IsEnemy: function() { return true; },
| 147| 147| 		GetEnemies: function() { return [2]; },
| 148| 148| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 143| 143| 
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145| 145| 		IsAlly: function() { return false; },
| 146|    |-		IsEnemy: function() { return true; },
|    | 146|+		"IsEnemy": function() { return true; },
| 147| 147| 		GetEnemies: function() { return [2]; },
| 148| 148| 	});
| 149| 149| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 144| 144| 	AddMock(playerEntity, IID_Player, {
| 145| 145| 		IsAlly: function() { return false; },
| 146| 146| 		IsEnemy: function() { return true; },
| 147|    |-		GetEnemies: function() { return [2]; },
|    | 147|+		"GetEnemies": function() { return [2]; },
| 148| 148| 	});
| 149| 149| 
| 150| 150| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 155| 155| 	var unitAI = ConstructComponent(unit, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 156| 156| 
| 157| 157| 	AddMock(unit, IID_Identity, {
| 158|    |-		GetClassesList: function() { return []; },
|    | 158|+		"GetClassesList": function() { return []; },
| 159| 159| 	});
| 160| 160| 
| 161| 161| 	AddMock(unit, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 159| 159| 	});
| 160| 160| 
| 161| 161| 	AddMock(unit, IID_Ownership, {
| 162|    |-		GetOwner: function() { return 1; },
|    | 162|+		"GetOwner": function() { return 1; },
| 163| 163| 	});
| 164| 164| 
| 165| 165| 	AddMock(unit, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 163| 163| 	});
| 164| 164| 
| 165| 165| 	AddMock(unit, IID_Position, {
| 166|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 166|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 167| 167| 		GetPosition: function() { return new Vector3D(); },
| 168| 168| 		GetPosition2D: function() { return new Vector2D(); },
| 169| 169| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 164| 164| 
| 165| 165| 	AddMock(unit, IID_Position, {
| 166| 166| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 167|    |-		GetPosition: function() { return new Vector3D(); },
|    | 167|+		"GetPosition": function() { return new Vector3D(); },
| 168| 168| 		GetPosition2D: function() { return new Vector2D(); },
| 169| 169| 		GetRotation: function() { return { "y": 0 }; },
| 170| 170| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 165| 165| 	AddMock(unit, IID_Position, {
| 166| 166| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 167| 167| 		GetPosition: function() { return new Vector3D(); },
| 168|    |-		GetPosition2D: function() { return new Vector2D(); },
|    | 168|+		"GetPosition2D": function() { return new Vector2D(); },
| 169| 169| 		GetRotation: function() { return { "y": 0 }; },
| 170| 170| 		IsInWorld: function() { return true; },
| 171| 171| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 166| 166| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 167| 167| 		GetPosition: function() { return new Vector3D(); },
| 168| 168| 		GetPosition2D: function() { return new Vector2D(); },
| 169|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 169|+		"GetRotation": function() { return { "y": 0 }; },
| 170| 170| 		IsInWorld: function() { return true; },
| 171| 171| 	});
| 172| 172| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 167| 167| 		GetPosition: function() { return new Vector3D(); },
| 168| 168| 		GetPosition2D: function() { return new Vector2D(); },
| 169| 169| 		GetRotation: function() { return { "y": 0 }; },
| 170|    |-		IsInWorld: function() { return true; },
|    | 170|+		"IsInWorld": function() { return true; },
| 171| 171| 	});
| 172| 172| 
| 173| 173| 	AddMock(unit, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 180| 180| 	});
| 181| 181| 
| 182| 182| 	AddMock(unit, IID_Vision, {
| 183|    |-		GetRange: function() { return 10; },
|    | 183|+		"GetRange": function() { return 10; },
| 184| 184| 	});
| 185| 185| 
| 186| 186| 	AddMock(unit, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 184| 184| 	});
| 185| 185| 
| 186| 186| 	AddMock(unit, IID_Attack, {
| 187|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 187|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 188| 188| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 189| 189| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 190| 190| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 184| 184| 	});
| 185| 185| 
| 186| 186| 	AddMock(unit, IID_Attack, {
| 187|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 187|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 188| 188| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 189| 189| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 190| 190| 		GetPreference: function(t) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 185| 185| 
| 186| 186| 	AddMock(unit, IID_Attack, {
| 187| 187| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 188|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 188|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 189| 189| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 190| 190| 		GetPreference: function(t) { return 0; },
| 191| 191| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 185| 185| 
| 186| 186| 	AddMock(unit, IID_Attack, {
| 187| 187| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 188|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 188|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 189| 189| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 190| 190| 		GetPreference: function(t) { return 0; },
| 191| 191| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 186| 186| 	AddMock(unit, IID_Attack, {
| 187| 187| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 188| 188| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 189|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 189|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 190| 190| 		GetPreference: function(t) { return 0; },
| 191| 191| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 192| 192| 		CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 187| 187| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 188| 188| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 189| 189| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 190|    |-		GetPreference: function(t) { return 0; },
|    | 190|+		"GetPreference": function(t) { return 0; },
| 191| 191| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 192| 192| 		CanAttack: function(v) { return true; },
| 193| 193| 		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 188| 188| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 189| 189| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 190| 190| 		GetPreference: function(t) { return 0; },
| 191|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 191|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 192| 192| 		CanAttack: function(v) { return true; },
| 193| 193| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 194| 194| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 189| 189| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 190| 190| 		GetPreference: function(t) { return 0; },
| 191| 191| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 192|    |-		CanAttack: function(v) { return true; },
|    | 192|+		"CanAttack": function(v) { return true; },
| 193| 193| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 194| 194| 	});
| 195| 195| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 190| 190| 		GetPreference: function(t) { return 0; },
| 191| 191| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 192| 192| 		CanAttack: function(v) { return true; },
| 193|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 193|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 194| 194| 	});
| 195| 195| 
| 196| 196| 	unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 201| 201| 	if (mode == 1)
| 202| 202| 	{
| 203| 203| 		AddMock(enemy, IID_Health, {
| 204|    |-			GetHitpoints: function() { return 10; },
|    | 204|+			"GetHitpoints": function() { return 10; },
| 205| 205| 		});
| 206| 206| 		AddMock(enemy, IID_UnitAI, {
| 207| 207| 			IsAnimal: function() { return false; }
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAnimal' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 204| 204| 			GetHitpoints: function() { return 10; },
| 205| 205| 		});
| 206| 206| 		AddMock(enemy, IID_UnitAI, {
| 207|    |-			IsAnimal: function() { return false; }
|    | 207|+			"IsAnimal": function() { return false; }
| 208| 208| 		});
| 209| 209| 	}
| 210| 210| 	else if (mode == 2)
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 209| 209| 	}
| 210| 210| 	else if (mode == 2)
| 211| 211| 		AddMock(enemy, IID_Health, {
| 212|    |-			GetHitpoints: function() { return 0; },
|    | 212|+			"GetHitpoints": function() { return 0; },
| 213| 213| 		});
| 214| 214| 
| 215| 215| 	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 '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 212| 212| 			GetHitpoints: function() { return 0; },
| 213| 213| 		});
| 214| 214| 
| 215|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 215|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 216| 216| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 217| 217| 
| 218| 218| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 212| 212| 			GetHitpoints: function() { return 0; },
| 213| 213| 		});
| 214| 214| 
| 215|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 215|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 216| 216| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 217| 217| 
| 218| 218| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'JumpTo' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 216| 216| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 217| 217| 
| 218| 218| 	AddMock(controller, IID_Position, {
| 219|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 219|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 220| 220| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 221| 221| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 222| 222| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 217| 217| 
| 218| 218| 	AddMock(controller, IID_Position, {
| 219| 219| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 220|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 220|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 221| 221| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 222| 222| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 223| 223| 		GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 218| 218| 	AddMock(controller, IID_Position, {
| 219| 219| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 220| 220| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 221|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 221|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 222| 222| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 223| 223| 		GetRotation: function() { return { "y": 0 }; },
| 224| 224| 		IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 219| 219| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 220| 220| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 221| 221| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 222|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 222|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 223| 223| 		GetRotation: function() { return { "y": 0 }; },
| 224| 224| 		IsInWorld: function() { return true; },
| 225| 225| 		MoveOutOfWorld: () => {}
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 220| 220| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 221| 221| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 222| 222| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 223|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 223|+		"GetRotation": function() { return { "y": 0 }; },
| 224| 224| 		IsInWorld: function() { return true; },
| 225| 225| 		MoveOutOfWorld: () => {}
| 226| 226| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 221| 221| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 222| 222| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 223| 223| 		GetRotation: function() { return { "y": 0 }; },
| 224|    |-		IsInWorld: function() { return true; },
|    | 224|+		"IsInWorld": function() { return true; },
| 225| 225| 		MoveOutOfWorld: () => {}
| 226| 226| 	});
| 227| 227| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'MoveOutOfWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 222| 222| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 223| 223| 		GetRotation: function() { return { "y": 0 }; },
| 224| 224| 		IsInWorld: function() { return true; },
| 225|    |-		MoveOutOfWorld: () => {}
|    | 225|+		"MoveOutOfWorld": () => {}
| 226| 226| 	});
| 227| 227| 
| 228| 228| 	AddMock(controller, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 273| 273| 	var unitAIs = [];
| 274| 274| 
| 275| 275| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 276|    |-		SetInterval: function() { },
|    | 276|+		"SetInterval": function() { },
| 277| 277| 		SetTimeout: function() { },
| 278| 278| 	});
| 279| 279| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetTimeout' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 274| 274| 
| 275| 275| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 276| 276| 		SetInterval: function() { },
| 277|    |-		SetTimeout: function() { },
|    | 277|+		"SetTimeout": function() { },
| 278| 278| 	});
| 279| 279| 
| 280| 280| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CreateActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 279| 279| 
| 280| 280| 
| 281| 281| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 282|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 282|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 283| 283| 			return 1;
| 284| 284| 		},
| 285| 285| 		EnableActiveQuery: function(id) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'EnableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 282| 282| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 283| 283| 			return 1;
| 284| 284| 		},
| 285|    |-		EnableActiveQuery: function(id) { },
|    | 285|+		"EnableActiveQuery": function(id) { },
| 286| 286| 		ResetActiveQuery: function(id) { return [enemy]; },
| 287| 287| 		DisableActiveQuery: function(id) { },
| 288| 288| 		GetEntityFlagMask: function(identifier) { },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'ResetActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 283| 283| 			return 1;
| 284| 284| 		},
| 285| 285| 		EnableActiveQuery: function(id) { },
| 286|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 286|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 287| 287| 		DisableActiveQuery: function(id) { },
| 288| 288| 		GetEntityFlagMask: function(identifier) { },
| 289| 289| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'DisableActiveQuery' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 284| 284| 		},
| 285| 285| 		EnableActiveQuery: function(id) { },
| 286| 286| 		ResetActiveQuery: function(id) { return [enemy]; },
| 287|    |-		DisableActiveQuery: function(id) { },
|    | 287|+		"DisableActiveQuery": function(id) { },
| 288| 288| 		GetEntityFlagMask: function(identifier) { },
| 289| 289| 	});
| 290| 290| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEntityFlagMask' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 285| 285| 		EnableActiveQuery: function(id) { },
| 286| 286| 		ResetActiveQuery: function(id) { return [enemy]; },
| 287| 287| 		DisableActiveQuery: function(id) { },
| 288|    |-		GetEntityFlagMask: function(identifier) { },
|    | 288|+		"GetEntityFlagMask": function(identifier) { },
| 289| 289| 	});
| 290| 290| 
| 291| 291| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetCurrentTemplateName' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 289| 289| 	});
| 290| 290| 
| 291| 291| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 292|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 292|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 293| 293| 	});
| 294| 294| 
| 295| 295| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPlayerByID' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 293| 293| 	});
| 294| 294| 
| 295| 295| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 296|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 296|+		"GetPlayerByID": function(id) { return playerEntity; },
| 297| 297| 		GetNumPlayers: function() { return 2; },
| 298| 298| 	});
| 299| 299| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetNumPlayers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 294| 294| 
| 295| 295| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 296| 296| 		GetPlayerByID: function(id) { return playerEntity; },
| 297|    |-		GetNumPlayers: function() { return 2; },
|    | 297|+		"GetNumPlayers": function() { return 2; },
| 298| 298| 	});
| 299| 299| 
| 300| 300| 	AddMock(SYSTEM_ENTITY, IID_ObstructionManager, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsAlly' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 302| 302| 	});
| 303| 303| 
| 304| 304| 	AddMock(playerEntity, IID_Player, {
| 305|    |-		IsAlly: function() { return false; },
|    | 305|+		"IsAlly": function() { return false; },
| 306| 306| 		IsEnemy: function() { return true; },
| 307| 307| 		GetEnemies: function() { return [2]; },
| 308| 308| 	});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsEnemy' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 303| 303| 
| 304| 304| 	AddMock(playerEntity, IID_Player, {
| 305| 305| 		IsAlly: function() { return false; },
| 306|    |-		IsEnemy: function() { return true; },
|    | 306|+		"IsEnemy": function() { return true; },
| 307| 307| 		GetEnemies: function() { return [2]; },
| 308| 308| 	});
| 309| 309| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetEnemies' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 304| 304| 	AddMock(playerEntity, IID_Player, {
| 305| 305| 		IsAlly: function() { return false; },
| 306| 306| 		IsEnemy: function() { return true; },
| 307|    |-		GetEnemies: function() { return [2]; },
|    | 307|+		"GetEnemies": function() { return [2]; },
| 308| 308| 	});
| 309| 309| 
| 310| 310| 	// create units
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetClassesList' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 315| 315| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 316| 316| 
| 317| 317| 		AddMock(unit + i, IID_Identity, {
| 318|    |-			GetClassesList: function() { return []; },
|    | 318|+			"GetClassesList": function() { return []; },
| 319| 319| 		});
| 320| 320| 
| 321| 321| 		AddMock(unit + i, IID_Ownership, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetOwner' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 319| 319| 		});
| 320| 320| 
| 321| 321| 		AddMock(unit + i, IID_Ownership, {
| 322|    |-			GetOwner: function() { return 1; },
|    | 322|+			"GetOwner": function() { return 1; },
| 323| 323| 		});
| 324| 324| 
| 325| 325| 		AddMock(unit + i, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTurretParent' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 323| 323| 		});
| 324| 324| 
| 325| 325| 		AddMock(unit + i, IID_Position, {
| 326|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 326|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 327| 327| 			GetPosition: function() { return new Vector3D(); },
| 328| 328| 			GetPosition2D: function() { return new Vector2D(); },
| 329| 329| 			GetRotation: function() { return { "y": 0 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 324| 324| 
| 325| 325| 		AddMock(unit + i, IID_Position, {
| 326| 326| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 327|    |-			GetPosition: function() { return new Vector3D(); },
|    | 327|+			"GetPosition": function() { return new Vector3D(); },
| 328| 328| 			GetPosition2D: function() { return new Vector2D(); },
| 329| 329| 			GetRotation: function() { return { "y": 0 }; },
| 330| 330| 			IsInWorld: function() { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetPosition2D' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 325| 325| 		AddMock(unit + i, IID_Position, {
| 326| 326| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 327| 327| 			GetPosition: function() { return new Vector3D(); },
| 328|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 328|+			"GetPosition2D": function() { return new Vector2D(); },
| 329| 329| 			GetRotation: function() { return { "y": 0 }; },
| 330| 330| 			IsInWorld: function() { return true; },
| 331| 331| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRotation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 326| 326| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 327| 327| 			GetPosition: function() { return new Vector3D(); },
| 328| 328| 			GetPosition2D: function() { return new Vector2D(); },
| 329|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 329|+			"GetRotation": function() { return { "y": 0 }; },
| 330| 330| 			IsInWorld: function() { return true; },
| 331| 331| 		});
| 332| 332| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'IsInWorld' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 327| 327| 			GetPosition: function() { return new Vector3D(); },
| 328| 328| 			GetPosition2D: function() { return new Vector2D(); },
| 329| 329| 			GetRotation: function() { return { "y": 0 }; },
| 330|    |-			IsInWorld: function() { return true; },
|    | 330|+			"IsInWorld": function() { return true; },
| 331| 331| 		});
| 332| 332| 
| 333| 333| 		AddMock(unit + i, IID_UnitMotion, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 340| 340| 		});
| 341| 341| 
| 342| 342| 		AddMock(unit + i, IID_Vision, {
| 343|    |-			GetRange: function() { return 10; },
|    | 343|+			"GetRange": function() { return 10; },
| 344| 344| 		});
| 345| 345| 
| 346| 346| 		AddMock(unit + i, IID_Attack, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 344| 344| 		});
| 345| 345| 
| 346| 346| 		AddMock(unit + i, IID_Attack, {
| 347|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 347|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 348| 348| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 344| 344| 		});
| 345| 345| 
| 346| 346| 		AddMock(unit + i, IID_Attack, {
| 347|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 347|+			GetRange: function() { return { "max":10, "min": 0}; },
| 348| 348| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 344| 344| 		});
| 345| 345| 
| 346| 346| 		AddMock(unit + i, IID_Attack, {
| 347|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 347|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 348| 348| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 344| 344| 		});
| 345| 345| 
| 346| 346| 		AddMock(unit + i, IID_Attack, {
| 347|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 347|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 348| 348| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetFullAttackRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 345| 345| 
| 346| 346| 		AddMock(unit + i, IID_Attack, {
| 347| 347| 			GetRange: function() { return {"max":10, "min": 0}; },
| 348|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 348|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 351| 351| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 345| 345| 
| 346| 346| 		AddMock(unit + i, IID_Attack, {
| 347| 347| 			GetRange: function() { return {"max":10, "min": 0}; },
| 348|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 348|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 351| 351| 			CanAttack: function(v) { return true; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetBestAttackAgainst' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 346| 346| 		AddMock(unit + i, IID_Attack, {
| 347| 347| 			GetRange: function() { return {"max":10, "min": 0}; },
| 348| 348| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 349|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 349|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 351| 351| 			CanAttack: function(v) { return true; },
| 352| 352| 			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetTimers' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 347| 347| 			GetRange: function() { return {"max":10, "min": 0}; },
| 348| 348| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 350|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 351| 351| 			CanAttack: function(v) { return true; },
| 352| 352| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 353| 353| 		});
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttack' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 348| 348| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 351|    |-			CanAttack: function(v) { return true; },
|    | 351|+			"CanAttack": function(v) { return true; },
| 352| 352| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 353| 353| 		});
| 354| 354| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CompareEntitiesByPreference' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 349| 349| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 350| 350| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 351| 351| 			CanAttack: function(v) { return true; },
| 352|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 352|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 353| 353| 		});
| 354| 354| 
| 355| 355| 		unitAI.OnCreate();
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetHitpoints' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 361| 361| 
| 362| 362| 	// create enemy
| 363| 363| 	AddMock(enemy, IID_Health, {
| 364|    |-		GetHitpoints: function() { return 40; },
|    | 364|+		"GetHitpoints": function() { return 40; },
| 365| 365| 	});
| 366| 366| 
| 367| 367| 	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 '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 364| 364| 		GetHitpoints: function() { return 40; },
| 365| 365| 	});
| 366| 366| 
| 367|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 367|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 368| 368| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 369| 369| 
| 370| 370| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 364| 364| 		GetHitpoints: function() { return 40; },
| 365| 365| 	});
| 366| 366| 
| 367|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 367|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 368| 368| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 369| 369| 
| 370| 370| 	AddMock(controller, IID_Position, {
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'GetRange' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 387| 387| 	});
| 388| 388| 
| 389| 389| 	AddMock(controller, IID_Attack, {
| 390|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 390|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 391| 391| 		CanAttackAsFormation: function() { return false; },
| 392| 392| 	});
| 393| 393| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 387| 387| 	});
| 388| 388| 
| 389| 389| 	AddMock(controller, IID_Attack, {
| 390|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 390|+		GetRange: function() { return { "max":10, "min": 0}; },
| 391| 391| 		CanAttackAsFormation: function() { return false; },
| 392| 392| 	});
| 393| 393| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'max'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 387| 387| 	});
| 388| 388| 
| 389| 389| 	AddMock(controller, IID_Attack, {
| 390|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 390|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 391| 391| 		CanAttackAsFormation: function() { return false; },
| 392| 392| 	});
| 393| 393| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 387| 387| 	});
| 388| 388| 
| 389| 389| 	AddMock(controller, IID_Attack, {
| 390|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 390|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 391| 391| 		CanAttackAsFormation: function() { return false; },
| 392| 392| 	});
| 393| 393| 
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'CanAttackAsFormation' found.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 388| 388| 
| 389| 389| 	AddMock(controller, IID_Attack, {
| 390| 390| 		GetRange: function() { return {"max":10, "min": 0}; },
| 391|    |-		CanAttackAsFormation: function() { return false; },
|    | 391|+		"CanAttackAsFormation": function() { return false; },
| 392| 392| 	});
| 393| 393| 
| 394| 394| 	controllerAI.OnCreate();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 400| 400| 	for (let ent of unitAIs)
| 401| 401| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 402| 402| 
| 403|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 403|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 404| 404| 
| 405| 405| 	// let all units be in position
| 406| 406| 	for (let ent of unitAIs)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 400| 400| 	for (let ent of unitAIs)
| 401| 401| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 402| 402| 
| 403|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 403|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 404| 404| 
| 405| 405| 	// let all units be in position
| 406| 406| 	for (let ent of unitAIs)

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 130| »   »   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
| 311| »   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
| 401| »   »   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
| 410| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 798| 798| 					this.FinishOrder();
| 799| 799| 					return;
| 800| 800| 				}
| 801|    |-				else
| 802|    |-				{
|    | 801|+				
| 803| 802| 					this.SetNextState("GARRISON.APPROACHING");
| 804| 803| 					return;
| 805|    |-				}
|    | 804|+				
| 806| 805| 			}
| 807| 806| 
| 808| 807| 			this.SetNextState("GARRISON.GARRISONING");
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'GARRISON'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|1062|1062| 			},
|1063|1063| 		},
|1064|1064| 
|1065|    |-		"GARRISON":{
|    |1065|+		"GARRISON": {
|1066|1066| 			"APPROACHING": {
|1067|1067| 				"enter": function() {
|1068|1068| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2066|2066| 
|2067|2067| 				"Attacked": function(msg) {
|2068|2068| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2069|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2070|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2069|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2070|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2071|2071| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2072|2072| 				},
|2073|2073| 			},
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2225|2225| 					"MovementUpdate": function(msg) {
|2226|2226| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2227|2227| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2228|    |-						if (msg.likelyFailure || 
|    |2228|+						if (msg.likelyFailure ||
|2229|2229| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2230|2230| 							!msg.obstructed && this.CheckRange(this.order.data))
|2231|2231| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2528|2528| 
|2529|2529| 								return type.specific == resourceType.specific &&
|2530|2530| 								    (type.specific != "meat" || resourceTemplate == template);
|2531|    |-						});
|    |2531|+							});
|2532|2532| 
|2533|2533| 						if (nearbyResource)
|2534|2534| 						{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2860|2860| 					{
|2861|2861| 						// The building was already finished/fully repaired before we arrived;
|2862|2862| 						// let the ConstructionFinished handler handle this.
|2863|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2863|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2864|2864| 						return true;
|2865|2865| 					}
|2866|2866| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2860|2860| 					{
|2861|2861| 						// The building was already finished/fully repaired before we arrived;
|2862|2862| 						// let the ConstructionFinished handler handle this.
|2863|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2863|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2864|2864| 						return true;
|2865|2865| 					}
|2866|2866| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3150|3150| 				this.StopTimer();
|3151|3151| 				this.ResetAnimation();
|3152|3152| 				if (this.formationAnimationVariant)
|3153|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3153|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3154|3154| 				else
|3155|3155| 					this.SetDefaultAnimationVariant();
|3156|3156| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3364|3364| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3365|3365| 
|3366|3366| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3367|    |-							// only used for domestic animals
|    |3367|+		// only used for domestic animals
|3368|3368| 
|3369|3369| 		// Reuse the same garrison behaviour for animals.
|3370|3370| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3416|3416| 
|3417|3417| UnitAI.prototype.IsAnimal = function()
|3418|3418| {
|3419|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3419|+	return (!!this.template.NaturalBehaviour);
|3420|3420| };
|3421|3421| 
|3422|3422| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3556|3556| 		{
|3557|3557| 			let index = this.GetCurrentState().indexOf(".");
|3558|3558| 			if (index != -1)
|3559|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3559|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3560|3560| 			this.Stop(false);
|3561|3561| 		}
|3562|3562| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3613|3613| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3614|3614| 			continue;
|3615|3615| 		if (i == 0)
|3616|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3616|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3617|3617| 		else
|3618|3618| 			this.orderQueue.splice(i, 1);
|3619|3619| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3613|3613| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3614|3614| 			continue;
|3615|3615| 		if (i == 0)
|3616|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3616|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3617|3617| 		else
|3618|3618| 			this.orderQueue.splice(i, 1);
|3619|3619| 		Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3742|3742| };
|3743|3743| 
|3744|3744| 
|3745|    |-//// FSM linkage functions ////
|    |3745|+// // FSM linkage functions ////
|3746|3746| 
|3747|3747| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3748|3748| UnitAI.prototype.SetNextState = function(state)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3915|3915| 				continue;
|3916|3916| 			if (this.orderQueue[i].type == type)
|3917|3917| 				continue;
|3918|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3918|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3919|3919| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3920|3920| 			return;
|3921|3921| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3915|3915| 				continue;
|3916|3916| 			if (this.orderQueue[i].type == type)
|3917|3917| 				continue;
|3918|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3918|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3919|3919| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3920|3920| 			return;
|3921|3921| 		}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4156|4156| 	if (data.timerRepeat === undefined)
|4157|4157| 		this.timer = undefined;
|4158|4158| 
|4159|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4159|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4160|4160| };
|4161|4161| 
|4162|4162| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4156|4156| 	if (data.timerRepeat === undefined)
|4157|4157| 		this.timer = undefined;
|4158|4158| 
|4159|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4159|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4160|4160| };
|4161|4161| 
|4162|4162| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4201|4201| 	// TODO: This is a bit inefficient since every unit listens to every
|4202|4202| 	// construction message - ideally we could scope it to only the one we're building
|4203|4203| 
|4204|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4204|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4205|4205| };
|4206|4206| 
|4207|4207| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4201|4201| 	// TODO: This is a bit inefficient since every unit listens to every
|4202|4202| 	// construction message - ideally we could scope it to only the one we're building
|4203|4203| 
|4204|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4204|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4205|4205| };
|4206|4206| 
|4207|4207| UnitAI.prototype.OnGlobalEntityRenamed = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4240|4240| 	if (msg.fromStatusEffect)
|4241|4241| 		return;
|4242|4242| 
|4243|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4243|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4244|4244| };
|4245|4245| 
|4246|4246| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4240|4240| 	if (msg.fromStatusEffect)
|4241|4241| 		return;
|4242|4242| 
|4243|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4243|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4244|4244| };
|4245|4245| 
|4246|4246| UnitAI.prototype.OnGuardedAttacked = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4245|4245| 
|4246|4246| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4247|4247| {
|4248|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4248|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4249|4249| };
|4250|4250| 
|4251|4251| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4245|4245| 
|4246|4246| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4247|4247| {
|4248|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4248|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4249|4249| };
|4250|4250| 
|4251|4251| UnitAI.prototype.OnHealthChanged = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4250|4250| 
|4251|4251| UnitAI.prototype.OnHealthChanged = function(msg)
|4252|4252| {
|4253|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4253|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4254|4254| };
|4255|4255| 
|4256|4256| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4250|4250| 
|4251|4251| UnitAI.prototype.OnHealthChanged = function(msg)
|4252|4252| {
|4253|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4253|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4254|4254| };
|4255|4255| 
|4256|4256| UnitAI.prototype.OnRangeUpdate = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4265|4265| 
|4266|4266| UnitAI.prototype.OnPackFinished = function(msg)
|4267|4267| {
|4268|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4268|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4269|4269| };
|4270|4270| 
|4271|4271| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4265|4265| 
|4266|4266| UnitAI.prototype.OnPackFinished = function(msg)
|4267|4267| {
|4268|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4268|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4269|4269| };
|4270|4270| 
|4271|4271| //// Helper functions to be called by the FSM ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4268|4268| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4269|4269| };
|4270|4270| 
|4271|    |-//// Helper functions to be called by the FSM ////
|    |4271|+// // Helper functions to be called by the FSM ////
|4272|4272| 
|4273|4273| UnitAI.prototype.GetWalkSpeed = function()
|4274|4274| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4998|4998| UnitAI.prototype.AttackEntityInZone = function(ents)
|4999|4999| {
|5000|5000| 	var target = ents.find(target =>
|5001|    |-		this.CanAttack(target)
|5002|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |5001|+		this.CanAttack(target) &&
|    |5002|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5003|5003| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5004|5004| 	);
|5005|5005| 	if (!target)
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4999|4999| {
|5000|5000| 	var target = ents.find(target =>
|5001|5001| 		this.CanAttack(target)
|5002|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|5003|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |5002|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |5003|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|5004|5004| 	);
|5005|5005| 	if (!target)
|5006|5006| 		return false;
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5083|5083| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5084|5084| 	if (this.isGuardOf)
|5085|5085| 	{
|5086|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5086|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5087|5087| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5088|5088| 		if (cmpUnitAI && cmpAttack &&
|5089|5089| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 3 tabs but found 4.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5087|5087| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5088|5088| 		if (cmpUnitAI && cmpAttack &&
|5089|5089| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5090|    |-				return false;
|    |5090|+			return false;
|5091|5091| 	}
|5092|5092| 
|5093|5093| 	// Stop if we're in hold-ground mode and it's too far from the holding point
|    | [NORMAL] ESLintBear (no-multi-spaces):
|    | Multiple spaces found before 'Engine'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5125|5125| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5126|5126| 	if (this.isGuardOf)
|5127|5127| 	{
|5128|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5128|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5129|5129| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5130|5130| 		if (cmpUnitAI && cmpAttack &&
|5131|5131| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5138|5138| 	return false;
|5139|5139| };
|5140|5140| 
|5141|    |-//// External interface functions ////
|    |5141|+// // External interface functions ////
|5142|5142| 
|5143|5143| UnitAI.prototype.SetFormationController = function(ent)
|5144|5144| {
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5294|5294| 	{
|5295|5295| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5296|5296| 			return;
|5297|    |-		else
|5298|    |-			this.RemoveGuard();
|    |5297|+		this.RemoveGuard();
|5299|5298| 	}
|5300|5299| 
|5301|5300| 	this.AddOrder("Guard", { "target": target, "force": false }, queued);
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5628|5628| 
|5629|5629| 	if (this.IsFormationController())
|5630|5630| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5631|    |-}
|    |5631|+};
|5632|5632| /**
|5633|5633|  * Adds trade order to the queue. Either walk to the first market, or
|5634|5634|  * start a new route. Not forced, so it can be interrupted by attacks.
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5649|5649| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5650|5650| 	{
|5651|5651| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5652|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5652|+		if (cmpTrader.HasBothMarkets() &&
|5653|5653| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5654|5654| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5655|5655| 		{
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5956|5956| 				{
|5957|5957| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5958|5958| 					var targetClasses = this.order.data.targetClasses;
|5959|    |-					if (targetClasses.attack && cmpIdentity
|5960|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5959|+					if (targetClasses.attack && cmpIdentity &&
|    |5960|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5961|5961| 						continue;
|5962|5962| 					if (targetClasses.avoid && cmpIdentity
|5963|5963| 						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5959|5959| 					if (targetClasses.attack && cmpIdentity
|5960|5960| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5961|5961| 						continue;
|5962|    |-					if (targetClasses.avoid && cmpIdentity
|5963|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5962|+					if (targetClasses.avoid && cmpIdentity &&
|    |5963|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5964|5964| 						continue;
|5965|5965| 					// Only used by the AIs to prevent some choices of targets
|5966|5966| 					if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5982|5982| 		{
|5983|5983| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5984|5984| 			var targetClasses = this.order.data.targetClasses;
|5985|    |-			if (cmpIdentity && targetClasses.attack
|5986|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5985|+			if (cmpIdentity && targetClasses.attack &&
|    |5986|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5987|5987| 				continue;
|5988|5988| 			if (cmpIdentity && targetClasses.avoid
|5989|5989| 				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|5985|5985| 			if (cmpIdentity && targetClasses.attack
|5986|5986| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5987|5987| 				continue;
|5988|    |-			if (cmpIdentity && targetClasses.avoid
|5989|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5988|+			if (cmpIdentity && targetClasses.avoid &&
|    |5989|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5990|5990| 				continue;
|5991|5991| 			// Only used by the AIs to prevent some choices of targets
|5992|5992| 			if (targetClasses.vetoEntities && targetClasses.vetoEntities[targ])
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6138|6138| 
|6139|6139| UnitAI.prototype.SetHeldPosition = function(x, z)
|6140|6140| {
|6141|    |-	this.heldPosition = {"x": x, "z": z};
|    |6141|+	this.heldPosition = { "x": x, "z": z};
|6142|6142| };
|6143|6143| 
|6144|6144| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6138|6138| 
|6139|6139| UnitAI.prototype.SetHeldPosition = function(x, z)
|6140|6140| {
|6141|    |-	this.heldPosition = {"x": x, "z": z};
|    |6141|+	this.heldPosition = {"x": x, "z": z };
|6142|6142| };
|6143|6143| 
|6144|6144| UnitAI.prototype.SetHeldPositionOnEntity = function(entity)
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6165|6165| 	return false;
|6166|6166| };
|6167|6167| 
|6168|    |-//// Helper functions ////
|    |6168|+// // Helper functions ////
|6169|6169| 
|6170|6170| /**
|6171|6171|  * General getter for ranges.
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6184|6184| 		return undefined;
|6185|6185| 
|6186|6186| 	return component.GetRange(type);
|6187|    |-}
|    |6187|+};
|6188|6188| 
|6189|6189| UnitAI.prototype.CanAttack = function(target)
|6190|6190| {
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6360|6360| 	return cmpPack && cmpPack.IsPacking();
|6361|6361| };
|6362|6362| 
|6363|    |-//// Formation specific functions ////
|    |6363|+// // Formation specific functions ////
|6364|6364| 
|6365|6365| UnitAI.prototype.IsAttackingAsFormation = function()
|6366|6366| {
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6365|6365| UnitAI.prototype.IsAttackingAsFormation = function()
|6366|6366| {
|6367|6367| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6368|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6369|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6368|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6369|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6370|6370| };
|6371|6371| 
|6372|6372| //// Animal specific functions ////
|    | [NORMAL] ESLintBear (spaced-comment):
|    | Expected space or tab after '//' in comment.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|6369|6369| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6370|6370| };
|6371|6371| 
|6372|    |-//// Animal specific functions ////
|    |6372|+// // Animal specific functions ////
|6373|6373| 
|6374|6374| UnitAI.prototype.MoveRandomly = function(distance)
|6375|6375| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4061| »   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
|4985| »   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
|5000| »   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
|5066| »   let·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
|5089| »   »   ····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
|2070| »   »   »   »   »   »   &&·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
|3153| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

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

A simple "worst-case" perf test would be running Combat Demo Huge and moving some units to attack.
You could then compare the sim update time, since this should not change hashes.

No (significant) performance change was seen with CDH.

bb accepted this revision.Thu, Jul 23, 8:55 PM
bb added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
3635–3637 ↗(On Diff #12415)

So I guess we should end up with having the player's code removed, but changing IID_Identity below in IID_Attack so we only respond to entities with an attack component. I.e. deers would run away from tigers, but not from eachother. But can agree on splitting it too

This revision is now accepted and ready to land.Thu, Jul 23, 8:55 PM
This revision was automatically updated to reflect the committed changes.
Freagarach marked 5 inline comments as done.