Page MenuHomeWildfire Games

Fix formations reshaping incorrectly & related issues.
ClosedPublic

Authored by wraitii on May 23 2020, 9:51 AM.

Details

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.


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.

Diff Detail

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

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
This revision now requires changes to proceed.Jun 6 2020, 4:10 PM
In D2763#118830, @Angen wrote:

I broke it.
As I said earlier.

Can you share some reproduction steps?

Angen added a comment.EditedJun 6 2020, 4:20 PM

It is at the line I already said.

But found another issue.
Send melee formation to hunt, after kill, they will not leave formationmember.walking state.

Steps for first report.
Create two formations.
One close to hunt, other far away.
Select both and task to hunt.
The one closer to hunt has to have lower entity id.

wraitii updated this revision to Diff 12177.Jun 6 2020, 4:59 PM
In D2763#118845, @Angen wrote:

It is at the line I already said.

Ah, right, I had completely misunderstood what this twinFormation business was. Fixed.

Send melee formation to hunt, after kill, they will not leave formationmember.walking state.

Can't reproduce this? For me, they all approach the killed entity, then switch to gathering, which is working as designed (it's ugly, but it's functionally what should happen)

Vulcan added a comment.Jun 6 2020, 5:00 PM

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

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

Vulcan added a comment.Jun 6 2020, 5:01 PM

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

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

