Page MenuHomeWildfire Games

Fix formations reshaping incorrectly & related issues.
Needs ReviewPublic

Authored by wraitii on Sat, May 23, 9:51 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Trac Tickets
#5443
Summary

Bug:
When giving individual-orders to units in formation (gather, attack), there is an odd bug: if the target moves away too much, the entities suddenly reform at the original formation centre, then carry on with their order.
Fix: ShapeUpdate, called every second, should check for this.rearrange, which is correctly set in UnitAI.

A side-effect of this bug is that the formation-controller has a Position, which doesn't make sense while its members are carrying out individual tasks. So we should move it out the world while in "MEMBER" states, to prevent confusion and errors (afaik this doesn't actually fix any bug, but who knows).

This forces me to revert the bit in rP22506 that made IDLE formation units go back to their offset (since there may be no offset). Further, that commit introduced redundant state with formations, and issues (such as an infinite loop fixed in rP23217). This is all gone.
Instead, when the formation MEMBER state is done, if it has no following orders, it will reform explicitly, moving back into the world and moving entities back into formation. This seems OK enough to me.


This fixes Individual orders (gather, attack, return resource, construct...) for formations. Hunting looks odd because units switch from combat.approaching to walkandfight when the target dies, and thus they clump around the resource before switching into Gather, but it works.


Additional fix:
rP23346 fixed units not facing correctly after a formation-walk. The fix is correct, but we can actually make it slightly more self-contained by moving everything in leave. Also clarify comments.


Additional fix:
This fixes some very broken code in rP22447 in FORMATIONMEMBER.WALKING.MovementUpdate. It never errored because formation controllers weren't moved out of the world before.


Reported by Angen & Freagarach at #5443

Test Plan

Make a formation and give out a few individual orders, such as building, hunting, ...

Note that without D2702, queued orders may work improperly.

Event Timeline

wraitii created this revision.Sat, May 23, 9:51 AM

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

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

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

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

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

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

wraitii updated this revision to Diff 11992.Sat, May 23, 10:30 AM

Slightly simpler code + do the same in Stop().

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

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

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

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

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

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

wraitii updated this revision to Diff 11993.Sat, May 23, 10:55 AM

There was actually another mistake in rP22447 which I missed the first time: formation offsets are relative to the formation controller's heading, and so the range check only worked in some directions.

Since UnitMotion works correctly and returns LikelySuccess when expected, we'll just rely on that.

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

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

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

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

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

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

Angen added a subscriber: Angen.Sat, May 23, 4:11 PM

they reshape for no reason when they are walking and order stop is given

In D2763#116752, @Angen wrote:

they reshape for no reason when they are walking and order stop is given

It's not for no reason, it's because MoveMembersIntoFormation isn't quite clever to notice there's not much to do.

If you remove the change in Stop(), and you order formation units to gather, and while they gather you Stop the formation, the units won't move, yet they will be in formation Idle. Which behaviour you prefer is... Debatable.

wraitii updated this revision to Diff 12101.Tue, Jun 2, 12:18 PM

Remove the reforming on Stop().

