Page MenuHomeWildfire Games

[#2] Trigger an exit-reentry when the target entity of an order is renamed
AbandonedPublic

Authored by wraitii on May 31 2020, 8:51 PM.

Details

Reviewers
None
Trac Tickets
#5584
Summary

As noted by gameboy, that diff broken animal and formation member attacking. Reuploaded here with that fixed.
I also had some confusion over how this interacted with gates, so I think I'll give it a deeper look.

Original description on D2735:

This fixes a class of bugs related to entity renaming (upgrade, promotion, construction, mirages).
It is essentially the same spirit as rP22023.

UnitAI properly update orders to use the new target, but the currently active FSM state was not running any check that the new target was valid (nor, in fact, handling anything specially). The simplest fix is to exit-reenter.
By processing a message, this can be overwritten easily should there be cases where we want to handle that explicitly.

This can be seen as a stronger variant of rP23449, fixing related issues in other cases.

UnitMotion is still not made aware of entity renaming, as the leave-enter makes it irrelevant in practice. It still may be a good idea to implement that someday.


With regards to information leak (a concern here because units might bet renaming information that they should not have):

  • Mirages are correct-by-design
  • States for which this is relevant should already react to a unit going in FoW. Indeed, combat states already do this.
  • The OG bug is that UnitMotion should fail to track a target that is no longer visible, but that is currently unimplemented. Relying on incorrect behaviour sounds broken, and I this does not change UnitAI states significantly from their current behaviour (units might stop where they would have carried on moving before in rare cases).

Chasing was fixed in rP23566.


Fixes the concern raised at rP20393. Fixes #5584.


As reported by Freagarach: https://code.wildfiregames.com/rP22526#38783
As reported by bb: https://code.wildfiregames.com/rP20393#33645

Other, unreported variants of this issue likely exist (I have not found any from a rapid search on Trac).

I have added a test case for bb's example, as well as 2 other cases. This is not exhaustive, but it validates that we are not doing anything too odd.

Test Plan

Agree with the implementation of the fix.

Review all orders for correctness.

Event Timeline

wraitii created this revision.May 31 2020, 8:51 PM

Build failure - The Moirai have given mortals hearts that can endure.

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

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/878/display/redirect

wraitii added inline comments.May 31 2020, 8:53 PM
binaries/data/mods/public/simulation/components/UnitAI.js
2997

should probably update here also. This is from rP9797 .

wraitii updated this revision to Diff 12080.Jun 1 2020, 9:03 AM

Investigating further:

  • it seems one could patrol to a target by changing the GUI. Unlikely to have worked before, fixed by this patch.
  • Guarding has some seriously custom code in Transform.js to maintain the list of guards. It seems we could clean it up a bit.
  • As noted by bb, fleeing was broken before. This fixes it but plays the "panic" sound again, so I'll add a custom handler.
  • Garrison approaching will request a new pickup, which seems fair. Garrisoned early-exits.
  • Chasing & repairing have been noted and still work correctly.

Other states are uninteresting with regards to this change.


Garrisoning and guarding seem like they could benefit from a refactor that would simplify other code (see also D2368), but I don't intend to do it in this diff.

Vulcan added a comment.Jun 1 2020, 9:05 AM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/880/display/redirect

Vulcan added a comment.Jun 1 2020, 9:06 AM

Build failure - The Moirai have given mortals hearts that can endure.

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

wraitii updated this revision to Diff 12150.Jun 5 2020, 7:09 PM

Rebase, remove debug.
Ran another battery of testing, I plan on committing this shortly.

Vulcan added a comment.Jun 5 2020, 7:14 PM

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

Linter detected issues:
Executing section Source...
Executing section JS...
|    | [NORMAL] ESLintBear (quote-props):
|    | Unquoted property 'SetInterval' found.
|----|    | /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 (var 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 (var 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 (var 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 (var 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
| 403| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

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

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
| 791| 791| 					this.FinishOrder();
| 792| 792| 					return;
| 793| 793| 				}
| 794|    |-				else
| 795|    |-				{
|    | 794|+				
| 796| 795| 					this.SetNextState("GARRISON.APPROACHING");
| 797| 796| 					return;
| 798|    |-				}
|    | 797|+				
| 799| 798| 			}
| 800| 799| 
| 801| 800| 			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
|1063|1063| 			},
|1064|1064| 		},
|1065|1065| 
|1066|    |-		"GARRISON":{
|    |1066|+		"GARRISON": {
|1067|1067| 			"APPROACHING": {
|1068|1068| 				"enter": function() {
|1069|1069| 					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
|2052|2052| 
|2053|2053| 				"Attacked": function(msg) {
|2054|2054| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2055|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2056|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2055|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2056|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2057|2057| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2058|2058| 				},
|2059|2059| 			},
|    | [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
|2211|2211| 					"MovementUpdate": function(msg) {
|2212|2212| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2213|2213| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2214|    |-						if (msg.likelyFailure || 
|    |2214|+						if (msg.likelyFailure ||
|2215|2215| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2216|2216| 							!msg.obstructed && this.CheckRange(this.order.data))
|2217|2217| 							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
|2514|2514| 
|2515|2515| 								return type.specific == resourceType.specific &&
|2516|2516| 								    (type.specific != "meat" || resourceTemplate == template);
|2517|    |-						});
|    |2517|+							});
|2518|2518| 
|2519|2519| 						if (nearbyResource)
|2520|2520| 						{
|    | [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
|2846|2846| 					{
|2847|2847| 						// The building was already finished/fully repaired before we arrived;
|2848|2848| 						// let the ConstructionFinished handler handle this.
|2849|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2849|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2850|2850| 						return true;
|2851|2851| 					}
|2852|2852| 
|    | [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
|2846|2846| 					{
|2847|2847| 						// The building was already finished/fully repaired before we arrived;
|2848|2848| 						// let the ConstructionFinished handler handle this.
|2849|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2849|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2850|2850| 						return true;
|2851|2851| 					}
|2852|2852| 
|    | [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
|3136|3136| 				this.StopTimer();
|3137|3137| 				this.ResetAnimation();
|3138|3138| 				if (this.formationAnimationVariant)
|3139|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3139|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3140|3140| 				else
|3141|3141| 					this.SetDefaultAnimationVariant();
|3142|3142| 				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
|3362|3362| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3363|3363| 
|3364|3364| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3365|    |-							// only used for domestic animals
|    |3365|+		// only used for domestic animals
|3366|3366| 
|3367|3367| 		// Reuse the same garrison behaviour for animals.
|3368|3368| 		"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
|3425|3425| 
|3426|3426| UnitAI.prototype.IsAnimal = function()
|3427|3427| {
|3428|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3428|+	return (!!this.template.NaturalBehaviour);
|3429|3429| };
|3430|3430| 
|3431|3431| 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
|3565|3565| 		{
|3566|3566| 			let index = this.GetCurrentState().indexOf(".");
|3567|3567| 			if (index != -1)
|3568|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3568|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3569|3569| 			this.Stop(false);
|3570|3570| 		}
|3571|3571| 
|    | [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
|3621|3621| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3622|3622| 			continue;
|3623|3623| 		if (i == 0)
|3624|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3624|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3625|3625| 		else
|3626|3626| 			this.orderQueue.splice(i, 1);
|3627|3627| 		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
|3621|3621| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3622|3622| 			continue;
|3623|3623| 		if (i == 0)
|3624|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3624|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3625|3625| 		else
|3626|3626| 			this.orderQueue.splice(i, 1);
|3627|3627| 		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
|3708|3708| };
|3709|3709| 
|3710|3710| 
|3711|    |-//// FSM linkage functions ////
|    |3711|+// // FSM linkage functions ////
|3712|3712| 
|3713|3713| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3714|3714| 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
|3879|3879| 				continue;
|3880|3880| 			if (this.orderQueue[i].type == type)
|3881|3881| 				continue;
|3882|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3882|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3883|3883| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3884|3884| 			return;
|3885|3885| 		}
|    | [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
|3879|3879| 				continue;
|3880|3880| 			if (this.orderQueue[i].type == type)
|3881|3881| 				continue;
|3882|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3882|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3883|3883| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3884|3884| 			return;
|3885|3885| 		}
|    | [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
|4120|4120| 	if (data.timerRepeat === undefined)
|4121|4121| 		this.timer = undefined;
|4122|4122| 
|4123|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4123|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4124|4124| };
|4125|4125| 
|4126|4126| /**
|    | [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
|4120|4120| 	if (data.timerRepeat === undefined)
|4121|4121| 		this.timer = undefined;
|4122|4122| 
|4123|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4123|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4124|4124| };
|4125|4125| 
|4126|4126| /**
|    | [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
|4165|4165| 	// TODO: This is a bit inefficient since every unit listens to every
|4166|4166| 	// construction message - ideally we could scope it to only the one we're building
|4167|4167| 
|4168|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4168|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4169|4169| };
|4170|4170| 
|4171|4171| 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
|4165|4165| 	// TODO: This is a bit inefficient since every unit listens to every
|4166|4166| 	// construction message - ideally we could scope it to only the one we're building
|4167|4167| 
|4168|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4168|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4169|4169| };
|4170|4170| 
|4171|4171| 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
|4204|4204| 	if (msg.fromStatusEffect)
|4205|4205| 		return;
|4206|4206| 
|4207|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4207|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4208|4208| };
|4209|4209| 
|4210|4210| 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
|4204|4204| 	if (msg.fromStatusEffect)
|4205|4205| 		return;
|4206|4206| 
|4207|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4207|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4208|4208| };
|4209|4209| 
|4210|4210| 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
|4209|4209| 
|4210|4210| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4211|4211| {
|4212|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4212|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4213|4213| };
|4214|4214| 
|4215|4215| 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
|4209|4209| 
|4210|4210| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4211|4211| {
|4212|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4212|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4213|4213| };
|4214|4214| 
|4215|4215| 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
|4214|4214| 
|4215|4215| UnitAI.prototype.OnHealthChanged = function(msg)
|4216|4216| {
|4217|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4217|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4218|4218| };
|4219|4219| 
|4220|4220| 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
|4214|4214| 
|4215|4215| UnitAI.prototype.OnHealthChanged = function(msg)
|4216|4216| {
|4217|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4217|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4218|4218| };
|4219|4219| 
|4220|4220| 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
|4220|4220| UnitAI.prototype.OnRangeUpdate = function(msg)
|4221|4221| {
|4222|4222| 	if (msg.tag == this.losRangeQuery)
|4223|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4223|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4224|4224| 	else if (msg.tag == this.losHealRangeQuery)
|4225|4225| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4226|4226| };
|    | [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
|4220|4220| UnitAI.prototype.OnRangeUpdate = function(msg)
|4221|4221| {
|4222|4222| 	if (msg.tag == this.losRangeQuery)
|4223|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4223|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4224|4224| 	else if (msg.tag == this.losHealRangeQuery)
|4225|4225| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4226|4226| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4222|4222| 	if (msg.tag == this.losRangeQuery)
|4223|4223| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4224|4224| 	else if (msg.tag == this.losHealRangeQuery)
|4225|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4225|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4226|4226| };
|4227|4227| 
|4228|4228| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4222|4222| 	if (msg.tag == this.losRangeQuery)
|4223|4223| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4224|4224| 	else if (msg.tag == this.losHealRangeQuery)
|4225|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4225|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4226|4226| };
|4227|4227| 
|4228|4228| UnitAI.prototype.OnPackFinished = function(msg)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4227|4227| 
|4228|4228| UnitAI.prototype.OnPackFinished = function(msg)
|4229|4229| {
|4230|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4230|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4231|4231| };
|4232|4232| 
|4233|4233| //// 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
|4227|4227| 
|4228|4228| UnitAI.prototype.OnPackFinished = function(msg)
|4229|4229| {
|4230|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4230|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4231|4231| };
|4232|4232| 
|4233|4233| //// 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
|4230|4230| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4231|4231| };
|4232|4232| 
|4233|    |-//// Helper functions to be called by the FSM ////
|    |4233|+// // Helper functions to be called by the FSM ////
|4234|4234| 
|4235|4235| UnitAI.prototype.GetWalkSpeed = function()
|4236|4236| {
|    | [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
|4960|4960| UnitAI.prototype.AttackEntityInZone = function(ents)
|4961|4961| {
|4962|4962| 	var target = ents.find(target =>
|4963|    |-		this.CanAttack(target)
|4964|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4963|+		this.CanAttack(target) &&
|    |4964|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4965|4965| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4966|4966| 	);
|4967|4967| 	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
|4961|4961| {
|4962|4962| 	var target = ents.find(target =>
|4963|4963| 		this.CanAttack(target)
|4964|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4965|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4964|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4965|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4966|4966| 	);
|4967|4967| 	if (!target)
|4968|4968| 		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
|5027|5027| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5028|5028| 	if (this.isGuardOf)
|5029|5029| 	{
|5030|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5030|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5031|5031| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5032|5032| 		if (cmpUnitAI && cmpAttack &&
|5033|5033| 		    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
|5031|5031| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5032|5032| 		if (cmpUnitAI && cmpAttack &&
|5033|5033| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5034|    |-				return false;
|    |5034|+			return false;
|5035|5035| 	}
|5036|5036| 
|5037|5037| 	// 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
|5069|5069| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5070|5070| 	if (this.isGuardOf)
|5071|5071| 	{
|5072|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5072|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5073|5073| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5074|5074| 		if (cmpUnitAI && cmpAttack &&
|5075|5075| 		    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
|5082|5082| 	return false;
|5083|5083| };
|5084|5084| 
|5085|    |-//// External interface functions ////
|    |5085|+// // External interface functions ////
|5086|5086| 
|5087|5087| UnitAI.prototype.SetFormationController = function(ent)
|5088|5088| {
|    | [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
|5238|5238| 	{
|5239|5239| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5240|5240| 			return;
|5241|    |-		else
|5242|    |-			this.RemoveGuard();
|    |5241|+		this.RemoveGuard();
|5243|5242| 	}
|5244|5243| 
|5245|5244| 	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
|5572|5572| 
|5573|5573| 	if (this.IsFormationController())
|5574|5574| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5575|    |-}
|    |5575|+};
|5576|5576| /**
|5577|5577|  * Adds trade order to the queue. Either walk to the first market, or
|5578|5578|  * 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
|5593|5593| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5594|5594| 	{
|5595|5595| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5596|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5596|+		if (cmpTrader.HasBothMarkets() &&
|5597|5597| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5598|5598| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5599|5599| 		{
|    | [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
|5874|5874| 				{
|5875|5875| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5876|5876| 					var targetClasses = this.order.data.targetClasses;
|5877|    |-					if (targetClasses.attack && cmpIdentity
|5878|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5877|+					if (targetClasses.attack && cmpIdentity &&
|    |5878|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5879|5879| 						continue;
|5880|5880| 					if (targetClasses.avoid && cmpIdentity
|5881|5881| 						&& 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
|5877|5877| 					if (targetClasses.attack && cmpIdentity
|5878|5878| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5879|5879| 						continue;
|5880|    |-					if (targetClasses.avoid && cmpIdentity
|5881|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5880|+					if (targetClasses.avoid && cmpIdentity &&
|    |5881|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5882|5882| 						continue;
|5883|5883| 					// Only used by the AIs to prevent some choices of targets
|5884|5884| 					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
|5900|5900| 		{
|5901|5901| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5902|5902| 			var targetClasses = this.order.data.targetClasses;
|5903|    |-			if (cmpIdentity && targetClasses.attack
|5904|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5903|+			if (cmpIdentity && targetClasses.attack &&
|    |5904|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5905|5905| 				continue;
|5906|5906| 			if (cmpIdentity && targetClasses.avoid
|5907|5907| 				&& 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
|5903|5903| 			if (cmpIdentity && targetClasses.attack
|5904|5904| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5905|5905| 				continue;
|5906|    |-			if (cmpIdentity && targetClasses.avoid
|5907|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5906|+			if (cmpIdentity && targetClasses.avoid &&
|    |5907|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5908|5908| 				continue;
|5909|5909| 			// Only used by the AIs to prevent some choices of targets
|5910|5910| 			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
|6063|6063| 
|6064|6064| UnitAI.prototype.SetHeldPosition = function(x, z)
|6065|6065| {
|6066|    |-	this.heldPosition = {"x": x, "z": z};
|    |6066|+	this.heldPosition = { "x": x, "z": z};
|6067|6067| };
|6068|6068| 
|6069|6069| 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
|6063|6063| 
|6064|6064| UnitAI.prototype.SetHeldPosition = function(x, z)
|6065|6065| {
|6066|    |-	this.heldPosition = {"x": x, "z": z};
|    |6066|+	this.heldPosition = {"x": x, "z": z };
|6067|6067| };
|6068|6068| 
|6069|6069| 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
|6090|6090| 	return false;
|6091|6091| };
|6092|6092| 
|6093|    |-//// Helper functions ////
|    |6093|+// // Helper functions ////
|6094|6094| 
|6095|6095| /**
|6096|6096|  * 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
|6109|6109| 		return undefined;
|6110|6110| 
|6111|6111| 	return component.GetRange(type);
|6112|    |-}
|    |6112|+};
|6113|6113| 
|6114|6114| UnitAI.prototype.CanAttack = function(target)
|6115|6115| {
|    | [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
|6285|6285| 	return cmpPack && cmpPack.IsPacking();
|6286|6286| };
|6287|6287| 
|6288|    |-//// Formation specific functions ////
|    |6288|+// // Formation specific functions ////
|6289|6289| 
|6290|6290| UnitAI.prototype.IsAttackingAsFormation = function()
|6291|6291| {
|    | [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
|6290|6290| UnitAI.prototype.IsAttackingAsFormation = function()
|6291|6291| {
|6292|6292| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6293|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6294|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6293|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6294|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6295|6295| };
|6296|6296| 
|6297|6297| //// 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
|6294|6294| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6295|6295| };
|6296|6296| 
|6297|    |-//// Animal specific functions ////
|    |6297|+// // Animal specific functions ////
|6298|6298| 
|6299|6299| UnitAI.prototype.MoveRandomly = function(distance)
|6300|6300| {

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4025| »   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
|4947| »   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
|4962| »   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
|5010| »   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
|5033| »   »   ····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
|2056| »   »   »   »   »   »   &&·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
|3139| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/UnitAI.js
|6294| »   »   &&·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/2327/display/redirect

Stan added a subscriber: Stan.Jun 5 2020, 7:26 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/UnitAI.js
4174

Do we need to check twice for order.data or can it merged somehow to early continue?

wraitii added inline comments.Jun 6 2020, 8:06 AM
binaries/data/mods/public/simulation/components/UnitAI.js
4174

Seems a little annoying for limited benefit to be honest.

wraitii abandoned this revision.Jun 6 2020, 8:41 AM

Err, I copied the commit message from the original commit, but this was merged in rP23742 :P