Stan added a subscriber: Stan.Jun 6 2020, 5:04 PM
Stan added inline comments.
binaries/data/mods/public/simulation/components/Formation.js
935 ↗(On Diff #12177)

Maybe we can use the square for performance

Angen added a comment.Jun 6 2020, 5:47 PM

In D2763#118884, @Angen wrote:

This just seems to be what I've put in the summary:

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.

If you wait for all units to finish moving, they will then properly start gathering. It's actually working "correctly", but the behaviour is kind of dumb. See D2764 .

wraitii updated this revision to Diff 12184.Jun 6 2020, 7:10 PM

I was running on my outdated git branch, sorry about the misunderstanding.
There was indeed an issue related to rP23742.
Can you tell me how you find the current hunting behaviour?

Owners added a subscriber: Restricted Owners Package.Jun 6 2020, 7:10 PM
Vulcan added a comment.Jun 6 2020, 7:11 PM

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

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

Vulcan added a comment.Jun 6 2020, 7:11 PM

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

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

Stan added inline comments.Jun 6 2020, 7:15 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1245 ↗(On Diff #12184)

cmpPosition check?

1375 ↗(On Diff #12184)

typo

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
371 ↗(On Diff #12184)

I guess you can use arrow functions everywhere since you changed the lines? or is the this problematic?

wraitii added inline comments.Jun 6 2020, 7:17 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1245 ↗(On Diff #12184)

I didn't bother because we can assume formations have a position otherwise, but I guess fair enough.

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
371 ↗(On Diff #12184)

the this is problematic.

wraitii updated this revision to Diff 12192.Jun 7 2020, 9:39 AM
wraitii edited the summary of this revision. (Show Details)

Rebase & handle hunting specially, so it now looks correct.

Vulcan added a comment.Jun 7 2020, 9:39 AM

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

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

Angen added a comment.Jun 7 2020, 10:58 AM

Twin formation hunting. It looks very broken with defensive stance.


This one did not reformed correctly but this is minor I think as reshaping looks better than before.
Also notice that they will go back to started location with the diff and not location where they killed target (without diff, they do detour described below), this can be seen as bug mainly problematic when player tasks formation in defensive stance to attack target far away and expects it to stay near the target position.

Not case with only attack order (no hunting), but members still go back to start position and then reform near killed target what is much worse (but since this is the case without the diff, idc too much)

wraitii updated this revision to Diff 12198.Jun 7 2020, 12:53 PM

I'm having trouble seeing exactly what you consider buggy here (and also whether it's new or just also buggy in svn).

From my tests, with the patch, formations reform at the center-point of all units when the gathering order is done, which is usually near the target, though sometimes not. This is also true for twin-formations.

This incorporates a fix for the "going back to the start" behaviour in Defensive, which was because all members also had a held position and thus returned there.

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

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

Angen added a comment.EditedJun 7 2020, 3:12 PM

So you are saying this behaviour is correct not reforming at the position they would stop without formation that would be position of killed target.




Edit: Twin formation hunting in defensive stance is not so messy as was before last update so ok. There were just units all over the place after done hunting.

Angen added a comment.Jun 7 2020, 3:27 PM

Without diff they stop roughly around dead target after gathering.

wraitii added a comment.EditedJun 7 2020, 3:27 PM
In D2763#119126, @Angen wrote:

So you are saying this behaviour is correct not reforming at the position they would stop without formation that would be position of killed target.

No, I simply have a hard time understanding exactly what you're saying.
From what I understand, you think formations tasked to hunt should:

  • hunt
  • when done, reform near the original position of the hunted entity.

This isn't the SVN behaviour nor the regular unit behaviour from what I can tell, so I don't understand why you think this is buggy?

edit:

Without diff they stop roughly around dead target after gathering.

This doesn't seem to be systematic. See

Angen requested changes to this revision.EditedJun 7 2020, 3:53 PM

Held position is not updated in defensive stance so targets around are too much far away, they do not react to attacks.


Form formation -> defensive -> attack group of units further away -> after killing target they stop reacting.
Edit: Note: They would go back to held position and then start to react to targets around in svn, but not reacting at all and getting killed is much worse.

This revision now requires changes to proceed.Jun 7 2020, 3:53 PM
Angen added a comment.Jun 7 2020, 4:00 PM

This doesn't seem to be systematic. See

I suspect target is too close to cc to see the effect. But if it is behaviour of single unit to stop at resource dropsite, ok I do not argue it is wrong to stop there I literally gave question with the pictures. Anyway one or another defensive (svn or diff) behaviour of formation is not correct as they clearly do not behave the same hence I considered new one as bug.

Angen added a comment.EditedJun 7 2020, 4:08 PM

Also this will happen with defensive stance told to hunt (no formation) target in svn. So there is clearly more just one behaviour in current svn.

Target was deer at the other side of the road.

wraitii updated this revision to Diff 12206.Jun 7 2020, 7:34 PM

Patch up the held position, by resetting it when leaving MEMBER.

This is still mostly borken, but I discovered held-position was actually completely broken in general so I'll fix it properly in a different patch.

Vulcan added a comment.Jun 7 2020, 7:34 PM

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

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

Vulcan added a comment.Jun 7 2020, 7:36 PM

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

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

Angen added a comment.Jun 7 2020, 9:22 PM

you have broken unit_ai tests

wraitii updated this revision to Diff 12210.Jun 7 2020, 10:09 PM

Fix tests.

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

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

@Angen Any other issues with this?

Stan added inline comments.Jun 9 2020, 1:13 PM
binaries/data/mods/public/simulation/components/Formation.js
935 ↗(On Diff #12177)

Can we?

914 ↗(On Diff #12210)

I wonder whether it's better to early continue for each, or query all of them then early continue. Likely out of the scope of this patch

binaries/data/mods/public/simulation/templates/template_formation.xml
3 ↗(On Diff #12210)

I guess it should be removed prior to commiting :)

wraitii added inline comments.Jun 9 2020, 1:27 PM
binaries/data/mods/public/simulation/components/Formation.js
935 ↗(On Diff #12177)

I didn't particularly bother changing this, but yes we can it seems.

Angen added a comment.Jun 9 2020, 7:48 PM

They do not die doing nothing. Actually they do what in svn so ok, not braking that part.
They do not reshape when hunting or fighting (what was the goal of the diff).
After hunt in defensive stance with twin formations it is a bit mess, but not related to diff directly as it is related to merging twin formations, also sometimes they end up not merging, what currently is issue as in replay they ended fairly close to merge ( at least I guess they are in merge distance ).
(not merging replay)

In defensive formation stance they sometimes clump up and do not reform, because held position is one point I guess.

Raising concern because inline comment.

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

this.heldPosition is not correct check.
It is never unset when leaving defensive stance so units will behave like in defensive stances.

Angen requested changes to this revision.Jun 9 2020, 7:48 PM
This revision now requires changes to proceed.Jun 9 2020, 7:48 PM
wraitii updated this revision to Diff 12262.Jun 12 2020, 4:57 PM

Check for respondHoldGround in Idle.

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

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

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

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 410| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (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
| 602| 602| 			footprints.push(cmpFootprint.GetShape());
| 603| 603| 	}
| 604| 604| 	if (!footprints.length)
| 605|    |-		return {"width":1, "depth": 1};
|    | 605|+		return { "width":1, "depth": 1};
| 606| 606| 
| 607| 607| 	var r = {"width": 0, "depth": 0};
| 608| 608| 	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
| 602| 602| 			footprints.push(cmpFootprint.GetShape());
| 603| 603| 	}
| 604| 604| 	if (!footprints.length)
| 605|    |-		return {"width":1, "depth": 1};
|    | 605|+		return {"width": 1, "depth": 1};
| 606| 606| 
| 607| 607| 	var r = {"width": 0, "depth": 0};
| 608| 608| 	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
| 602| 602| 			footprints.push(cmpFootprint.GetShape());
| 603| 603| 	}
| 604| 604| 	if (!footprints.length)
| 605|    |-		return {"width":1, "depth": 1};
|    | 605|+		return {"width":1, "depth": 1 };
| 606| 606| 
| 607| 607| 	var r = {"width": 0, "depth": 0};
| 608| 608| 	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
| 604| 604| 	if (!footprints.length)
| 605| 605| 		return {"width":1, "depth": 1};
| 606| 606| 
| 607|    |-	var r = {"width": 0, "depth": 0};
|    | 607|+	var r = { "width": 0, "depth": 0};
| 608| 608| 	for (var shape of footprints)
| 609| 609| 	{
| 610| 610| 		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
| 604| 604| 	if (!footprints.length)
| 605| 605| 		return {"width":1, "depth": 1};
| 606| 606| 
| 607|    |-	var r = {"width": 0, "depth": 0};
|    | 607|+	var r = {"width": 0, "depth": 0 };
| 608| 608| 	for (var shape of footprints)
| 609| 609| 	{
| 610| 610| 		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
| 630| 630| 	separation.depth *= this.separationMultiplier.depth;
| 631| 631| 
| 632| 632| 	if (this.columnar)
| 633|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 633|+		var sortingClasses = ["Cavalry", "Infantry"];
| 634| 634| 	else
| 635| 635| 		var sortingClasses = this.sortingClasses.slice();
| 636| 636| 	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
| 650| 650| 		{
| 651| 651| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 652| 652| 			{
| 653|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 653|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 654| 654| 				done = true;
| 655| 655| 				break;
| 656| 656| 			}
|    | [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
| 650| 650| 		{
| 651| 651| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 652| 652| 			{
| 653|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 653|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 654| 654| 				done = true;
| 655| 655| 				break;
| 656| 656| 			}
|    | [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
| 656| 656| 			}
| 657| 657| 		}
| 658| 658| 		if (!done)
| 659|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 659|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 660| 660| 	}
| 661| 661| 
| 662| 662| 	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
| 656| 656| 			}
| 657| 657| 		}
| 658| 658| 		if (!done)
| 659|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 659|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 660| 660| 	}
| 661| 661| 
| 662| 662| 	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
| 656| 656| 			}
| 657| 657| 		}
| 658| 658| 		if (!done)
| 659|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 659|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 660| 660| 	}
| 661| 661| 
| 662| 662| 	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
| 673| 673| 	if (this.columnar)
| 674| 674| 	{
| 675| 675| 		shape = "square";
| 676|    |-		cols = Math.min(count,3);
|    | 676|+		cols = Math.min(count, 3);
| 677| 677| 		shiftRows = false;
| 678| 678| 		centerGap = 0;
| 679| 679| 		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
| 768| 768| 	// calculating offset distances without a zero average makes no sense, as the formation
| 769| 769| 	// will jump to a different position any time
| 770| 770| 	var avgoffset = Vector2D.average(offsets);
| 771|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 771|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 772| 772| 
| 773| 773| 	// sort the available places in certain ways
| 774| 774| 	// 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
| 827| 827| 			closestOffsetId = i;
| 828| 828| 		}
| 829| 829| 	}
| 830|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 830|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 831| 831| 	return closestOffsetId;
| 832| 832| };
| 833| 833| 
|    | [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
| 827| 827| 			closestOffsetId = i;
| 828| 828| 		}
| 829| 829| 	}
| 830|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 830|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 831| 831| 	return closestOffsetId;
| 832| 832| };
| 833| 833| 
|    | [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
| 827| 827| 			closestOffsetId = i;
| 828| 828| 		}
| 829| 829| 	}
| 830|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 830|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 831| 831| 	return closestOffsetId;
| 832| 832| };
| 833| 833| 
|    | [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
| 837| 837| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 838| 838| {
| 839| 839| 	var offsetPositions = [];
| 840|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 840|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 841| 841| 	// calculate the world positions
| 842| 842| 	for (var o of offsets)
| 843| 843| 		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
| 837| 837| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 838| 838| {
| 839| 839| 	var offsetPositions = [];
| 840|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 840|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 841| 841| 	// calculate the world positions
| 842| 842| 	for (var o of offsets)
| 843| 843| 		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
| 854| 854| Formation.prototype.GetEstimatedOrientation = function(pos)
| 855| 855| {
| 856| 856| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 857|    |-	var r = {"sin": 0, "cos": 1};
|    | 857|+	var r = { "sin": 0, "cos": 1};
| 858| 858| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 859| 859| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 860| 860| 	{
|    | [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
| 854| 854| Formation.prototype.GetEstimatedOrientation = function(pos)
| 855| 855| {
| 856| 856| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 857|    |-	var r = {"sin": 0, "cos": 1};
|    | 857|+	var r = {"sin": 0, "cos": 1 };
| 858| 858| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 859| 859| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 860| 860| 	{

binaries/data/mods/public/simulation/components/Formation.js
| 543| »   »   let·cmpUnitAI·=·Engine.QueryInterface(offset.ent,·IID_UnitAI);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'cmpUnitAI' is already declared in the upper scope.

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 659| »   »   »   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
| 698| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 748| »   »   »   »   »   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
| 750| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 752| »   »   »   »   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
| 762| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 653| »   »   »   »   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
| 791| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

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

binaries/data/mods/public/simulation/components/Formation.js
| 898| »   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
| 794| 794| 					this.FinishOrder();
| 795| 795| 					return;
| 796| 796| 				}
| 797|    |-				else
| 798|    |-				{
|    | 797|+				
| 799| 798| 					this.SetNextState("GARRISON.APPROACHING");
| 800| 799| 					return;
| 801|    |-				}
|    | 800|+				
| 802| 801| 			}
| 803| 802| 
| 804| 803| 			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
|1058|1058| 			},
|1059|1059| 		},
|1060|1060| 
|1061|    |-		"GARRISON":{
|    |1061|+		"GARRISON": {
|1062|1062| 			"APPROACHING": {
|1063|1063| 				"enter": function() {
|1064|1064| 					if (!this.MoveToGarrisonRange(this.order.data.target))
|    | [NORMAL] ESLintBear (operator-linebreak):
|    | '&&' should be placed at the end of the line.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2052|2052| 
|2053|2053| 				"Attacked": function(msg) {
|2054|2054| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2055|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2056|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2055|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2056|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2057|2057| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2058|2058| 				},
|2059|2059| 			},
|    | [NORMAL] ESLintBear (no-trailing-spaces):
|    | Trailing spaces not allowed.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2211|2211| 					"MovementUpdate": function(msg) {
|2212|2212| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2213|2213| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2214|    |-						if (msg.likelyFailure || 
|    |2214|+						if (msg.likelyFailure ||
|2215|2215| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2216|2216| 							!msg.obstructed && this.CheckRange(this.order.data))
|2217|2217| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2514|2514| 
|2515|2515| 								return type.specific == resourceType.specific &&
|2516|2516| 								    (type.specific != "meat" || resourceTemplate == template);
|2517|    |-						});
|    |2517|+							});
|2518|2518| 
|2519|2519| 						if (nearbyResource)
|2520|2520| 						{
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2846|2846| 					{
|2847|2847| 						// The building was already finished/fully repaired before we arrived;
|2848|2848| 						// let the ConstructionFinished handler handle this.
|2849|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2849|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2850|2850| 						return true;
|2851|2851| 					}
|2852|2852| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2846|2846| 					{
|2847|2847| 						// The building was already finished/fully repaired before we arrived;
|2848|2848| 						// let the ConstructionFinished handler handle this.
|2849|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2849|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2850|2850| 						return true;
|2851|2851| 					}
|2852|2852| 
|    | [NORMAL] ESLintBear (semi):
|    | Missing semicolon.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3136|3136| 				this.StopTimer();
|3137|3137| 				this.ResetAnimation();
|3138|3138| 				if (this.formationAnimationVariant)
|3139|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3139|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3140|3140| 				else
|3141|3141| 					this.SetDefaultAnimationVariant();
|3142|3142| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3362|3362| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3363|3363| 
|3364|3364| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3365|    |-							// only used for domestic animals
|    |3365|+		// only used for domestic animals
|3366|3366| 
|3367|3367| 		// Reuse the same garrison behaviour for animals.
|3368|3368| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3414|3414| 
|3415|3415| UnitAI.prototype.IsAnimal = function()
|3416|3416| {
|3417|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3417|+	return (!!this.template.NaturalBehaviour);
|3418|3418| };
|3419|3419| 
|3420|3420| 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
|3554|3554| 		{
|3555|3555| 			let index = this.GetCurrentState().indexOf(".");
|3556|3556| 			if (index != -1)
|3557|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3557|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3558|3558| 			this.Stop(false);
|3559|3559| 		}
|3560|3560| 
|    | [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
|3610|3610| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3611|3611| 			continue;
|3612|3612| 		if (i == 0)
|3613|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3613|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3614|3614| 		else
|3615|3615| 			this.orderQueue.splice(i, 1);
|3616|3616| 		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
|3610|3610| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3611|3611| 			continue;
|3612|3612| 		if (i == 0)
|3613|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3613|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3614|3614| 		else
|3615|3615| 			this.orderQueue.splice(i, 1);
|3616|3616| 		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
|3697|3697| };
|3698|3698| 
|3699|3699| 
|3700|    |-//// FSM linkage functions ////
|    |3700|+// // FSM linkage functions ////
|3701|3701| 
|3702|3702| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3703|3703| 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
|3870|3870| 				continue;
|3871|3871| 			if (this.orderQueue[i].type == type)
|3872|3872| 				continue;
|3873|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3873|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3874|3874| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3875|3875| 			return;
|3876|3876| 		}
|    | [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
|3870|3870| 				continue;
|3871|3871| 			if (this.orderQueue[i].type == type)
|3872|3872| 				continue;
|3873|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3873|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3874|3874| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3875|3875| 			return;
|3876|3876| 		}
|    | [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
|4111|4111| 	if (data.timerRepeat === undefined)
|4112|4112| 		this.timer = undefined;
|4113|4113| 
|4114|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4114|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4115|4115| };
|4116|4116| 
|4117|4117| /**
|    | [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
|4111|4111| 	if (data.timerRepeat === undefined)
|4112|4112| 		this.timer = undefined;
|4113|4113| 
|4114|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4114|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4115|4115| };
|4116|4116| 
|4117|4117| /**
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4156|4156| 	// TODO: This is a bit inefficient since every unit listens to every
|4157|4157| 	// construction message - ideally we could scope it to only the one we're building
|4158|4158| 
|4159|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4159|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4160|4160| };
|4161|4161| 
|4162|4162| 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
|4156|4156| 	// TODO: This is a bit inefficient since every unit listens to every
|4157|4157| 	// construction message - ideally we could scope it to only the one we're building
|4158|4158| 
|4159|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4159|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4160|4160| };
|4161|4161| 
|4162|4162| 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
|4195|4195| 	if (msg.fromStatusEffect)
|4196|4196| 		return;
|4197|4197| 
|4198|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4198|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4199|4199| };
|4200|4200| 
|4201|4201| 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
|4195|4195| 	if (msg.fromStatusEffect)
|4196|4196| 		return;
|4197|4197| 
|4198|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4198|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4199|4199| };
|4200|4200| 
|4201|4201| 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
|4200|4200| 
|4201|4201| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4202|4202| {
|4203|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4203|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4204|4204| };
|4205|4205| 
|4206|4206| 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
|4200|4200| 
|4201|4201| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4202|4202| {
|4203|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4203|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4204|4204| };
|4205|4205| 
|4206|4206| 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
|4205|4205| 
|4206|4206| UnitAI.prototype.OnHealthChanged = function(msg)
|4207|4207| {
|4208|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4208|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4209|4209| };
|4210|4210| 
|4211|4211| 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
|4205|4205| 
|4206|4206| UnitAI.prototype.OnHealthChanged = function(msg)
|4207|4207| {
|4208|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4208|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4209|4209| };
|4210|4210| 
|4211|4211| 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
|4211|4211| UnitAI.prototype.OnRangeUpdate = function(msg)
|4212|4212| {
|4213|4213| 	if (msg.tag == this.losRangeQuery)
|4214|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4214|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4215|4215| 	else if (msg.tag == this.losHealRangeQuery)
|4216|4216| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4217|4217| };
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required before '}'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|4211|4211| UnitAI.prototype.OnRangeUpdate = function(msg)
|4212|4212| {
|4213|4213| 	if (msg.tag == this.losRangeQuery)
|4214|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4214|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4215|4215| 	else if (msg.tag == this.losHealRangeQuery)
|4216|4216| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4217|4217| };
|    | [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
|4213|4213| 	if (msg.tag == this.losRangeQuery)
|4214|4214| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4215|4215| 	else if (msg.tag == this.losHealRangeQuery)
|4216|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4216|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4217|4217| };
|4218|4218| 
|4219|4219| 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
|4213|4213| 	if (msg.tag == this.losRangeQuery)
|4214|4214| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4215|4215| 	else if (msg.tag == this.losHealRangeQuery)
|4216|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4216|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4217|4217| };
|4218|4218| 
|4219|4219| 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
|4218|4218| 
|4219|4219| UnitAI.prototype.OnPackFinished = function(msg)
|4220|4220| {
|4221|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4221|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4222|4222| };
|4223|4223| 
|4224|4224| //// 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
|4218|4218| 
|4219|4219| UnitAI.prototype.OnPackFinished = function(msg)
|4220|4220| {
|4221|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4221|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4222|4222| };
|4223|4223| 
|4224|4224| //// 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
|4221|4221| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4222|4222| };
|4223|4223| 
|4224|    |-//// Helper functions to be called by the FSM ////
|    |4224|+// // Helper functions to be called by the FSM ////
|4225|4225| 
|4226|4226| UnitAI.prototype.GetWalkSpeed = function()
|4227|4227| {
|    | [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
|4951|4951| UnitAI.prototype.AttackEntityInZone = function(ents)
|4952|4952| {
|4953|4953| 	var target = ents.find(target =>
|4954|    |-		this.CanAttack(target)
|4955|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4954|+		this.CanAttack(target) &&
|    |4955|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4956|4956| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4957|4957| 	);
|4958|4958| 	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
|4952|4952| {
|4953|4953| 	var target = ents.find(target =>
|4954|4954| 		this.CanAttack(target)
|4955|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4956|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4955|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4956|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4957|4957| 	);
|4958|4958| 	if (!target)
|4959|4959| 		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
|5018|5018| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5019|5019| 	if (this.isGuardOf)
|5020|5020| 	{
|5021|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5021|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5022|5022| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5023|5023| 		if (cmpUnitAI && cmpAttack &&
|5024|5024| 		    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
|5022|5022| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5023|5023| 		if (cmpUnitAI && cmpAttack &&
|5024|5024| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5025|    |-				return false;
|    |5025|+			return false;
|5026|5026| 	}
|5027|5027| 
|5028|5028| 	// 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
|5060|5060| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5061|5061| 	if (this.isGuardOf)
|5062|5062| 	{
|5063|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5063|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5064|5064| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5065|5065| 		if (cmpUnitAI && cmpAttack &&
|5066|5066| 		    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
|5073|5073| 	return false;
|5074|5074| };
|5075|5075| 
|5076|    |-//// External interface functions ////
|    |5076|+// // External interface functions ////
|5077|5077| 
|5078|5078| UnitAI.prototype.SetFormationController = function(ent)
|5079|5079| {
|    | [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
|5229|5229| 	{
|5230|5230| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5231|5231| 			return;
|5232|    |-		else
|5233|    |-			this.RemoveGuard();
|    |5232|+		this.RemoveGuard();
|5234|5233| 	}
|5235|5234| 
|5236|5235| 	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
|5563|5563| 
|5564|5564| 	if (this.IsFormationController())
|5565|5565| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5566|    |-}
|    |5566|+};
|5567|5567| /**
|5568|5568|  * Adds trade order to the queue. Either walk to the first market, or
|5569|5569|  * 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
|5584|5584| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5585|5585| 	{
|5586|5586| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5587|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5587|+		if (cmpTrader.HasBothMarkets() &&
|5588|5588| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5589|5589| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5590|5590| 		{
|    | [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
|5865|5865| 				{
|5866|5866| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5867|5867| 					var targetClasses = this.order.data.targetClasses;
|5868|    |-					if (targetClasses.attack && cmpIdentity
|5869|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5868|+					if (targetClasses.attack && cmpIdentity &&
|    |5869|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5870|5870| 						continue;
|5871|5871| 					if (targetClasses.avoid && cmpIdentity
|5872|5872| 						&& 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
|5868|5868| 					if (targetClasses.attack && cmpIdentity
|5869|5869| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5870|5870| 						continue;
|5871|    |-					if (targetClasses.avoid && cmpIdentity
|5872|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5871|+					if (targetClasses.avoid && cmpIdentity &&
|    |5872|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5873|5873| 						continue;
|5874|5874| 					// Only used by the AIs to prevent some choices of targets
|5875|5875| 					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
|5891|5891| 		{
|5892|5892| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5893|5893| 			var targetClasses = this.order.data.targetClasses;
|5894|    |-			if (cmpIdentity && targetClasses.attack
|5895|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5894|+			if (cmpIdentity && targetClasses.attack &&
|    |5895|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5896|5896| 				continue;
|5897|5897| 			if (cmpIdentity && targetClasses.avoid
|5898|5898| 				&& 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
|5894|5894| 			if (cmpIdentity && targetClasses.attack
|5895|5895| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5896|5896| 				continue;
|5897|    |-			if (cmpIdentity && targetClasses.avoid
|5898|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5897|+			if (cmpIdentity && targetClasses.avoid &&
|    |5898|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5899|5899| 				continue;
|5900|5900| 			// Only used by the AIs to prevent some choices of targets
|5901|5901| 			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
|6054|6054| 
|6055|6055| UnitAI.prototype.SetHeldPosition = function(x, z)
|6056|6056| {
|6057|    |-	this.heldPosition = {"x": x, "z": z};
|    |6057|+	this.heldPosition = { "x": x, "z": z};
|6058|6058| };
|6059|6059| 
|6060|6060| 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
|6054|6054| 
|6055|6055| UnitAI.prototype.SetHeldPosition = function(x, z)
|6056|6056| {
|6057|    |-	this.heldPosition = {"x": x, "z": z};
|    |6057|+	this.heldPosition = {"x": x, "z": z };
|6058|6058| };
|6059|6059| 
|6060|6060| 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
|6081|6081| 	return false;
|6082|6082| };
|6083|6083| 
|6084|    |-//// Helper functions ////
|    |6084|+// // Helper functions ////
|6085|6085| 
|6086|6086| /**
|6087|6087|  * 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
|6100|6100| 		return undefined;
|6101|6101| 
|6102|6102| 	return component.GetRange(type);
|6103|    |-}
|    |6103|+};
|6104|6104| 
|6105|6105| UnitAI.prototype.CanAttack = function(target)
|6106|6106| {
|    | [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
|6276|6276| 	return cmpPack && cmpPack.IsPacking();
|6277|6277| };
|6278|6278| 
|6279|    |-//// Formation specific functions ////
|    |6279|+// // Formation specific functions ////
|6280|6280| 
|6281|6281| UnitAI.prototype.IsAttackingAsFormation = function()
|6282|6282| {
|    | [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
|6281|6281| UnitAI.prototype.IsAttackingAsFormation = function()
|6282|6282| {
|6283|6283| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6284|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6285|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6284|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6285|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6286|6286| };
|6287|6287| 
|6288|6288| //// 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
|6285|6285| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6286|6286| };
|6287|6287| 
|6288|    |-//// Animal specific functions ////
|    |6288|+// // Animal specific functions ////
|6289|6289| 
|6290|6290| UnitAI.prototype.MoveRandomly = function(distance)
|6291|6291| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4016| »   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
|4938| »   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
|4953| »   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
|5001| »   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
|5024| »   »   ····cmpAttack.GetAttackTypes().some(type·=>·cmpUnitAI.CheckTargetAttackRange(this.isGuardOf,·type)))
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'type' is already declared in the upper scope.

binaries/data/mods/public/simulation/components/UnitAI.js
|2056| »   »   »   »   »   »   &&·this.order.data.target·!=·msg.data.attacker·&&·this.GetBestAttackAgainst(msg.data.attacker,·true)·!=·"Capture")
|    | [NORMAL] JSHintBear:
|    | Misleading line break before '&&'; readers may interpret this as an expression boundary.

binaries/data/mods/public/simulation/components/UnitAI.js
|3139| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

Angen added inline comments.Jun 15 2020, 1:46 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1567 ↗(On Diff #12262)

Issue and question:
This will move entity to point without changing state, so moving while in IDLE and even confirmed to be idle.

Why I did not see this is because when leaving almost any state it is called walktoheldposition, which enters walking state correctly so entity should be around held position.

In case they are not, that would mean they could not find path and here they are trying to do it again, so distance can be quite large and in case their path is no longer obstructed and they can find the path they would move while in idle.

Is this intended behaviour?

wraitii added inline comments.Jun 15 2020, 1:52 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1567 ↗(On Diff #12262)

I did do that on purpose -> these units are Idle, and they should perform the LOS check for nearby enemies. So they need to stay in Idle.

Calling walktoheldposition would move the WALKING, which would no longer (afaik) trigger this auto-detection of enemy.

In case they are not, that would mean they could not find path and here they are trying to do it again, so distance can be quite large and in case their path is no longer obstructed and they can find the path they would move while in idle.

Actually no, this is designed to handle such cases as units having finished repairing or gathering, which don't call "WalkToHeldPosition". Arguably that could be fixed there, but I don't see it as obviously superior.

Moving while in Idle is not (imo) a bug, the unit _is_ idle, it's moving but that can be stopped anytime, it's not actually following an order to do something. From the AI POV for example, this unit is indeed idle.

Angen added inline comments.Jun 15 2020, 4:39 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1567 ↗(On Diff #12262)

when walking to held position is not supposed to be order, then there should not be none walk to held position and handle it here,

but again they should be in any walking state when moving imo.

with this it is once behaving like order with custom state and once as moving unit in idle state what is inconsistent and one cannot be sure anymore by asking if unit is idle/walking or not because it does same thing in two different ways.

this looks to me like lets handle this special case as entity would be idle hack.

wraitii added inline comments.Jun 15 2020, 4:51 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1567 ↗(On Diff #12262)

but again they should be in any walking state when moving imo.

This is debatable if we ever want to have order order types that are moving (such as moving during GATHER or ATTACK).

with this it is once behaving like order with custom state and once as moving unit in idle state what is inconsistent and one cannot be sure anymore by asking if unit is idle/walking or not because it does same thing in two different ways.

One should not check if a unit is walking by calling unitAI.IsIdle. For that, one must use CmpUnitMotion.IsMoveRequested

I would actually agree that MoveToHeldPosition should be removed.

wraitii added inline comments.Jun 15 2020, 4:56 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1567 ↗(On Diff #12262)

With that being said, this is a bigger departure from usual code. SO I will change this to call WalkToHeldPosition I think.

wraitii updated this revision to Diff 12386.Jun 19 2020, 8:44 AM

Use WalkToHeldPosition.

Angen added inline comments.Jun 22 2020, 3:35 PM
binaries/data/mods/public/simulation/components/UnitAI.js
1565 ↗(On Diff #12386)

could you please move it before setting entity to idle and sending message?
Now there is potential infinite loop i guess because held position will not get reset.
Example:
formationcontroller calls SetHeldPosition(x, y) -> held position will be [x, y] but with many formation members it can be quite common not getting into that position and since failure is held in walking state, it will constantly fail loop. because reentering idle state.
Or position of formation being in the middle of another entity (house ?) not sure if this is possible, but since formation position is just average of member positions it looks pretty possible.

wraitii updated this revision to Diff 12443.Jun 24 2020, 12:05 PM

Move before message.

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

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

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

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

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

binaries/data/mods/public/simulation/components/tests/test_UnitAI.js
| 410| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (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
| 602| 602| 			footprints.push(cmpFootprint.GetShape());
| 603| 603| 	}
| 604| 604| 	if (!footprints.length)
| 605|    |-		return {"width":1, "depth": 1};
|    | 605|+		return { "width":1, "depth": 1};
| 606| 606| 
| 607| 607| 	var r = {"width": 0, "depth": 0};
| 608| 608| 	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
| 602| 602| 			footprints.push(cmpFootprint.GetShape());
| 603| 603| 	}
| 604| 604| 	if (!footprints.length)
| 605|    |-		return {"width":1, "depth": 1};
|    | 605|+		return {"width": 1, "depth": 1};
| 606| 606| 
| 607| 607| 	var r = {"width": 0, "depth": 0};
| 608| 608| 	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
| 602| 602| 			footprints.push(cmpFootprint.GetShape());
| 603| 603| 	}
| 604| 604| 	if (!footprints.length)
| 605|    |-		return {"width":1, "depth": 1};
|    | 605|+		return {"width":1, "depth": 1 };
| 606| 606| 
| 607| 607| 	var r = {"width": 0, "depth": 0};
| 608| 608| 	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
| 604| 604| 	if (!footprints.length)
| 605| 605| 		return {"width":1, "depth": 1};
| 606| 606| 
| 607|    |-	var r = {"width": 0, "depth": 0};
|    | 607|+	var r = { "width": 0, "depth": 0};
| 608| 608| 	for (var shape of footprints)
| 609| 609| 	{
| 610| 610| 		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
| 604| 604| 	if (!footprints.length)
| 605| 605| 		return {"width":1, "depth": 1};
| 606| 606| 
| 607|    |-	var r = {"width": 0, "depth": 0};
|    | 607|+	var r = {"width": 0, "depth": 0 };
| 608| 608| 	for (var shape of footprints)
| 609| 609| 	{
| 610| 610| 		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
| 630| 630| 	separation.depth *= this.separationMultiplier.depth;
| 631| 631| 
| 632| 632| 	if (this.columnar)
| 633|    |-		var sortingClasses = ["Cavalry","Infantry"];
|    | 633|+		var sortingClasses = ["Cavalry", "Infantry"];
| 634| 634| 	else
| 635| 635| 		var sortingClasses = this.sortingClasses.slice();
| 636| 636| 	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
| 650| 650| 		{
| 651| 651| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 652| 652| 			{
| 653|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 653|+				types[sortingClasses[c]].push({ "ent": active[i], "pos": positions[i]});
| 654| 654| 				done = true;
| 655| 655| 				break;
| 656| 656| 			}
|    | [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
| 650| 650| 		{
| 651| 651| 			if (classes.indexOf(sortingClasses[c]) > -1)
| 652| 652| 			{
| 653|    |-				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i]});
|    | 653|+				types[sortingClasses[c]].push({"ent": active[i], "pos": positions[i] });
| 654| 654| 				done = true;
| 655| 655| 				break;
| 656| 656| 			}
|    | [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
| 656| 656| 			}
| 657| 657| 		}
| 658| 658| 		if (!done)
| 659|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 659|+			types.Unknown.push({"ent": active[i], "pos": positions[i]});
| 660| 660| 	}
| 661| 661| 
| 662| 662| 	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
| 656| 656| 			}
| 657| 657| 		}
| 658| 658| 		if (!done)
| 659|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 659|+			types["Unknown"].push({ "ent": active[i], "pos": positions[i]});
| 660| 660| 	}
| 661| 661| 
| 662| 662| 	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
| 656| 656| 			}
| 657| 657| 		}
| 658| 658| 		if (!done)
| 659|    |-			types["Unknown"].push({"ent": active[i], "pos": positions[i]});
|    | 659|+			types["Unknown"].push({"ent": active[i], "pos": positions[i] });
| 660| 660| 	}
| 661| 661| 
| 662| 662| 	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
| 673| 673| 	if (this.columnar)
| 674| 674| 	{
| 675| 675| 		shape = "square";
| 676|    |-		cols = Math.min(count,3);
|    | 676|+		cols = Math.min(count, 3);
| 677| 677| 		shiftRows = false;
| 678| 678| 		centerGap = 0;
| 679| 679| 		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
| 768| 768| 	// calculating offset distances without a zero average makes no sense, as the formation
| 769| 769| 	// will jump to a different position any time
| 770| 770| 	var avgoffset = Vector2D.average(offsets);
| 771|    |-	offsets.forEach(function (o) {o.sub(avgoffset);});
|    | 771|+	offsets.forEach(function(o) {o.sub(avgoffset);});
| 772| 772| 
| 773| 773| 	// sort the available places in certain ways
| 774| 774| 	// 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
| 827| 827| 			closestOffsetId = i;
| 828| 828| 		}
| 829| 829| 	}
| 830|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 830|+	this.memberPositions[entPos.ent] = { "row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
| 831| 831| 	return closestOffsetId;
| 832| 832| };
| 833| 833| 
|    | [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
| 827| 827| 			closestOffsetId = i;
| 828| 828| 		}
| 829| 829| 	}
| 830|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 830|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column": offsets[closestOffsetId].column};
| 831| 831| 	return closestOffsetId;
| 832| 832| };
| 833| 833| 
|    | [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
| 827| 827| 			closestOffsetId = i;
| 828| 828| 		}
| 829| 829| 	}
| 830|    |-	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column};
|    | 830|+	this.memberPositions[entPos.ent] = {"row": offsets[closestOffsetId].row, "column":offsets[closestOffsetId].column };
| 831| 831| 	return closestOffsetId;
| 832| 832| };
| 833| 833| 
|    | [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
| 837| 837| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 838| 838| {
| 839| 839| 	var offsetPositions = [];
| 840|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 840|+	var { sin, cos} = this.GetEstimatedOrientation(pos);
| 841| 841| 	// calculate the world positions
| 842| 842| 	for (var o of offsets)
| 843| 843| 		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
| 837| 837| Formation.prototype.GetRealOffsetPositions = function(offsets, pos)
| 838| 838| {
| 839| 839| 	var offsetPositions = [];
| 840|    |-	var {sin, cos} = this.GetEstimatedOrientation(pos);
|    | 840|+	var {sin, cos } = this.GetEstimatedOrientation(pos);
| 841| 841| 	// calculate the world positions
| 842| 842| 	for (var o of offsets)
| 843| 843| 		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
| 854| 854| Formation.prototype.GetEstimatedOrientation = function(pos)
| 855| 855| {
| 856| 856| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 857|    |-	var r = {"sin": 0, "cos": 1};
|    | 857|+	var r = { "sin": 0, "cos": 1};
| 858| 858| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 859| 859| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 860| 860| 	{
|    | [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
| 854| 854| Formation.prototype.GetEstimatedOrientation = function(pos)
| 855| 855| {
| 856| 856| 	var cmpUnitAI = Engine.QueryInterface(this.entity, IID_UnitAI);
| 857|    |-	var r = {"sin": 0, "cos": 1};
|    | 857|+	var r = {"sin": 0, "cos": 1 };
| 858| 858| 	var unitAIState = cmpUnitAI.GetCurrentState();
| 859| 859| 	if (unitAIState == "FORMATIONCONTROLLER.WALKING" || unitAIState == "FORMATIONCONTROLLER.COMBAT.APPROACHING")
| 860| 860| 	{

binaries/data/mods/public/simulation/components/Formation.js
| 543| »   »   let·cmpUnitAI·=·Engine.QueryInterface(offset.ent,·IID_UnitAI);
|    | [NORMAL] ESLintBear (no-shadow):
|    | 'cmpUnitAI' is already declared in the upper scope.

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 659| »   »   »   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
| 698| »   »   for·(var·i·=·0;·i·<·count;·++i)
|    | [NORMAL] JSHintBear:
|    | 'i' is already defined.

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 748| »   »   »   »   »   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
| 750| »   »   »   »   »   x·+=·side·*·centerGap·/·2;
|    | [NORMAL] JSHintBear:
|    | 'x' used out of scope.

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 752| »   »   »   »   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
| 762| »   »   »   this.maxColumnsUsed[r]·=·n;
|    | [NORMAL] JSHintBear:
|    | 'n' used out of scope.

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

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

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

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

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

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

binaries/data/mods/public/simulation/components/Formation.js
| 653| »   »   »   »   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
| 791| »   for·(var·i·=·sortingClasses.length;·i;·--i)
|    | [NORMAL] JSHintBear:
|    | 'sortingClasses' used out of scope.

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

binaries/data/mods/public/simulation/components/Formation.js
| 898| »   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
| 794| 794| 					this.FinishOrder();
| 795| 795| 					return;
| 796| 796| 				}
| 797|    |-				else
| 798|    |-				{
|    | 797|+				
| 799| 798| 					this.SetNextState("GARRISON.APPROACHING");
| 800| 799| 					return;
| 801|    |-				}
|    | 800|+				
| 802| 801| 			}
| 803| 802| 
| 804| 803| 			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
|1058|1058| 			},
|1059|1059| 		},
|1060|1060| 
|1061|    |-		"GARRISON":{
|    |1061|+		"GARRISON": {
|1062|1062| 			"APPROACHING": {
|1063|1063| 				"enter": function() {
|1064|1064| 					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
|2053|2053| 
|2054|2054| 				"Attacked": function(msg) {
|2055|2055| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2056|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2057|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2056|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2057|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2058|2058| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2059|2059| 				},
|2060|2060| 			},
|    | [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
|2212|2212| 					"MovementUpdate": function(msg) {
|2213|2213| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2214|2214| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2215|    |-						if (msg.likelyFailure || 
|    |2215|+						if (msg.likelyFailure ||
|2216|2216| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2217|2217| 							!msg.obstructed && this.CheckRange(this.order.data))
|2218|2218| 							this.FinishOrder();
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 7 tabs but found 6.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|2515|2515| 
|2516|2516| 								return type.specific == resourceType.specific &&
|2517|2517| 								    (type.specific != "meat" || resourceTemplate == template);
|2518|    |-						});
|    |2518|+							});
|2519|2519| 
|2520|2520| 						if (nearbyResource)
|2521|2521| 						{
|    | [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
|2847|2847| 					{
|2848|2848| 						// The building was already finished/fully repaired before we arrived;
|2849|2849| 						// let the ConstructionFinished handler handle this.
|2850|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2850|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2851|2851| 						return true;
|2852|2852| 					}
|2853|2853| 
|    | [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
|2847|2847| 					{
|2848|2848| 						// The building was already finished/fully repaired before we arrived;
|2849|2849| 						// let the ConstructionFinished handler handle this.
|2850|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2850|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2851|2851| 						return true;
|2852|2852| 					}
|2853|2853| 
|    | [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
|3137|3137| 				this.StopTimer();
|3138|3138| 				this.ResetAnimation();
|3139|3139| 				if (this.formationAnimationVariant)
|3140|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3140|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3141|3141| 				else
|3142|3142| 					this.SetDefaultAnimationVariant();
|3143|3143| 				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
|3363|3363| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3364|3364| 
|3365|3365| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3366|    |-							// only used for domestic animals
|    |3366|+		// only used for domestic animals
|3367|3367| 
|3368|3368| 		// Reuse the same garrison behaviour for animals.
|3369|3369| 		"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
|3415|3415| 
|3416|3416| UnitAI.prototype.IsAnimal = function()
|3417|3417| {
|3418|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3418|+	return (!!this.template.NaturalBehaviour);
|3419|3419| };
|3420|3420| 
|3421|3421| 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
|3555|3555| 		{
|3556|3556| 			let index = this.GetCurrentState().indexOf(".");
|3557|3557| 			if (index != -1)
|3558|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3558|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3559|3559| 			this.Stop(false);
|3560|3560| 		}
|3561|3561| 
|    | [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
|3611|3611| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3612|3612| 			continue;
|3613|3613| 		if (i == 0)
|3614|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3614|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3615|3615| 		else
|3616|3616| 			this.orderQueue.splice(i, 1);
|3617|3617| 		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
|3611|3611| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3612|3612| 			continue;
|3613|3613| 		if (i == 0)
|3614|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3614|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3615|3615| 		else
|3616|3616| 			this.orderQueue.splice(i, 1);
|3617|3617| 		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
|3698|3698| };
|3699|3699| 
|3700|3700| 
|3701|    |-//// FSM linkage functions ////
|    |3701|+// // FSM linkage functions ////
|3702|3702| 
|3703|3703| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3704|3704| 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
|3871|3871| 				continue;
|3872|3872| 			if (this.orderQueue[i].type == type)
|3873|3873| 				continue;
|3874|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3874|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3875|3875| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3876|3876| 			return;
|3877|3877| 		}
|    | [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
|3871|3871| 				continue;
|3872|3872| 			if (this.orderQueue[i].type == type)
|3873|3873| 				continue;
|3874|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3874|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3875|3875| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3876|3876| 			return;
|3877|3877| 		}
|    | [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
|4112|4112| 	if (data.timerRepeat === undefined)
|4113|4113| 		this.timer = undefined;
|4114|4114| 
|4115|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4115|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4116|4116| };
|4117|4117| 
|4118|4118| /**
|    | [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
|4112|4112| 	if (data.timerRepeat === undefined)
|4113|4113| 		this.timer = undefined;
|4114|4114| 
|4115|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4115|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4116|4116| };
|4117|4117| 
|4118|4118| /**
|    | [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
|4157|4157| 	// TODO: This is a bit inefficient since every unit listens to every
|4158|4158| 	// construction message - ideally we could scope it to only the one we're building
|4159|4159| 
|4160|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4160|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4161|4161| };
|4162|4162| 
|4163|4163| 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
|4157|4157| 	// TODO: This is a bit inefficient since every unit listens to every
|4158|4158| 	// construction message - ideally we could scope it to only the one we're building
|4159|4159| 
|4160|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4160|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4161|4161| };
|4162|4162| 
|4163|4163| 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
|4196|4196| 	if (msg.fromStatusEffect)
|4197|4197| 		return;
|4198|4198| 
|4199|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4199|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4200|4200| };
|4201|4201| 
|4202|4202| 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
|4196|4196| 	if (msg.fromStatusEffect)
|4197|4197| 		return;
|4198|4198| 
|4199|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4199|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4200|4200| };
|4201|4201| 
|4202|4202| 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
|4201|4201| 
|4202|4202| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4203|4203| {
|4204|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4204|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4205|4205| };
|4206|4206| 
|4207|4207| 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
|4201|4201| 
|4202|4202| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4203|4203| {
|4204|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4204|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4205|4205| };
|4206|4206| 
|4207|4207| 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
|4206|4206| 
|4207|4207| UnitAI.prototype.OnHealthChanged = function(msg)
|4208|4208| {
|4209|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4209|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4210|4210| };
|4211|4211| 
|4212|4212| 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
|4206|4206| 
|4207|4207| UnitAI.prototype.OnHealthChanged = function(msg)
|4208|4208| {
|4209|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4209|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4210|4210| };
|4211|4211| 
|4212|4212| 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
|4212|4212| UnitAI.prototype.OnRangeUpdate = function(msg)
|4213|4213| {
|4214|4214| 	if (msg.tag == this.losRangeQuery)
|4215|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4215|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4216|4216| 	else if (msg.tag == this.losHealRangeQuery)
|4217|4217| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4218|4218| };
|    | [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
|4212|4212| UnitAI.prototype.OnRangeUpdate = function(msg)
|4213|4213| {
|4214|4214| 	if (msg.tag == this.losRangeQuery)
|4215|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4215|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4216|4216| 	else if (msg.tag == this.losHealRangeQuery)
|4217|4217| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4218|4218| };
|    | [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| 	if (msg.tag == this.losRangeQuery)
|4215|4215| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4216|4216| 	else if (msg.tag == this.losHealRangeQuery)
|4217|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4217|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4218|4218| };
|4219|4219| 
|4220|4220| 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
|4214|4214| 	if (msg.tag == this.losRangeQuery)
|4215|4215| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4216|4216| 	else if (msg.tag == this.losHealRangeQuery)
|4217|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4217|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4218|4218| };
|4219|4219| 
|4220|4220| 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
|4219|4219| 
|4220|4220| UnitAI.prototype.OnPackFinished = function(msg)
|4221|4221| {
|4222|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4222|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4223|4223| };
|4224|4224| 
|4225|4225| //// 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
|4219|4219| 
|4220|4220| UnitAI.prototype.OnPackFinished = function(msg)
|4221|4221| {
|4222|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4222|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4223|4223| };
|4224|4224| 
|4225|4225| //// 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
|4222|4222| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4223|4223| };
|4224|4224| 
|4225|    |-//// Helper functions to be called by the FSM ////
|    |4225|+// // Helper functions to be called by the FSM ////
|4226|4226| 
|4227|4227| UnitAI.prototype.GetWalkSpeed = function()
|4228|4228| {
|    | [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
|4952|4952| UnitAI.prototype.AttackEntityInZone = function(ents)
|4953|4953| {
|4954|4954| 	var target = ents.find(target =>
|4955|    |-		this.CanAttack(target)
|4956|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4955|+		this.CanAttack(target) &&
|    |4956|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4957|4957| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4958|4958| 	);
|4959|4959| 	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
|4953|4953| {
|4954|4954| 	var target = ents.find(target =>
|4955|4955| 		this.CanAttack(target)
|4956|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4957|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4956|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4957|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4958|4958| 	);
|4959|4959| 	if (!target)
|4960|4960| 		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
|5019|5019| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5020|5020| 	if (this.isGuardOf)
|5021|5021| 	{
|5022|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5022|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5023|5023| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5024|5024| 		if (cmpUnitAI && cmpAttack &&
|5025|5025| 		    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
|5023|5023| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5024|5024| 		if (cmpUnitAI && cmpAttack &&
|5025|5025| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5026|    |-				return false;
|    |5026|+			return false;
|5027|5027| 	}
|5028|5028| 
|5029|5029| 	// 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
|5061|5061| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5062|5062| 	if (this.isGuardOf)
|5063|5063| 	{
|5064|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5064|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5065|5065| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5066|5066| 		if (cmpUnitAI && cmpAttack &&
|5067|5067| 		    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
|5074|5074| 	return false;
|5075|5075| };
|5076|5076| 
|5077|    |-//// External interface functions ////
|    |5077|+// // External interface functions ////
|5078|5078| 
|5079|5079| UnitAI.prototype.SetFormationController = function(ent)
|5080|5080| {
|    | [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
|5230|5230| 	{
|5231|5231| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5232|5232| 			return;
|5233|    |-		else
|5234|    |-			this.RemoveGuard();
|    |5233|+		this.RemoveGuard();
|5235|5234| 	}
|5236|5235| 
|5237|5236| 	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
|5564|5564| 
|5565|5565| 	if (this.IsFormationController())
|5566|5566| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5567|    |-}
|    |5567|+};
|5568|5568| /**
|5569|5569|  * Adds trade order to the queue. Either walk to the first market, or
|5570|5570|  * 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
|5585|5585| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5586|5586| 	{
|5587|5587| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5588|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5588|+		if (cmpTrader.HasBothMarkets() &&
|5589|5589| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5590|5590| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5591|5591| 		{
|    | [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
|5866|5866| 				{
|5867|5867| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5868|5868| 					var targetClasses = this.order.data.targetClasses;
|5869|    |-					if (targetClasses.attack && cmpIdentity
|5870|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5869|+					if (targetClasses.attack && cmpIdentity &&
|    |5870|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5871|5871| 						continue;
|5872|5872| 					if (targetClasses.avoid && cmpIdentity
|5873|5873| 						&& 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
|5869|5869| 					if (targetClasses.attack && cmpIdentity
|5870|5870| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5871|5871| 						continue;
|5872|    |-					if (targetClasses.avoid && cmpIdentity
|5873|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5872|+					if (targetClasses.avoid && cmpIdentity &&
|    |5873|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5874|5874| 						continue;
|5875|5875| 					// Only used by the AIs to prevent some choices of targets
|5876|5876| 					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
|5892|5892| 		{
|5893|5893| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5894|5894| 			var targetClasses = this.order.data.targetClasses;
|5895|    |-			if (cmpIdentity && targetClasses.attack
|5896|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5895|+			if (cmpIdentity && targetClasses.attack &&
|    |5896|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5897|5897| 				continue;
|5898|5898| 			if (cmpIdentity && targetClasses.avoid
|5899|5899| 				&& 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
|5895|5895| 			if (cmpIdentity && targetClasses.attack
|5896|5896| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5897|5897| 				continue;
|5898|    |-			if (cmpIdentity && targetClasses.avoid
|5899|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5898|+			if (cmpIdentity && targetClasses.avoid &&
|    |5899|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5900|5900| 				continue;
|5901|5901| 			// Only used by the AIs to prevent some choices of targets
|5902|5902| 			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
|6055|6055| 
|6056|6056| UnitAI.prototype.SetHeldPosition = function(x, z)
|6057|6057| {
|6058|    |-	this.heldPosition = {"x": x, "z": z};
|    |6058|+	this.heldPosition = { "x": x, "z": z};
|6059|6059| };
|6060|6060| 
|6061|6061| 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
|6055|6055| 
|6056|6056| UnitAI.prototype.SetHeldPosition = function(x, z)
|6057|6057| {
|6058|    |-	this.heldPosition = {"x": x, "z": z};
|    |6058|+	this.heldPosition = {"x": x, "z": z };
|6059|6059| };
|6060|6060| 
|6061|6061| 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
|6082|6082| 	return false;
|6083|6083| };
|6084|6084| 
|6085|    |-//// Helper functions ////
|    |6085|+// // Helper functions ////
|6086|6086| 
|6087|6087| /**
|6088|6088|  * 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
|6101|6101| 		return undefined;
|6102|6102| 
|6103|6103| 	return component.GetRange(type);
|6104|    |-}
|    |6104|+};
|6105|6105| 
|6106|6106| UnitAI.prototype.CanAttack = function(target)
|6107|6107| {
|    | [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
|6277|6277| 	return cmpPack && cmpPack.IsPacking();
|6278|6278| };
|6279|6279| 
|6280|    |-//// Formation specific functions ////
|    |6280|+// // Formation specific functions ////
|6281|6281| 
|6282|6282| UnitAI.prototype.IsAttackingAsFormation = function()
|6283|6283| {
|    | [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
|6282|6282| UnitAI.prototype.IsAttackingAsFormation = function()
|6283|6283| {
|6284|6284| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6285|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6286|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6285|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6286|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6287|6287| };
|6288|6288| 
|6289|6289| //// 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
|6286|6286| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6287|6287| };
|6288|6288| 
|6289|    |-//// Animal specific functions ////
|    |6289|+// // Animal specific functions ////
|6290|6290| 
|6291|6291| UnitAI.prototype.MoveRandomly = function(distance)
|6292|6292| {

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

binaries/data/mods/public/simulation/components/UnitAI.js
|4017| »   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
|4939| »   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
|4954| »   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
|5002| »   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
|5025| »   »   ····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
|2057| »   »   »   »   »   »   &&·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
|3140| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

@Angen Any chance you could review this again? I think we're good now.

create square formation of 35 units. Set them to defensive stance. After arriving to position some will move to the Centre of formation.

Or form line from 32 units they will instantly move towards Centre. Does not happen on hold ground.

wraitii updated this revision to Diff 12480.Jun 28 2020, 11:35 AM

Ah, thanks, I had missed that bevhaiour as I wasn't testing large enough formations.
It's fixed, and the units in formations no longer move. If you remove the formation, they will go to the held position (and clump) though - but I don't think we should really fix that.

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

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

Angen accepted this revision.Jul 2 2020, 7:25 PM

Fighting in formation with defensive stance looks like in svn (broken, but not more as it is now).
Formation does not reshape while doing stuff.

This revision is now accepted and ready to land.Jul 2 2020, 7:25 PM
This revision was landed with ongoing or failed builds.Jul 7 2020, 12:26 PM
This revision was automatically updated to reflect the committed changes.