@Angen can you try this again? I would like to commit it.

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

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 226| »   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
| 321| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 316| »   »   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
| 325| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 141| 141| 	this.formationMembersWithAura = []; // Members with a formation aura
| 142| 142| 	this.width = 0;
| 143| 143| 	this.depth = 0;
| 144|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 144|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 145| 145| 	this.twinFormations = [];
| 146| 146| 	// distance from which two twin formations will merge into one.
| 147| 147| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 141| 141| 	this.formationMembersWithAura = []; // Members with a formation aura
| 142| 142| 	this.width = 0;
| 143| 143| 	this.depth = 0;
| 144|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 144|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 145| 145| 	this.twinFormations = [];
| 146| 146| 	// distance from which two twin formations will merge into one.
| 147| 147| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 179| 179| 
| 180| 180| Formation.prototype.GetSize = function()
| 181| 181| {
| 182|    |-	return {"width": this.width, "depth": this.depth};
|    | 182|+	return { "width": this.width, "depth": this.depth};
| 183| 183| };
| 184| 184| 
| 185| 185| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 179| 179| 
| 180| 180| Formation.prototype.GetSize = function()
| 181| 181| {
| 182|    |-	return {"width": this.width, "depth": this.depth};
|    | 182|+	return {"width": this.width, "depth": this.depth };
| 183| 183| };
| 184| 184| 
| 185| 185| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 			footprints.push(cmpFootprint.GetShape());
| 612| 612| 	}
| 613| 613| 	if (!footprints.length)
| 614|    |-		return {"width":1, "depth": 1};
|    | 614|+		return { "width":1, "depth": 1};
| 615| 615| 
| 616| 616| 	var r = {"width": 0, "depth": 0};
| 617| 617| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 			footprints.push(cmpFootprint.GetShape());
| 612| 612| 	}
| 613| 613| 	if (!footprints.length)
| 614|    |-		return {"width":1, "depth": 1};
|    | 614|+		return {"width": 1, "depth": 1};
| 615| 615| 
| 616| 616| 	var r = {"width": 0, "depth": 0};
| 617| 617| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 			footprints.push(cmpFootprint.GetShape());
| 612| 612| 	}
| 613| 613| 	if (!footprints.length)
| 614|    |-		return {"width":1, "depth": 1};
|    | 614|+		return {"width":1, "depth": 1 };
| 615| 615| 
| 616| 616| 	var r = {"width": 0, "depth": 0};
| 617| 617| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 613| 613| 	if (!footprints.length)
| 614| 614| 		return {"width":1, "depth": 1};
| 615| 615| 
| 616|    |-	var r = {"width": 0, "depth": 0};
|    | 616|+	var r = { "width": 0, "depth": 0};
| 617| 617| 	for (var shape of footprints)
| 618| 618| 	{
| 619| 619| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 613| 613| 	if (!footprints.length)
| 614| 614| 		return {"width":1, "depth": 1};
| 615| 615| 
| 616|    |-	var r = {"width": 0, "depth": 0};
|    | 616|+	var r = {"width": 0, "depth": 0 };
| 617| 617| 	for (var shape of footprints)
| 618| 618| 	{
| 619| 619| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 639| 639| 	separation.depth *= this.separationMultiplier.depth;
| 640| 640| 
| 641| 641| 	if (this.columnar)
| 642|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 642|+		var sortingClasses = ["Cavalry", "Infantry"];
| 643| 643| 	else
| 644| 644| 		var sortingClasses = this.sortingClasses.slice();
| 645| 645| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 659| 659| 		{
| 660| 660| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 661| 661| 			{
| 662|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 662|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 663| 663| 				done = true;
| 664| 664| 				break;
| 665| 665| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 659| 659| 		{
| 660| 660| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 661| 661| 			{
| 662|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 662|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 663| 663| 				done = true;
| 664| 664| 				break;
| 665| 665| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 665| 665| 			}
| 666| 666| 		}
| 667| 667| 		if (!done)
| 668|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 668|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 669| 669| 	}
| 670| 670| 
| 671| 671| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 665| 665| 			}
| 666| 666| 		}
| 667| 667| 		if (!done)
| 668|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 668|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 669| 669| 	}
| 670| 670| 
| 671| 671| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 665| 665| 			}
| 666| 666| 		}
| 667| 667| 		if (!done)
| 668|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 668|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 669| 669| 	}
| 670| 670| 
| 671| 671| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 682| 682| 	if (this.columnar)
| 683| 683| 	{
| 684| 684| 		shape = "square";
| 685|    |-		cols = Math.min(count,3);
|    | 685|+		cols = Math.min(count, 3);
| 686| 686| 		shiftRows = false;
| 687| 687| 		centerGap = 0;
| 688| 688| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 777| 777| 	// calculating offset distances without a zero average makes no sense, as the formation
| 778| 778| 	// will jump to a different position any time
| 779| 779| 	var avgoffset = Vector2D.average(offsets);
| 780|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 780|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 781| 781| 
| 782| 782| 	// sort the available places in certain ways
| 783| 783| 	// the places first in the list will contain the heaviest units as defined by the order
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 836| 836| 			closestOffsetId = i;
| 837| 837| 		}
| 838| 838| 	}
| 839|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 839|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 840| 840| 	return closestOffsetId;
| 841| 841| };
| 842| 842| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 836| 836| 			closestOffsetId = i;
| 837| 837| 		}
| 838| 838| 	}
| 839|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 839|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 840| 840| 	return closestOffsetId;
| 841| 841| };
| 842| 842| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 836| 836| 			closestOffsetId = i;
| 837| 837| 		}
| 838| 838| 	}
| 839|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 839|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 840| 840| 	return closestOffsetId;
| 841| 841| };
| 842| 842| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 846| 846| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 847| 847| {
| 848| 848| 	var offsetPositions = [];
| 849|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 849|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 850| 850| 	// calculate the world positions
| 851| 851| 	for (var o of offsets)
| 852| 852| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 846| 846| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 847| 847| {
| 848| 848| 	var offsetPositions = [];
| 849|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 849|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 850| 850| 	// calculate the world positions
| 851| 851| 	for (var o of offsets)
| 852| 852| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 863| 863| Formation.prototype.GetEstimatedOrientation = function(pos)
| 864| 864| {
| 865| 865| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 866|    |-	var r = {"sin": 0, "cos": 1};
|    | 866|+	var r = { "sin": 0, "cos": 1};
| 867| 867| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 868| 868| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 869| 869| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 863| 863| Formation.prototype.GetEstimatedOrientation = function(pos)
| 864| 864| {
| 865| 865| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 866|    |-	var r = {"sin": 0, "cos": 1};
|    | 866|+	var r = {"sin": 0, "cos": 1 };
| 867| 867| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 868| 868| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 869| 869| 	{

binaries/data/mods/public/simulation/components/Formation.js
| 462| »   for·(var·ent·of·this.formationMembersWithAura)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 509| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

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

binaries/data/mods/public/simulation/components/Formation.js
| 592| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 644| »   »   var·sortingClasses·=·this.sortingClasses.slice();
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 653| »   for·(var·i·in·active)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 668| »   »   »   types["Unknown"].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | ['Unknown'] is better written in dot notation.

binaries/data/mods/public/simulation/components/Formation.js
| 707| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 741| »   »   »   »   »   var·n·=·r·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 743| »   »   »   »   »   var·n·=·r·*·2·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 747| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'c' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 754| »   »   »   »   »   var·x·=·side·*·Math.ceil(c/2)·*·separation.width;
|    | [NORMAL] JSHintBear:
|    | 'x' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 757| »   »   »   »   »   if·(x·==·0)·//·don't·use·the·center·position·with·a·center·gap
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 759| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 765| »   »   »   »   offsets.push(new·Vector2D(x·+·r1,·z·+·r2));
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 745| »   »   »   if·(!shiftRows·&&·n·>·left)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 746| »   »   »   »   n·=·left;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 747| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 751| »   »   »   »   if·(n%2·==·0)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 761| »   »   »   »   var·column·=·Math.ceil(n/2)·+·Math.ceil(c/2)·*·side;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 771| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 800| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 645| »   sortingClasses.push("Unknown");
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 650| »   for·(var·i·=·0;·i·<·sortingClasses.length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 651| »   »   types[sortingClasses[i]]·=·[];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 658| »   »   for·(var·c·=·0;·c·<·sortingClasses.length;·++c)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 660| »   »   »   if·(classes.indexOf(sortingClasses[c])·>·-1)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 662| »   »   »   »   types[sortingClasses[c]].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 800| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 802| »   »   var·t·=·types[sortingClasses[i-1]];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 907| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 790| 790| 					this.FinishOrder();
| 791| 791| 					return;
| 792| 792| 				}
| 793|    |-				else
| 794|    |-				{
|    | 793|+				
| 795| 794| 					this.SetNextState("GARRISON.APPROACHING");
| 796| 795| 					return;
| 797|    |-				}
|    | 796|+				
| 798| 797| 			}
| 799| 798| 
| 800| 799| 			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
|1060|1060| 			},
|1061|1061| 		},
|1062|1062| 
|1063|    |-		"GARRISON":{
|    |1063|+		"GARRISON": {
|1064|1064| 			"APPROACHING": {
|1065|1065| 				"enter": function() {
|1066|1066| 					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
|2029|2029| 
|2030|2030| 				"Attacked": function(msg) {
|2031|2031| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2032|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2033|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2032|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2033|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2034|2034| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2035|2035| 				},
|2036|2036| 			},
|    | [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
|2188|2188| 					"MovementUpdate": function(msg) {
|2189|2189| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2190|2190| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2191|    |-						if (msg.likelyFailure || 
|    |2191|+						if (msg.likelyFailure ||
|2192|2192| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2193|2193| 							!msg.obstructed && this.CheckRange(this.order.data))
|2194|2194| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2830|2830| 					{
|2831|2831| 						// The building was already finished/fully repaired before we arrived;
|2832|2832| 						// let the ConstructionFinished handler handle this.
|2833|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2833|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2834|2834| 						return true;
|2835|2835| 					}
|2836|2836| 
|    | [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
|2830|2830| 					{
|2831|2831| 						// The building was already finished/fully repaired before we arrived;
|2832|2832| 						// let the ConstructionFinished handler handle this.
|2833|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2833|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2834|2834| 						return true;
|2835|2835| 					}
|2836|2836| 
|    | [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
|3128|3128| 				this.StopTimer();
|3129|3129| 				this.ResetAnimation();
|3130|3130| 				if (this.formationAnimationVariant)
|3131|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3131|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3132|3132| 				else
|3133|3133| 					this.SetDefaultAnimationVariant();
|3134|3134| 				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
|3354|3354| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3355|3355| 
|3356|3356| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3357|    |-							// only used for domestic animals
|    |3357|+		// only used for domestic animals
|3358|3358| 
|3359|3359| 		// Reuse the same garrison behaviour for animals.
|3360|3360| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3416|3416| 
|3417|3417| UnitAI.prototype.IsAnimal = function()
|3418|3418| {
|3419|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3419|+	return (!!this.template.NaturalBehaviour);
|3420|3420| };
|3421|3421| 
|3422|3422| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3532|3532| 		{
|3533|3533| 			let index = this.GetCurrentState().indexOf(".");
|3534|3534| 			if (index != -1)
|3535|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3535|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3536|3536| 			this.Stop(false);
|3537|3537| 		}
|3538|3538| 
|    | [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
|3588|3588| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3589|3589| 			continue;
|3590|3590| 		if (i == 0)
|3591|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3591|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3592|3592| 		else
|3593|3593| 			this.orderQueue.splice(i, 1);
|3594|3594| 		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
|3588|3588| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3589|3589| 			continue;
|3590|3590| 		if (i == 0)
|3591|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3591|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3592|3592| 		else
|3593|3593| 			this.orderQueue.splice(i, 1);
|3594|3594| 		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
|3675|3675| };
|3676|3676| 
|3677|3677| 
|3678|    |-//// FSM linkage functions ////
|    |3678|+// // FSM linkage functions ////
|3679|3679| 
|3680|3680| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3681|3681| 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
|3847|3847| 				continue;
|3848|3848| 			if (this.orderQueue[i].type == type)
|3849|3849| 				continue;
|3850|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3850|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3851|3851| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3852|3852| 			return;
|3853|3853| 		}
|    | [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
|3847|3847| 				continue;
|3848|3848| 			if (this.orderQueue[i].type == type)
|3849|3849| 				continue;
|3850|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3850|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3851|3851| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3852|3852| 			return;
|3853|3853| 		}
|    | [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
|4089|4089| 	if (data.timerRepeat === undefined)
|4090|4090| 		this.timer = undefined;
|4091|4091| 
|4092|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4092|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4093|4093| };
|4094|4094| 
|4095|4095| /**
|    | [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
|4089|4089| 	if (data.timerRepeat === undefined)
|4090|4090| 		this.timer = undefined;
|4091|4091| 
|4092|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4092|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4093|4093| };
|4094|4094| 
|4095|4095| /**
|    | [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
|4134|4134| 	// TODO: This is a bit inefficient since every unit listens to every
|4135|4135| 	// construction message - ideally we could scope it to only the one we're building
|4136|4136| 
|4137|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4137|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4138|4138| };
|4139|4139| 
|4140|4140| 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
|4134|4134| 	// TODO: This is a bit inefficient since every unit listens to every
|4135|4135| 	// construction message - ideally we could scope it to only the one we're building
|4136|4136| 
|4137|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4137|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4138|4138| };
|4139|4139| 
|4140|4140| 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
|4165|4165| 	if (msg.fromStatusEffect)
|4166|4166| 		return;
|4167|4167| 
|4168|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4168|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4169|4169| };
|4170|4170| 
|4171|4171| 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
|4165|4165| 	if (msg.fromStatusEffect)
|4166|4166| 		return;
|4167|4167| 
|4168|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4168|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4169|4169| };
|4170|4170| 
|4171|4171| 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
|4170|4170| 
|4171|4171| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4172|4172| {
|4173|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4173|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4174|4174| };
|4175|4175| 
|4176|4176| 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
|4170|4170| 
|4171|4171| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4172|4172| {
|4173|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4173|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4174|4174| };
|4175|4175| 
|4176|4176| 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
|4175|4175| 
|4176|4176| UnitAI.prototype.OnHealthChanged = function(msg)
|4177|4177| {
|4178|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4178|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4179|4179| };
|4180|4180| 
|4181|4181| 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
|4175|4175| 
|4176|4176| UnitAI.prototype.OnHealthChanged = function(msg)
|4177|4177| {
|4178|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4178|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4179|4179| };
|4180|4180| 
|4181|4181| 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
|4181|4181| UnitAI.prototype.OnRangeUpdate = function(msg)
|4182|4182| {
|4183|4183| 	if (msg.tag == this.losRangeQuery)
|4184|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4184|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4185|4185| 	else if (msg.tag == this.losHealRangeQuery)
|4186|4186| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4187|4187| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4181|4181| UnitAI.prototype.OnRangeUpdate = function(msg)
|4182|4182| {
|4183|4183| 	if (msg.tag == this.losRangeQuery)
|4184|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4184|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4185|4185| 	else if (msg.tag == this.losHealRangeQuery)
|4186|4186| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4187|4187| };
|    | [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
|4183|4183| 	if (msg.tag == this.losRangeQuery)
|4184|4184| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4185|4185| 	else if (msg.tag == this.losHealRangeQuery)
|4186|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4186|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4187|4187| };
|4188|4188| 
|4189|4189| 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
|4183|4183| 	if (msg.tag == this.losRangeQuery)
|4184|4184| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4185|4185| 	else if (msg.tag == this.losHealRangeQuery)
|4186|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4186|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4187|4187| };
|4188|4188| 
|4189|4189| 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
|4188|4188| 
|4189|4189| UnitAI.prototype.OnPackFinished = function(msg)
|4190|4190| {
|4191|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4191|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4192|4192| };
|4193|4193| 
|4194|4194| //// 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
|4188|4188| 
|4189|4189| UnitAI.prototype.OnPackFinished = function(msg)
|4190|4190| {
|4191|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4191|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4192|4192| };
|4193|4193| 
|4194|4194| //// 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
|4191|4191| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4192|4192| };
|4193|4193| 
|4194|    |-//// Helper functions to be called by the FSM ////
|    |4194|+// // Helper functions to be called by the FSM ////
|4195|4195| 
|4196|4196| UnitAI.prototype.GetWalkSpeed = function()
|4197|4197| {
|    | [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
|4903|4903| UnitAI.prototype.AttackEntityInZone = function(ents)
|4904|4904| {
|4905|4905| 	var target = ents.find(target =>
|4906|    |-		this.CanAttack(target)
|4907|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4906|+		this.CanAttack(target) &&
|    |4907|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4908|4908| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4909|4909| 	);
|4910|4910| 	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
|4904|4904| {
|4905|4905| 	var target = ents.find(target =>
|4906|4906| 		this.CanAttack(target)
|4907|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4908|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4907|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4908|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4909|4909| 	);
|4910|4910| 	if (!target)
|4911|4911| 		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
|4970|4970| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|4971|4971| 	if (this.isGuardOf)
|4972|4972| 	{
|4973|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |4973|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|4974|4974| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4975|4975| 		if (cmpUnitAI && cmpAttack &&
|4976|4976| 		    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
|4974|4974| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|4975|4975| 		if (cmpUnitAI && cmpAttack &&
|4976|4976| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|4977|    |-				return false;
|    |4977|+			return false;
|4978|4978| 	}
|4979|4979| 
|4980|4980| 	// 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
|5012|5012| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5013|5013| 	if (this.isGuardOf)
|5014|5014| 	{
|5015|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5015|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5016|5016| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5017|5017| 		if (cmpUnitAI && cmpAttack &&
|5018|5018| 		    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
|5025|5025| 	return false;
|5026|5026| };
|5027|5027| 
|5028|    |-//// External interface functions ////
|    |5028|+// // External interface functions ////
|5029|5029| 
|5030|5030| UnitAI.prototype.SetFormationController = function(ent)
|5031|5031| {
|    | [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
|5181|5181| 	{
|5182|5182| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5183|5183| 			return;
|5184|    |-		else
|5185|    |-			this.RemoveGuard();
|    |5184|+		this.RemoveGuard();
|5186|5185| 	}
|5187|5186| 
|5188|5187| 	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
|5512|5512| 
|5513|5513| 	if (this.IsFormationController())
|5514|5514| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5515|    |-}
|    |5515|+};
|5516|5516| /**
|5517|5517|  * Adds trade order to the queue. Either walk to the first market, or
|5518|5518|  * 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
|5533|5533| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5534|5534| 	{
|5535|5535| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5536|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5536|+		if (cmpTrader.HasBothMarkets() &&
|5537|5537| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5538|5538| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5539|5539| 		{
|    | [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
|5814|5814| 				{
|5815|5815| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5816|5816| 					var targetClasses = this.order.data.targetClasses;
|5817|    |-					if (targetClasses.attack && cmpIdentity
|5818|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5817|+					if (targetClasses.attack && cmpIdentity &&
|    |5818|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5819|5819| 						continue;
|5820|5820| 					if (targetClasses.avoid && cmpIdentity
|5821|5821| 						&& 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
|5817|5817| 					if (targetClasses.attack && cmpIdentity
|5818|5818| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5819|5819| 						continue;
|5820|    |-					if (targetClasses.avoid && cmpIdentity
|5821|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5820|+					if (targetClasses.avoid && cmpIdentity &&
|    |5821|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5822|5822| 						continue;
|5823|5823| 					// Only used by the AIs to prevent some choices of targets
|5824|5824| 					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
|5840|5840| 		{
|5841|5841| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5842|5842| 			var targetClasses = this.order.data.targetClasses;
|5843|    |-			if (cmpIdentity && targetClasses.attack
|5844|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5843|+			if (cmpIdentity && targetClasses.attack &&
|    |5844|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5845|5845| 				continue;
|5846|5846| 			if (cmpIdentity && targetClasses.avoid
|5847|5847| 				&& 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
|5843|5843| 			if (cmpIdentity && targetClasses.attack
|5844|5844| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5845|5845| 				continue;
|5846|    |-			if (cmpIdentity && targetClasses.avoid
|5847|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5846|+			if (cmpIdentity && targetClasses.avoid &&
|    |5847|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5848|5848| 				continue;
|5849|5849| 			// Only used by the AIs to prevent some choices of targets
|5850|5850| 			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
|6003|6003| 
|6004|6004| UnitAI.prototype.SetHeldPosition = function(x, z)
|6005|6005| {
|6006|    |-	this.heldPosition = {"x": x, "z": z};
|    |6006|+	this.heldPosition = { "x": x, "z": z};
|6007|6007| };
|6008|6008| 
|6009|6009| 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
|6003|6003| 
|6004|6004| UnitAI.prototype.SetHeldPosition = function(x, z)
|6005|6005| {
|6006|    |-	this.heldPosition = {"x": x, "z": z};
|    |6006|+	this.heldPosition = {"x": x, "z": z };
|6007|6007| };
|6008|6008| 
|6009|6009| 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
|6030|6030| 	return false;
|6031|6031| };
|6032|6032| 
|6033|    |-//// Helper functions ////
|    |6033|+// // Helper functions ////
|6034|6034| 
|6035|6035| /**
|6036|6036|  * 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
|6049|6049| 		return undefined;
|6050|6050| 
|6051|6051| 	return component.GetRange(type);
|6052|    |-}
|    |6052|+};
|6053|6053| 
|6054|6054| UnitAI.prototype.CanAttack = function(target)
|6055|6055| {
|    | [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
|6217|6217| 	return cmpPack && cmpPack.IsPacking();
|6218|6218| };
|6219|6219| 
|6220|    |-//// Formation specific functions ////
|    |6220|+// // Formation specific functions ////
|6221|6221| 
|6222|6222| UnitAI.prototype.IsAttackingAsFormation = function()
|6223|6223| {
|    | [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
|6222|6222| UnitAI.prototype.IsAttackingAsFormation = function()
|6223|6223| {
|6224|6224| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6225|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6226|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6225|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6226|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6227|6227| };
|6228|6228| 
|6229|6229| //// 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
|6226|6226| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6227|6227| };
|6228|6228| 
|6229|    |-//// Animal specific functions ////
|    |6229|+// // Animal specific functions ////
|6230|6230| 
|6231|6231| UnitAI.prototype.MoveRandomly = function(distance)
|6232|6232| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
|3994| »   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
|4890| »   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
|4905| »   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
|4953| »   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
|4976| »   »   ····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
|2033| »   »   »   »   »   »   &&·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
|3131| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

Angen added inline comments.Wed, Jun 3, 11:36 AM
binaries/data/mods/public/simulation/components/UnitAI.js
748

I am not sure this is safe to do.
Formation controller would not go to Idle state so it would continue to be in the current state finishing whatever is doing if not stopped by unitmotion messages.
Also Order.Stop would stay as current order.

wraitii added inline comments.Wed, Jun 3, 11:56 AM
binaries/data/mods/public/simulation/components/UnitAI.js
748

I think I might have accidentally removed this line, thanks for noticing.

wraitii updated this revision to Diff 12110.Wed, Jun 3, 12:36 PM

I had indeed removed FinishOrder in Order.Stop by accident.

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

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 226| »   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
| 321| »   for·(var·ent·of·unitAIs)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 316| »   »   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
| 325| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 141| 141| 	this.formationMembersWithAura = []; // Members with a formation aura
| 142| 142| 	this.width = 0;
| 143| 143| 	this.depth = 0;
| 144|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 144|+	this.oldOrientation = { "sin": 0, "cos": 0};
| 145| 145| 	this.twinFormations = [];
| 146| 146| 	// distance from which two twin formations will merge into one.
| 147| 147| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 141| 141| 	this.formationMembersWithAura = []; // Members with a formation aura
| 142| 142| 	this.width = 0;
| 143| 143| 	this.depth = 0;
| 144|    |-	this.oldOrientation = {"sin": 0, "cos": 0};
|    | 144|+	this.oldOrientation = {"sin": 0, "cos": 0 };
| 145| 145| 	this.twinFormations = [];
| 146| 146| 	// distance from which two twin formations will merge into one.
| 147| 147| 	this.formationSeparation = 0;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 179| 179| 
| 180| 180| Formation.prototype.GetSize = function()
| 181| 181| {
| 182|    |-	return {"width": this.width, "depth": this.depth};
|    | 182|+	return { "width": this.width, "depth": this.depth};
| 183| 183| };
| 184| 184| 
| 185| 185| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 179| 179| 
| 180| 180| Formation.prototype.GetSize = function()
| 181| 181| {
| 182|    |-	return {"width": this.width, "depth": this.depth};
|    | 182|+	return {"width": this.width, "depth": this.depth };
| 183| 183| };
| 184| 184| 
| 185| 185| Formation.prototype.GetSpeedMultiplier = function()
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 			footprints.push(cmpFootprint.GetShape());
| 612| 612| 	}
| 613| 613| 	if (!footprints.length)
| 614|    |-		return {"width":1, "depth": 1};
|    | 614|+		return { "width":1, "depth": 1};
| 615| 615| 
| 616| 616| 	var r = {"width": 0, "depth": 0};
| 617| 617| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'width'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 			footprints.push(cmpFootprint.GetShape());
| 612| 612| 	}
| 613| 613| 	if (!footprints.length)
| 614|    |-		return {"width":1, "depth": 1};
|    | 614|+		return {"width": 1, "depth": 1};
| 615| 615| 
| 616| 616| 	var r = {"width": 0, "depth": 0};
| 617| 617| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 611| 611| 			footprints.push(cmpFootprint.GetShape());
| 612| 612| 	}
| 613| 613| 	if (!footprints.length)
| 614|    |-		return {"width":1, "depth": 1};
|    | 614|+		return {"width":1, "depth": 1 };
| 615| 615| 
| 616| 616| 	var r = {"width": 0, "depth": 0};
| 617| 617| 	for (var shape of footprints)
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 613| 613| 	if (!footprints.length)
| 614| 614| 		return {"width":1, "depth": 1};
| 615| 615| 
| 616|    |-	var r = {"width": 0, "depth": 0};
|    | 616|+	var r = { "width": 0, "depth": 0};
| 617| 617| 	for (var shape of footprints)
| 618| 618| 	{
| 619| 619| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 613| 613| 	if (!footprints.length)
| 614| 614| 		return {"width":1, "depth": 1};
| 615| 615| 
| 616|    |-	var r = {"width": 0, "depth": 0};
|    | 616|+	var r = {"width": 0, "depth": 0 };
| 617| 617| 	for (var shape of footprints)
| 618| 618| 	{
| 619| 619| 		if (shape.type == "circle")
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 639| 639| 	separation.depth *= this.separationMultiplier.depth;
| 640| 640| 
| 641| 641| 	if (this.columnar)
| 642|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 642|+		var sortingClasses = ["Cavalry", "Infantry"];
| 643| 643| 	else
| 644| 644| 		var sortingClasses = this.sortingClasses.slice();
| 645| 645| 	sortingClasses.push("Unknown");
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 659| 659| 		{
| 660| 660| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 661| 661| 			{
| 662|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 662|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 663| 663| 				done = true;
| 664| 664| 				break;
| 665| 665| 			}
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 659| 659| 		{
| 660| 660| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 661| 661| 			{
| 662|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 662|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 663| 663| 				done = true;
| 664| 664| 				break;
| 665| 665| 			}
|    | [NORMAL] ESLintBear (dot-notation):
|    | ["Unknown"] is better written in dot notation.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 665| 665| 			}
| 666| 666| 		}
| 667| 667| 		if (!done)
| 668|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 668|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 669| 669| 	}
| 670| 670| 
| 671| 671| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 665| 665| 			}
| 666| 666| 		}
| 667| 667| 		if (!done)
| 668|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 668|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 669| 669| 	}
| 670| 670| 
| 671| 671| 	var count = active.length;
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 665| 665| 			}
| 666| 666| 		}
| 667| 667| 		if (!done)
| 668|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 668|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 669| 669| 	}
| 670| 670| 
| 671| 671| 	var count = active.length;
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 682| 682| 	if (this.columnar)
| 683| 683| 	{
| 684| 684| 		shape = "square";
| 685|    |-		cols = Math.min(count,3);
|    | 685|+		cols = Math.min(count, 3);
| 686| 686| 		shiftRows = false;
| 687| 687| 		centerGap = 0;
| 688| 688| 		sortingOrder = null;
|    | [NORMAL] ESLintBear (space-before-function-paren):
|    | Unexpected space before function parentheses.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 777| 777| 	// calculating offset distances without a zero average makes no sense, as the formation
| 778| 778| 	// will jump to a different position any time
| 779| 779| 	var avgoffset = Vector2D.average(offsets);
| 780|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 780|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 781| 781| 
| 782| 782| 	// sort the available places in certain ways
| 783| 783| 	// the places first in the list will contain the heaviest units as defined by the order
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 836| 836| 			closestOffsetId = i;
| 837| 837| 		}
| 838| 838| 	}
| 839|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 839|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 840| 840| 	return closestOffsetId;
| 841| 841| };
| 842| 842| 
|    | [NORMAL] ESLintBear (key-spacing):
|    | Missing space before value for key 'column'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 836| 836| 			closestOffsetId = i;
| 837| 837| 		}
| 838| 838| 	}
| 839|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 839|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 840| 840| 	return closestOffsetId;
| 841| 841| };
| 842| 842| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 836| 836| 			closestOffsetId = i;
| 837| 837| 		}
| 838| 838| 	}
| 839|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 839|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 840| 840| 	return closestOffsetId;
| 841| 841| };
| 842| 842| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 846| 846| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 847| 847| {
| 848| 848| 	var offsetPositions = [];
| 849|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 849|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 850| 850| 	// calculate the world positions
| 851| 851| 	for (var o of offsets)
| 852| 852| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 846| 846| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 847| 847| {
| 848| 848| 	var offsetPositions = [];
| 849|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 849|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 850| 850| 	// calculate the world positions
| 851| 851| 	for (var o of offsets)
| 852| 852| 		offsetPositions.push(new Vector2D(pos.x + o.y * sin + o.x * cos, pos.y + o.y * cos - o.x * sin));
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 863| 863| Formation.prototype.GetEstimatedOrientation = function(pos)
| 864| 864| {
| 865| 865| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 866|    |-	var r = {"sin": 0, "cos": 1};
|    | 866|+	var r = { "sin": 0, "cos": 1};
| 867| 867| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 868| 868| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 869| 869| 	{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/Formation.js
| 863| 863| Formation.prototype.GetEstimatedOrientation = function(pos)
| 864| 864| {
| 865| 865| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 866|    |-	var r = {"sin": 0, "cos": 1};
|    | 866|+	var r = {"sin": 0, "cos": 1 };
| 867| 867| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 868| 868| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 869| 869| 	{

binaries/data/mods/public/simulation/components/Formation.js
| 462| »   for·(var·ent·of·this.formationMembersWithAura)
|    | [NORMAL] JSHintBear:
|    | 'ent' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 509| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

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

binaries/data/mods/public/simulation/components/Formation.js
| 592| »   var·cmpPosition·=·Engine.QueryInterface(this.entity,·IID_Position);
|    | [NORMAL] JSHintBear:
|    | 'cmpPosition' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 644| »   »   var·sortingClasses·=·this.sortingClasses.slice();
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 653| »   for·(var·i·in·active)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 668| »   »   »   types["Unknown"].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | ['Unknown'] is better written in dot notation.

binaries/data/mods/public/simulation/components/Formation.js
| 707| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 741| »   »   »   »   »   var·n·=·r·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 743| »   »   »   »   »   var·n·=·r·*·2·+·1;
|    | [NORMAL] JSHintBear:
|    | 'n' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 747| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'c' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 754| »   »   »   »   »   var·x·=·side·*·Math.ceil(c/2)·*·separation.width;
|    | [NORMAL] JSHintBear:
|    | 'x' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 757| »   »   »   »   »   if·(x·==·0)·//·don't·use·the·center·position·with·a·center·gap
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 759| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 765| »   »   »   »   offsets.push(new·Vector2D(x·+·r1,·z·+·r2));
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 745| »   »   »   if·(!shiftRows·&&·n·>·left)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 746| »   »   »   »   n·=·left;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 747| »   »   »   for·(var·c·=·0;·c·<·n·&&·left·>·0;·++c)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 751| »   »   »   »   if·(n%2·==·0)
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 761| »   »   »   »   var·column·=·Math.ceil(n/2)·+·Math.ceil(c/2)·*·side;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 771| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 800| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

binaries/data/mods/public/simulation/components/Formation.js
| 645| »   sortingClasses.push("Unknown");
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 650| »   for·(var·i·=·0;·i·<·sortingClasses.length;·++i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 651| »   »   types[sortingClasses[i]]·=·[];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 658| »   »   for·(var·c·=·0;·c·<·sortingClasses.length;·++c)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 660| »   »   »   if·(classes.indexOf(sortingClasses[c])·>·-1)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 662| »   »   »   »   types[sortingClasses[c]].push({"ent":·active[i],·"pos":·positions[i]});
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 800| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 802| »   »   var·t·=·types[sortingClasses[i-1]];
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

binaries/data/mods/public/simulation/components/Formation.js
| 907| »   var·cmpUnitMotion·=·Engine.QueryInterface(this.entity,·IID_UnitMotion);
|    | [NORMAL] JSHintBear:
|    | 'cmpUnitMotion' is already defined.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 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
|1061|1061| 			},
|1062|1062| 		},
|1063|1063| 
|1064|    |-		"GARRISON":{
|    |1064|+		"GARRISON": {
|1065|1065| 			"APPROACHING": {
|1066|1066| 				"enter": function() {
|1067|1067| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2030|2030| 
|2031|2031| 				"Attacked": function(msg) {
|2032|2032| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2033|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2034|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2033|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2034|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2035|2035| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2036|2036| 				},
|2037|2037| 			},
|    | [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
|2189|2189| 					"MovementUpdate": function(msg) {
|2190|2190| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2191|2191| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2192|    |-						if (msg.likelyFailure || 
|    |2192|+						if (msg.likelyFailure ||
|2193|2193| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2194|2194| 							!msg.obstructed && this.CheckRange(this.order.data))
|2195|2195| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2831|2831| 					{
|2832|2832| 						// The building was already finished/fully repaired before we arrived;
|2833|2833| 						// let the ConstructionFinished handler handle this.
|2834|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2834|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2835|2835| 						return true;
|2836|2836| 					}
|2837|2837| 
|    | [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
|2831|2831| 					{
|2832|2832| 						// The building was already finished/fully repaired before we arrived;
|2833|2833| 						// let the ConstructionFinished handler handle this.
|2834|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2834|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2835|2835| 						return true;
|2836|2836| 					}
|2837|2837| 
|    | [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
|3130|3130| 				this.StopTimer();
|3131|3131| 				this.ResetAnimation();
|3132|3132| 				if (this.formationAnimationVariant)
|3133|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3133|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3134|3134| 				else
|3135|3135| 					this.SetDefaultAnimationVariant();
|3136|3136| 				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
|3356|3356| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3357|3357| 
|3358|3358| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3359|    |-							// only used for domestic animals
|    |3359|+		// only used for domestic animals
|3360|3360| 
|3361|3361| 		// Reuse the same garrison behaviour for animals.
|3362|3362| 		"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
|3419|3419| 
|3420|3420| UnitAI.prototype.IsAnimal = function()
|3421|3421| {
|3422|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3422|+	return (!!this.template.NaturalBehaviour);
|3423|3423| };
|3424|3424| 
|3425|3425| 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
|3559|3559| 		{
|3560|3560| 			let index = this.GetCurrentState().indexOf(".");
|3561|3561| 			if (index != -1)
|3562|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3562|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3563|3563| 			this.Stop(false);
|3564|3564| 		}
|3565|3565| 
|    | [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
|3615|3615| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3616|3616| 			continue;
|3617|3617| 		if (i == 0)
|3618|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3618|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3619|3619| 		else
|3620|3620| 			this.orderQueue.splice(i, 1);
|3621|3621| 		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
|3615|3615| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3616|3616| 			continue;
|3617|3617| 		if (i == 0)
|3618|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3618|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3619|3619| 		else
|3620|3620| 			this.orderQueue.splice(i, 1);
|3621|3621| 		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
|3702|3702| };
|3703|3703| 
|3704|3704| 
|3705|    |-//// FSM linkage functions ////
|    |3705|+// // FSM linkage functions ////
|3706|3706| 
|3707|3707| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3708|3708| 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
|3874|3874| 				continue;
|3875|3875| 			if (this.orderQueue[i].type == type)
|3876|3876| 				continue;
|3877|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3877|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3878|3878| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3879|3879| 			return;
|3880|3880| 		}
|    | [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
|3874|3874| 				continue;
|3875|3875| 			if (this.orderQueue[i].type == type)
|3876|3876| 				continue;
|3877|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3877|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3878|3878| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3879|3879| 			return;
|3880|3880| 		}
|    | [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
|4115|4115| 	if (data.timerRepeat === undefined)
|4116|4116| 		this.timer = undefined;
|4117|4117| 
|4118|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4118|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4119|4119| };
|4120|4120| 
|4121|4121| /**
|    | [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
|4115|4115| 	if (data.timerRepeat === undefined)
|4116|4116| 		this.timer = undefined;
|4117|4117| 
|4118|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4118|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4119|4119| };
|4120|4120| 
|4121|4121| /**
|    | [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
|4160|4160| 	// TODO: This is a bit inefficient since every unit listens to every
|4161|4161| 	// construction message - ideally we could scope it to only the one we're building
|4162|4162| 
|4163|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4163|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4164|4164| };
|4165|4165| 
|4166|4166| 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
|4160|4160| 	// TODO: This is a bit inefficient since every unit listens to every
|4161|4161| 	// construction message - ideally we could scope it to only the one we're building
|4162|4162| 
|4163|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4163|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4164|4164| };
|4165|4165| 
|4166|4166| 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
|4191|4191| 	if (msg.fromStatusEffect)
|4192|4192| 		return;
|4193|4193| 
|4194|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4194|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4195|4195| };
|4196|4196| 
|4197|4197| 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
|4191|4191| 	if (msg.fromStatusEffect)
|4192|4192| 		return;
|4193|4193| 
|4194|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4194|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4195|4195| };
|4196|4196| 
|4197|4197| 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
|4196|4196| 
|4197|4197| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4198|4198| {
|4199|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4199|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4200|4200| };
|4201|4201| 
|4202|4202| 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
|4196|4196| 
|4197|4197| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4198|4198| {
|4199|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4199|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4200|4200| };
|4201|4201| 
|4202|4202| 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
|4201|4201| 
|4202|4202| UnitAI.prototype.OnHealthChanged = function(msg)
|4203|4203| {
|4204|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4204|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4205|4205| };
|4206|4206| 
|4207|4207| 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
|4201|4201| 
|4202|4202| UnitAI.prototype.OnHealthChanged = function(msg)
|4203|4203| {
|4204|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4204|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4205|4205| };
|4206|4206| 
|4207|4207| 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
|4207|4207| UnitAI.prototype.OnRangeUpdate = function(msg)
|4208|4208| {
|4209|4209| 	if (msg.tag == this.losRangeQuery)
|4210|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4210|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4211|4211| 	else if (msg.tag == this.losHealRangeQuery)
|4212|4212| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4213|4213| };
|    | [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
|4207|4207| UnitAI.prototype.OnRangeUpdate = function(msg)
|4208|4208| {
|4209|4209| 	if (msg.tag == this.losRangeQuery)
|4210|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4210|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4211|4211| 	else if (msg.tag == this.losHealRangeQuery)
|4212|4212| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4213|4213| };
|    | [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| 	if (msg.tag == this.losRangeQuery)
|4210|4210| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4211|4211| 	else if (msg.tag == this.losHealRangeQuery)
|4212|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4212|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4213|4213| };
|4214|4214| 
|4215|4215| 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
|4209|4209| 	if (msg.tag == this.losRangeQuery)
|4210|4210| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4211|4211| 	else if (msg.tag == this.losHealRangeQuery)
|4212|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4212|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4213|4213| };
|4214|4214| 
|4215|4215| 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
|4214|4214| 
|4215|4215| UnitAI.prototype.OnPackFinished = function(msg)
|4216|4216| {
|4217|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4217|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4218|4218| };
|4219|4219| 
|4220|4220| //// 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
|4214|4214| 
|4215|4215| UnitAI.prototype.OnPackFinished = function(msg)
|4216|4216| {
|4217|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4217|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4218|4218| };
|4219|4219| 
|4220|4220| //// 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
|4217|4217| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4218|4218| };
|4219|4219| 
|4220|    |-//// Helper functions to be called by the FSM ////
|    |4220|+// // Helper functions to be called by the FSM ////
|4221|4221| 
|4222|4222| UnitAI.prototype.GetWalkSpeed = function()
|4223|4223| {
|    | [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
|4932|4932| UnitAI.prototype.AttackEntityInZone = function(ents)
|4933|4933| {
|4934|4934| 	var target = ents.find(target =>
|4935|    |-		this.CanAttack(target)
|4936|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4935|+		this.CanAttack(target) &&
|    |4936|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4937|4937| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4938|4938| 	);
|4939|4939| 	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
|4933|4933| {
|4934|4934| 	var target = ents.find(target =>
|4935|4935| 		this.CanAttack(target)
|4936|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4937|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4936|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4937|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4938|4938| 	);
|4939|4939| 	if (!target)
|4940|4940| 		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
|4999|4999| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5000|5000| 	if (this.isGuardOf)
|5001|5001| 	{
|5002|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5002|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5003|5003| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5004|5004| 		if (cmpUnitAI && cmpAttack &&
|5005|5005| 		    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
|5003|5003| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5004|5004| 		if (cmpUnitAI && cmpAttack &&
|5005|5005| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5006|    |-				return false;
|    |5006|+			return false;
|5007|5007| 	}
|5008|5008| 
|5009|5009| 	// 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
|5041|5041| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5042|5042| 	if (this.isGuardOf)
|5043|5043| 	{
|5044|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5044|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5045|5045| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5046|5046| 		if (cmpUnitAI && cmpAttack &&
|5047|5047| 		    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
|5054|5054| 	return false;
|5055|5055| };
|5056|5056| 
|5057|    |-//// External interface functions ////
|    |5057|+// // External interface functions ////
|5058|5058| 
|5059|5059| UnitAI.prototype.SetFormationController = function(ent)
|5060|5060| {
|    | [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
|5210|5210| 	{
|5211|5211| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5212|5212| 			return;
|5213|    |-		else
|5214|    |-			this.RemoveGuard();
|    |5213|+		this.RemoveGuard();
|5215|5214| 	}
|5216|5215| 
|5217|5216| 	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
|5544|5544| 
|5545|5545| 	if (this.IsFormationController())
|5546|5546| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5547|    |-}
|    |5547|+};
|5548|5548| /**
|5549|5549|  * Adds trade order to the queue. Either walk to the first market, or
|5550|5550|  * 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
|5565|5565| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5566|5566| 	{
|5567|5567| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5568|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5568|+		if (cmpTrader.HasBothMarkets() &&
|5569|5569| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5570|5570| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5571|5571| 		{
|    | [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
|5846|5846| 				{
|5847|5847| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5848|5848| 					var targetClasses = this.order.data.targetClasses;
|5849|    |-					if (targetClasses.attack && cmpIdentity
|5850|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5849|+					if (targetClasses.attack && cmpIdentity &&
|    |5850|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5851|5851| 						continue;
|5852|5852| 					if (targetClasses.avoid && cmpIdentity
|5853|5853| 						&& 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
|5849|5849| 					if (targetClasses.attack && cmpIdentity
|5850|5850| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5851|5851| 						continue;
|5852|    |-					if (targetClasses.avoid && cmpIdentity
|5853|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5852|+					if (targetClasses.avoid && cmpIdentity &&
|    |5853|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5854|5854| 						continue;
|5855|5855| 					// Only used by the AIs to prevent some choices of targets
|5856|5856| 					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
|5872|5872| 		{
|5873|5873| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5874|5874| 			var targetClasses = this.order.data.targetClasses;
|5875|    |-			if (cmpIdentity && targetClasses.attack
|5876|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5875|+			if (cmpIdentity && targetClasses.attack &&
|    |5876|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5877|5877| 				continue;
|5878|5878| 			if (cmpIdentity && targetClasses.avoid
|5879|5879| 				&& 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
|5875|5875| 			if (cmpIdentity && targetClasses.attack
|5876|5876| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5877|5877| 				continue;
|5878|    |-			if (cmpIdentity && targetClasses.avoid
|5879|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5878|+			if (cmpIdentity && targetClasses.avoid &&
|    |5879|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5880|5880| 				continue;
|5881|5881| 			// Only used by the AIs to prevent some choices of targets
|5882|5882| 			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
|6035|6035| 
|6036|6036| UnitAI.prototype.SetHeldPosition = function(x, z)
|6037|6037| {
|6038|    |-	this.heldPosition = {"x": x, "z": z};
|    |6038|+	this.heldPosition = { "x": x, "z": z};
|6039|6039| };
|6040|6040| 
|6041|6041| 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
|6035|6035| 
|6036|6036| UnitAI.prototype.SetHeldPosition = function(x, z)
|6037|6037| {
|6038|    |-	this.heldPosition = {"x": x, "z": z};
|    |6038|+	this.heldPosition = {"x": x, "z": z };
|6039|6039| };
|6040|6040| 
|6041|6041| 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
|6062|6062| 	return false;
|6063|6063| };
|6064|6064| 
|6065|    |-//// Helper functions ////
|    |6065|+// // Helper functions ////
|6066|6066| 
|6067|6067| /**
|6068|6068|  * 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
|6081|6081| 		return undefined;
|6082|6082| 
|6083|6083| 	return component.GetRange(type);
|6084|    |-}
|    |6084|+};
|6085|6085| 
|6086|6086| UnitAI.prototype.CanAttack = function(target)
|6087|6087| {
|    | [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
|6249|6249| 	return cmpPack && cmpPack.IsPacking();
|6250|6250| };
|6251|6251| 
|6252|    |-//// Formation specific functions ////
|    |6252|+// // Formation specific functions ////
|6253|6253| 
|6254|6254| UnitAI.prototype.IsAttackingAsFormation = function()
|6255|6255| {
|    | [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
|6254|6254| UnitAI.prototype.IsAttackingAsFormation = function()
|6255|6255| {
|6256|6256| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6257|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6258|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6257|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6258|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6259|6259| };
|6260|6260| 
|6261|6261| //// 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
|6258|6258| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6259|6259| };
|6260|6260| 
|6261|    |-//// Animal specific functions ////
|    |6261|+// // Animal specific functions ////
|6262|6262| 
|6263|6263| UnitAI.prototype.MoveRandomly = function(distance)
|6264|6264| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4020| »   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
|4919| »   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
|4934| »   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
|4982| »   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
|5005| »   »   ····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
|2034| »   »   »   »   »   »   &&·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
|3133| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

ERROR: CCmpPosition::GetPosition2D called on entity when IsInWorld is false
When I task a formation to hunt. (Probably has something to do with the fact that I usually visualise the formation when testing stuff with that.)

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

Dot after ).