Page MenuHomeWildfire Games

Allow entities to keep facing another entity.
Changes PlannedPublic

Authored by Freagarach on Jul 9 2020, 8:25 PM.

Details

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

Currently in UnitAI there needs to be a timer for nigh any activity if the target can move, to FaceTowardsTarget. Most of the time one wants to follow the motion of the target. This can be handled just fine by UnitMotion. Using this would let fighting look more natural since the turning is not performed only when attacking but also in the meantime.

This adds a function to let an entity keep facing another entity, handled during the update to move.

Test Plan

Add the function and watch the entity facing the one set.
Comment on the code.

Unit TestsFailed

TimeTest
0 msJenkins > TestComponentScripts::test_scripts
Test failed: L"Running script simulation/components/tests/test_UnitAI.js" Assertion failed: scriptInterface.LoadScript(pathname, content)
0 msJenkins > cxxtest-debug-gcc6.xml::[failed-to-read]
Failed to read test report file /zpool0/trunk/cxxtest-debug-gcc6.xml org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. at org.dom4j.io.SAXReader.read(SAXReader.java:462)
0 msJenkins > cxxtest-debug.xml::[failed-to-read]
Failed to read test report file /Users/wfg/Jenkins/workspace/macos-differential/cxxtest-debug.xml org.dom4j.DocumentException: Error on line 1 of document : Content is not allowed in prolog. at org.dom4j.io.SAXReader.read(SAXReader.java:462)
0 msJenkins > TestAllocators::test_da
0 msJenkins > TestAtlasObjectXML::test_parse_attributes1
View Full Test Results (3 Failed · 342 Passed)

Event Timeline

Freagarach created this revision.Jul 9 2020, 8:25 PM
Owners added a subscriber: Restricted Owners Package.Jul 9 2020, 8:25 PM
Freagarach added a comment.EditedJul 9 2020, 8:28 PM

Also years.

source/simulation2/components/ICmpUnitMotion.h
136

Oops,,,

Vulcan added a comment.Jul 9 2020, 8:35 PM

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpUnitMotion.h
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/components/ICmpUnitMotion.h
|  34| class·ICmpUnitMotion·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpUnitMotion:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/ICmpUnitMotion.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
Executing section JS...
Executing section cli...

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

Silier added a subscriber: Silier.Jul 10 2020, 6:49 AM

I missed the purpose of the function. Can you clarify in summary please?

Freagarach edited the summary of this revision. (Show Details)Jul 13 2020, 2:30 PM
Freagarach updated this revision to Diff 12652.Jul 13 2020, 3:47 PM
  • Implement reset function.
  • Fix comment.
  • Add use case (attacking).

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

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

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

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

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

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

I'm pretty sure I gave some comments on irc but maybe I've dreamed that...

To be honest, I think this is a fair amount of complexity for something that has limited value (since UnitAI in general is relatively adequate).

the turning is not performed only when attacking but also in the meantime

This is arguably not better - when attacking you're not a Roomba that permanently tracks your enemy... Some turrets might benefit from it however. But turrets might not have UnitMotion ;)

UnitMotion is aldose tricky to change as you might introduce gliding. I would think that this maybe isn't the best component to implement that in.

Freagarach updated this revision to Diff 12723.Jul 16 2020, 3:20 PM
  • Fix test.
  • Wrap functions in UnitAI-functions.

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

Linter detected issues:
Executing section Source...

source/simulation2/components/ICmpUnitMotion.h
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"

source/simulation2/components/ICmpUnitMotion.h
|  34| class·ICmpUnitMotion·:·public·IComponent
|    | [MAJOR] CPPCheckBear (syntaxError):
|    | Code 'classICmpUnitMotion:' is invalid C code. Use --std or --language to configure the language.

source/simulation2/components/ICmpUnitMotion.cpp
|   1| /*·Copyright·(C)·2019·Wildfire·Games.
|    | [NORMAL] LicenseYearBear:
|    | License should have "2020" year instead of "2019"
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
| 181| 181| 	});
| 182| 182| 
| 183| 183| 	AddMock(unit, IID_Vision, {
| 184|    |-		GetRange: function() { return 10; },
|    | 184|+		"GetRange": function() { return 10; },
| 185| 185| 	});
| 186| 186| 
| 187| 187| 	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
| 185| 185| 	});
| 186| 186| 
| 187| 187| 	AddMock(unit, IID_Attack, {
| 188|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 188|+		"GetRange": function() { return { "max": 10, "min": 0}; },
| 189| 189| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 190| 190| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 191| 191| 		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
| 185| 185| 	});
| 186| 186| 
| 187| 187| 	AddMock(unit, IID_Attack, {
| 188|    |-		GetRange: function() { return { "max": 10, "min": 0}; },
|    | 188|+		GetRange: function() { return { "max": 10, "min": 0 }; },
| 189| 189| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 190| 190| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 191| 191| 		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
| 186| 186| 
| 187| 187| 	AddMock(unit, IID_Attack, {
| 188| 188| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 189|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 189|+		"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 190| 190| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 191| 191| 		GetPreference: function(t) { return 0; },
| 192| 192| 		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
| 186| 186| 
| 187| 187| 	AddMock(unit, IID_Attack, {
| 188| 188| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 189|    |-		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 189|+		GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 190| 190| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 191| 191| 		GetPreference: function(t) { return 0; },
| 192| 192| 		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
| 187| 187| 	AddMock(unit, IID_Attack, {
| 188| 188| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 189| 189| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 190|    |-		GetBestAttackAgainst: function(t) { return "melee"; },
|    | 190|+		"GetBestAttackAgainst": function(t) { return "melee"; },
| 191| 191| 		GetPreference: function(t) { return 0; },
| 192| 192| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 193| 193| 		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
| 188| 188| 		GetRange: function() { return { "max": 10, "min": 0}; },
| 189| 189| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 190| 190| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 191|    |-		GetPreference: function(t) { return 0; },
|    | 191|+		"GetPreference": function(t) { return 0; },
| 192| 192| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 193| 193| 		CanAttack: function(v) { return true; },
| 194| 194| 		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
| 189| 189| 		GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 190| 190| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 191| 191| 		GetPreference: function(t) { return 0; },
| 192|    |-		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 192|+		"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 193| 193| 		CanAttack: function(v) { return true; },
| 194| 194| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 195| 195| 	});
|    | [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
| 190| 190| 		GetBestAttackAgainst: function(t) { return "melee"; },
| 191| 191| 		GetPreference: function(t) { return 0; },
| 192| 192| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 193|    |-		CanAttack: function(v) { return true; },
|    | 193|+		"CanAttack": function(v) { return true; },
| 194| 194| 		CompareEntitiesByPreference: function(a, b) { return 0; },
| 195| 195| 	});
| 196| 196| 
|    | [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
| 191| 191| 		GetPreference: function(t) { return 0; },
| 192| 192| 		GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 193| 193| 		CanAttack: function(v) { return true; },
| 194|    |-		CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 194|+		"CompareEntitiesByPreference": function(a, b) { return 0; },
| 195| 195| 	});
| 196| 196| 
| 197| 197| 	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
| 202| 202| 	if (mode == 1)
| 203| 203| 	{
| 204| 204| 		AddMock(enemy, IID_Health, {
| 205|    |-			GetHitpoints: function() { return 10; },
|    | 205|+			"GetHitpoints": function() { return 10; },
| 206| 206| 		});
| 207| 207| 		AddMock(enemy, IID_UnitAI, {
| 208| 208| 			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
| 205| 205| 			GetHitpoints: function() { return 10; },
| 206| 206| 		});
| 207| 207| 		AddMock(enemy, IID_UnitAI, {
| 208|    |-			IsAnimal: function() { return false; }
|    | 208|+			"IsAnimal": function() { return false; }
| 209| 209| 		});
| 210| 210| 	}
| 211| 211| 	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
| 210| 210| 	}
| 211| 211| 	else if (mode == 2)
| 212| 212| 		AddMock(enemy, IID_Health, {
| 213|    |-			GetHitpoints: function() { return 0; },
|    | 213|+			"GetHitpoints": function() { return 0; },
| 214| 214| 		});
| 215| 215| 
| 216| 216| 	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
| 213| 213| 			GetHitpoints: function() { return 0; },
| 214| 214| 		});
| 215| 215| 
| 216|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 216|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 217| 217| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 218| 218| 
| 219| 219| 	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
| 213| 213| 			GetHitpoints: function() { return 0; },
| 214| 214| 		});
| 215| 215| 
| 216|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 216|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 217| 217| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 218| 218| 
| 219| 219| 	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
| 217| 217| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 218| 218| 
| 219| 219| 	AddMock(controller, IID_Position, {
| 220|    |-		JumpTo: function(x, z) { this.x = x; this.z = z; },
|    | 220|+		"JumpTo": function(x, z) { this.x = x; this.z = z; },
| 221| 221| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 222| 222| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 223| 223| 		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
| 218| 218| 
| 219| 219| 	AddMock(controller, IID_Position, {
| 220| 220| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 221|    |-		GetTurretParent: function() { return INVALID_ENTITY; },
|    | 221|+		"GetTurretParent": function() { return INVALID_ENTITY; },
| 222| 222| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 223| 223| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 224| 224| 		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
| 219| 219| 	AddMock(controller, IID_Position, {
| 220| 220| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 221| 221| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 222|    |-		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
|    | 222|+		"GetPosition": function() { return new Vector3D(this.x, 0, this.z); },
| 223| 223| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 224| 224| 		GetRotation: function() { return { "y": 0 }; },
| 225| 225| 		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
| 220| 220| 		JumpTo: function(x, z) { this.x = x; this.z = z; },
| 221| 221| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 222| 222| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 223|    |-		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
|    | 223|+		"GetPosition2D": function() { return new Vector2D(this.x, this.z); },
| 224| 224| 		GetRotation: function() { return { "y": 0 }; },
| 225| 225| 		IsInWorld: function() { return true; },
| 226| 226| 		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
| 221| 221| 		GetTurretParent: function() { return INVALID_ENTITY; },
| 222| 222| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 223| 223| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 224|    |-		GetRotation: function() { return { "y": 0 }; },
|    | 224|+		"GetRotation": function() { return { "y": 0 }; },
| 225| 225| 		IsInWorld: function() { return true; },
| 226| 226| 		MoveOutOfWorld: () => {}
| 227| 227| 	});
|    | [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
| 222| 222| 		GetPosition: function() { return new Vector3D(this.x, 0, this.z); },
| 223| 223| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 224| 224| 		GetRotation: function() { return { "y": 0 }; },
| 225|    |-		IsInWorld: function() { return true; },
|    | 225|+		"IsInWorld": function() { return true; },
| 226| 226| 		MoveOutOfWorld: () => {}
| 227| 227| 	});
| 228| 228| 
|    | [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
| 223| 223| 		GetPosition2D: function() { return new Vector2D(this.x, this.z); },
| 224| 224| 		GetRotation: function() { return { "y": 0 }; },
| 225| 225| 		IsInWorld: function() { return true; },
| 226|    |-		MoveOutOfWorld: () => {}
|    | 226|+		"MoveOutOfWorld": () => {}
| 227| 227| 	});
| 228| 228| 
| 229| 229| 	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
| 274| 274| 	var unitAIs = [];
| 275| 275| 
| 276| 276| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 277|    |-		SetInterval: function() { },
|    | 277|+		"SetInterval": function() { },
| 278| 278| 		SetTimeout: function() { },
| 279| 279| 	});
| 280| 280| 
|    | [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
| 275| 275| 
| 276| 276| 	AddMock(SYSTEM_ENTITY, IID_Timer, {
| 277| 277| 		SetInterval: function() { },
| 278|    |-		SetTimeout: function() { },
|    | 278|+		"SetTimeout": function() { },
| 279| 279| 	});
| 280| 280| 
| 281| 281| 
|    | [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
| 280| 280| 
| 281| 281| 
| 282| 282| 	AddMock(SYSTEM_ENTITY, IID_RangeManager, {
| 283|    |-		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
|    | 283|+		"CreateActiveQuery": function(ent, minRange, maxRange, players, iid, flags) {
| 284| 284| 			return 1;
| 285| 285| 		},
| 286| 286| 		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
| 283| 283| 		CreateActiveQuery: function(ent, minRange, maxRange, players, iid, flags) {
| 284| 284| 			return 1;
| 285| 285| 		},
| 286|    |-		EnableActiveQuery: function(id) { },
|    | 286|+		"EnableActiveQuery": function(id) { },
| 287| 287| 		ResetActiveQuery: function(id) { return [enemy]; },
| 288| 288| 		DisableActiveQuery: function(id) { },
| 289| 289| 		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
| 284| 284| 			return 1;
| 285| 285| 		},
| 286| 286| 		EnableActiveQuery: function(id) { },
| 287|    |-		ResetActiveQuery: function(id) { return [enemy]; },
|    | 287|+		"ResetActiveQuery": function(id) { return [enemy]; },
| 288| 288| 		DisableActiveQuery: function(id) { },
| 289| 289| 		GetEntityFlagMask: function(identifier) { },
| 290| 290| 	});
|    | [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
| 285| 285| 		},
| 286| 286| 		EnableActiveQuery: function(id) { },
| 287| 287| 		ResetActiveQuery: function(id) { return [enemy]; },
| 288|    |-		DisableActiveQuery: function(id) { },
|    | 288|+		"DisableActiveQuery": function(id) { },
| 289| 289| 		GetEntityFlagMask: function(identifier) { },
| 290| 290| 	});
| 291| 291| 
|    | [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
| 286| 286| 		EnableActiveQuery: function(id) { },
| 287| 287| 		ResetActiveQuery: function(id) { return [enemy]; },
| 288| 288| 		DisableActiveQuery: function(id) { },
| 289|    |-		GetEntityFlagMask: function(identifier) { },
|    | 289|+		"GetEntityFlagMask": function(identifier) { },
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	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
| 290| 290| 	});
| 291| 291| 
| 292| 292| 	AddMock(SYSTEM_ENTITY, IID_TemplateManager, {
| 293|    |-		GetCurrentTemplateName: function(ent) { return "special/formations/line_closed"; },
|    | 293|+		"GetCurrentTemplateName": function(ent) { return "special/formations/line_closed"; },
| 294| 294| 	});
| 295| 295| 
| 296| 296| 	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
| 294| 294| 	});
| 295| 295| 
| 296| 296| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 297|    |-		GetPlayerByID: function(id) { return playerEntity; },
|    | 297|+		"GetPlayerByID": function(id) { return playerEntity; },
| 298| 298| 		GetNumPlayers: function() { return 2; },
| 299| 299| 	});
| 300| 300| 
|    | [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
| 295| 295| 
| 296| 296| 	AddMock(SYSTEM_ENTITY, IID_PlayerManager, {
| 297| 297| 		GetPlayerByID: function(id) { return playerEntity; },
| 298|    |-		GetNumPlayers: function() { return 2; },
|    | 298|+		"GetNumPlayers": function() { return 2; },
| 299| 299| 	});
| 300| 300| 
| 301| 301| 	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
| 303| 303| 	});
| 304| 304| 
| 305| 305| 	AddMock(playerEntity, IID_Player, {
| 306|    |-		IsAlly: function() { return false; },
|    | 306|+		"IsAlly": function() { return false; },
| 307| 307| 		IsEnemy: function() { return true; },
| 308| 308| 		GetEnemies: function() { return [2]; },
| 309| 309| 	});
|    | [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
| 304| 304| 
| 305| 305| 	AddMock(playerEntity, IID_Player, {
| 306| 306| 		IsAlly: function() { return false; },
| 307|    |-		IsEnemy: function() { return true; },
|    | 307|+		"IsEnemy": function() { return true; },
| 308| 308| 		GetEnemies: function() { return [2]; },
| 309| 309| 	});
| 310| 310| 
|    | [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
| 305| 305| 	AddMock(playerEntity, IID_Player, {
| 306| 306| 		IsAlly: function() { return false; },
| 307| 307| 		IsEnemy: function() { return true; },
| 308|    |-		GetEnemies: function() { return [2]; },
|    | 308|+		"GetEnemies": function() { return [2]; },
| 309| 309| 	});
| 310| 310| 
| 311| 311| 	// 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
| 316| 316| 		var unitAI = ConstructComponent(unit + i, "UnitAI", { "FormationController": "false", "DefaultStance": "aggressive" });
| 317| 317| 
| 318| 318| 		AddMock(unit + i, IID_Identity, {
| 319|    |-			GetClassesList: function() { return []; },
|    | 319|+			"GetClassesList": function() { return []; },
| 320| 320| 		});
| 321| 321| 
| 322| 322| 		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
| 320| 320| 		});
| 321| 321| 
| 322| 322| 		AddMock(unit + i, IID_Ownership, {
| 323|    |-			GetOwner: function() { return 1; },
|    | 323|+			"GetOwner": function() { return 1; },
| 324| 324| 		});
| 325| 325| 
| 326| 326| 		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
| 324| 324| 		});
| 325| 325| 
| 326| 326| 		AddMock(unit + i, IID_Position, {
| 327|    |-			GetTurretParent: function() { return INVALID_ENTITY; },
|    | 327|+			"GetTurretParent": function() { return INVALID_ENTITY; },
| 328| 328| 			GetPosition: function() { return new Vector3D(); },
| 329| 329| 			GetPosition2D: function() { return new Vector2D(); },
| 330| 330| 			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
| 325| 325| 
| 326| 326| 		AddMock(unit + i, IID_Position, {
| 327| 327| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 328|    |-			GetPosition: function() { return new Vector3D(); },
|    | 328|+			"GetPosition": function() { return new Vector3D(); },
| 329| 329| 			GetPosition2D: function() { return new Vector2D(); },
| 330| 330| 			GetRotation: function() { return { "y": 0 }; },
| 331| 331| 			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
| 326| 326| 		AddMock(unit + i, IID_Position, {
| 327| 327| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 328| 328| 			GetPosition: function() { return new Vector3D(); },
| 329|    |-			GetPosition2D: function() { return new Vector2D(); },
|    | 329|+			"GetPosition2D": function() { return new Vector2D(); },
| 330| 330| 			GetRotation: function() { return { "y": 0 }; },
| 331| 331| 			IsInWorld: function() { return true; },
| 332| 332| 		});
|    | [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
| 327| 327| 			GetTurretParent: function() { return INVALID_ENTITY; },
| 328| 328| 			GetPosition: function() { return new Vector3D(); },
| 329| 329| 			GetPosition2D: function() { return new Vector2D(); },
| 330|    |-			GetRotation: function() { return { "y": 0 }; },
|    | 330|+			"GetRotation": function() { return { "y": 0 }; },
| 331| 331| 			IsInWorld: function() { return true; },
| 332| 332| 		});
| 333| 333| 
|    | [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
| 328| 328| 			GetPosition: function() { return new Vector3D(); },
| 329| 329| 			GetPosition2D: function() { return new Vector2D(); },
| 330| 330| 			GetRotation: function() { return { "y": 0 }; },
| 331|    |-			IsInWorld: function() { return true; },
|    | 331|+			"IsInWorld": function() { return true; },
| 332| 332| 		});
| 333| 333| 
| 334| 334| 		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
| 343| 343| 		});
| 344| 344| 
| 345| 345| 		AddMock(unit + i, IID_Vision, {
| 346|    |-			GetRange: function() { return 10; },
|    | 346|+			"GetRange": function() { return 10; },
| 347| 347| 		});
| 348| 348| 
| 349| 349| 		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
| 347| 347| 		});
| 348| 348| 
| 349| 349| 		AddMock(unit + i, IID_Attack, {
| 350|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 350|+			"GetRange": function() { return {"max":10, "min": 0}; },
| 351| 351| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353| 353| 			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
| 347| 347| 		});
| 348| 348| 
| 349| 349| 		AddMock(unit + i, IID_Attack, {
| 350|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 350|+			GetRange: function() { return { "max":10, "min": 0}; },
| 351| 351| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353| 353| 			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
| 347| 347| 		});
| 348| 348| 
| 349| 349| 		AddMock(unit + i, IID_Attack, {
| 350|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 350|+			GetRange: function() { return {"max": 10, "min": 0}; },
| 351| 351| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353| 353| 			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
| 347| 347| 		});
| 348| 348| 
| 349| 349| 		AddMock(unit + i, IID_Attack, {
| 350|    |-			GetRange: function() { return {"max":10, "min": 0}; },
|    | 350|+			GetRange: function() { return {"max":10, "min": 0 }; },
| 351| 351| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353| 353| 			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
| 348| 348| 
| 349| 349| 		AddMock(unit + i, IID_Attack, {
| 350| 350| 			GetRange: function() { return {"max":10, "min": 0}; },
| 351|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 351|+			"GetFullAttackRange": function() { return { "max": 40, "min": 0}; },
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353| 353| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 354| 354| 			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
| 348| 348| 
| 349| 349| 		AddMock(unit + i, IID_Attack, {
| 350| 350| 			GetRange: function() { return {"max":10, "min": 0}; },
| 351|    |-			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
|    | 351|+			GetFullAttackRange: function() { return { "max": 40, "min": 0 }; },
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353| 353| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 354| 354| 			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
| 349| 349| 		AddMock(unit + i, IID_Attack, {
| 350| 350| 			GetRange: function() { return {"max":10, "min": 0}; },
| 351| 351| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 352|    |-			GetBestAttackAgainst: function(t) { return "melee"; },
|    | 352|+			"GetBestAttackAgainst": function(t) { return "melee"; },
| 353| 353| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 354| 354| 			CanAttack: function(v) { return true; },
| 355| 355| 			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
| 350| 350| 			GetRange: function() { return {"max":10, "min": 0}; },
| 351| 351| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353|    |-			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
|    | 353|+			"GetTimers": function() { return { "prepare": 500, "repeat": 1000 }; },
| 354| 354| 			CanAttack: function(v) { return true; },
| 355| 355| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 356| 356| 		});
|    | [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
| 351| 351| 			GetFullAttackRange: function() { return { "max": 40, "min": 0}; },
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353| 353| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 354|    |-			CanAttack: function(v) { return true; },
|    | 354|+			"CanAttack": function(v) { return true; },
| 355| 355| 			CompareEntitiesByPreference: function(a, b) { return 0; },
| 356| 356| 		});
| 357| 357| 
|    | [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
| 352| 352| 			GetBestAttackAgainst: function(t) { return "melee"; },
| 353| 353| 			GetTimers: function() { return { "prepare": 500, "repeat": 1000 }; },
| 354| 354| 			CanAttack: function(v) { return true; },
| 355|    |-			CompareEntitiesByPreference: function(a, b) { return 0; },
|    | 355|+			"CompareEntitiesByPreference": function(a, b) { return 0; },
| 356| 356| 		});
| 357| 357| 
| 358| 358| 		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
| 364| 364| 
| 365| 365| 	// create enemy
| 366| 366| 	AddMock(enemy, IID_Health, {
| 367|    |-		GetHitpoints: function() { return 40; },
|    | 367|+		"GetHitpoints": function() { return 40; },
| 368| 368| 	});
| 369| 369| 
| 370| 370| 	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
| 367| 367| 		GetHitpoints: function() { return 40; },
| 368| 368| 	});
| 369| 369| 
| 370|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 370|+	var controllerFormation = ConstructComponent(controller, "Formation", { "FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
| 371| 371| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 372| 372| 
| 373| 373| 	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
| 367| 367| 		GetHitpoints: function() { return 40; },
| 368| 368| 	});
| 369| 369| 
| 370|    |-	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0});
|    | 370|+	var controllerFormation = ConstructComponent(controller, "Formation", {"FormationName": "Line Closed", "FormationShape": "square", "ShiftRows": "false", "SortingClasses": "", "WidthDepthRatio": 1, "UnitSeparationWidthMultiplier": 1, "UnitSeparationDepthMultiplier": 1, "SpeedMultiplier": 1, "Sloppyness": 0 });
| 371| 371| 	var controllerAI = ConstructComponent(controller, "UnitAI", { "FormationController": "true", "DefaultStance": "aggressive" });
| 372| 372| 
| 373| 373| 	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
| 390| 390| 	});
| 391| 391| 
| 392| 392| 	AddMock(controller, IID_Attack, {
| 393|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 393|+		"GetRange": function() { return {"max":10, "min": 0}; },
| 394| 394| 		CanAttackAsFormation: function() { return false; },
| 395| 395| 	});
| 396| 396| 
|    | [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
| 390| 390| 	});
| 391| 391| 
| 392| 392| 	AddMock(controller, IID_Attack, {
| 393|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 393|+		GetRange: function() { return { "max":10, "min": 0}; },
| 394| 394| 		CanAttackAsFormation: function() { return false; },
| 395| 395| 	});
| 396| 396| 
|    | [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
| 390| 390| 	});
| 391| 391| 
| 392| 392| 	AddMock(controller, IID_Attack, {
| 393|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 393|+		GetRange: function() { return {"max": 10, "min": 0}; },
| 394| 394| 		CanAttackAsFormation: function() { return false; },
| 395| 395| 	});
| 396| 396| 
|    | [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
| 390| 390| 	});
| 391| 391| 
| 392| 392| 	AddMock(controller, IID_Attack, {
| 393|    |-		GetRange: function() { return {"max":10, "min": 0}; },
|    | 393|+		GetRange: function() { return {"max":10, "min": 0 }; },
| 394| 394| 		CanAttackAsFormation: function() { return false; },
| 395| 395| 	});
| 396| 396| 
|    | [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
| 391| 391| 
| 392| 392| 	AddMock(controller, IID_Attack, {
| 393| 393| 		GetRange: function() { return {"max":10, "min": 0}; },
| 394|    |-		CanAttackAsFormation: function() { return false; },
|    | 394|+		"CanAttackAsFormation": function() { return false; },
| 395| 395| 	});
| 396| 396| 
| 397| 397| 	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
| 403| 403| 	for (let ent of unitAIs)
| 404| 404| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 405| 405| 
| 406|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 406|+	controllerAI.MoveIntoFormation({ "name": "Circle"});
| 407| 407| 
| 408| 408| 	// let all units be in position
| 409| 409| 	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
| 403| 403| 	for (let ent of unitAIs)
| 404| 404| 		TS_ASSERT_EQUALS(unitAI.fsmStateName, "INDIVIDUAL.COMBAT.ATTACKING");
| 405| 405| 
| 406|    |-	controllerAI.MoveIntoFormation({"name": "Circle"});
|    | 406|+	controllerAI.MoveIntoFormation({"name": "Circle" });
| 407| 407| 
| 408| 408| 	// let all units be in position
| 409| 409| 	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
| 312| »   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
| 404| »   »   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
| 413| »   »   TS_ASSERT_EQUALS(unitAI.fsmStateName,·"INDIVIDUAL.COMBAT.ATTACKING");
|    | [NORMAL] JSHintBear:
|    | 'unitAI' used out of scope.
|    | [NORMAL] ESLintBear (no-else-return):
|    | Unnecessary 'else' after 'return'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
| 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
|2054|2054| 
|2055|2055| 				"Attacked": function(msg) {
|2056|2056| 					// If we are capturing and are attacked by something that we would not capture, attack that entity instead
|2057|    |-					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force)
|2058|    |-						&& this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|    |2057|+					if (this.order.data.attackType == "Capture" && (this.GetStance().targetAttackersAlways || !this.order.data.force) &&
|    |2058|+						this.order.data.target != msg.data.attacker && this.GetBestAttackAgainst(msg.data.attacker, true) != "Capture")
|2059|2059| 						this.RespondToTargetedEntities([msg.data.attacker]);
|2060|2060| 				},
|2061|2061| 			},
|    | [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
|2213|2213| 					"MovementUpdate": function(msg) {
|2214|2214| 						// If it looks like the path is failing, and we are close enough (3 tiles) from wanted range
|2215|2215| 						// stop anyways. This avoids pathing for an unreachable goal and reduces lag considerably.
|2216|    |-						if (msg.likelyFailure || 
|    |2216|+						if (msg.likelyFailure ||
|2217|2217| 							msg.obstructed && this.RelaxedMaxRangeCheck(this.order.data, this.order.data.max + this.DefaultRelaxedMaxRange) ||
|2218|2218| 							!msg.obstructed && this.CheckRange(this.order.data))
|2219|2219| 							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
|2516|2516| 
|2517|2517| 								return type.specific == resourceType.specific &&
|2518|2518| 								    (type.specific != "meat" || resourceTemplate == template);
|2519|    |-						});
|    |2519|+							});
|2520|2520| 
|2521|2521| 						if (nearbyResource)
|2522|2522| 						{
|    | [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
|2848|2848| 					{
|2849|2849| 						// The building was already finished/fully repaired before we arrived;
|2850|2850| 						// let the ConstructionFinished handler handle this.
|2851|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2851|+						this.OnGlobalConstructionFinished({ "entity": this.repairTarget, "newentity": this.repairTarget});
|2852|2852| 						return true;
|2853|2853| 					}
|2854|2854| 
|    | [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
|2848|2848| 					{
|2849|2849| 						// The building was already finished/fully repaired before we arrived;
|2850|2850| 						// let the ConstructionFinished handler handle this.
|2851|    |-						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget});
|    |2851|+						this.OnGlobalConstructionFinished({"entity": this.repairTarget, "newentity": this.repairTarget });
|2852|2852| 						return true;
|2853|2853| 					}
|2854|2854| 
|    | [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
|3138|3138| 				this.StopTimer();
|3139|3139| 				this.ResetAnimation();
|3140|3140| 				if (this.formationAnimationVariant)
|3141|    |-					this.SetAnimationVariant(this.formationAnimationVariant)
|    |3141|+					this.SetAnimationVariant(this.formationAnimationVariant);
|3142|3142| 				else
|3143|3143| 					this.SetDefaultAnimationVariant();
|3144|3144| 				var cmpResistance = Engine.QueryInterface(this.entity, IID_Resistance);
|    | [NORMAL] ESLintBear (indent):
|    | Expected indentation of 2 tabs but found 7.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3364|3364| 		"COMBAT": "INDIVIDUAL.COMBAT", // reuse the same combat behaviour for animals
|3365|3365| 
|3366|3366| 		"WALKING": "INDIVIDUAL.WALKING",	// reuse the same walking behaviour for animals
|3367|    |-							// only used for domestic animals
|    |3367|+		// only used for domestic animals
|3368|3368| 
|3369|3369| 		// Reuse the same garrison behaviour for animals.
|3370|3370| 		"GARRISON": "INDIVIDUAL.GARRISON",
|    | [NORMAL] ESLintBear (no-unneeded-ternary):
|    | Unnecessary use of boolean literals in conditional expression.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3416|3416| 
|3417|3417| UnitAI.prototype.IsAnimal = function()
|3418|3418| {
|3419|    |-	return (this.template.NaturalBehaviour ? true : false);
|    |3419|+	return (!!this.template.NaturalBehaviour);
|3420|3420| };
|3421|3421| 
|3422|3422| UnitAI.prototype.IsDangerousAnimal = function()
|    | [NORMAL] ESLintBear (comma-spacing):
|    | A space is required after ','.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3556|3556| 		{
|3557|3557| 			let index = this.GetCurrentState().indexOf(".");
|3558|3558| 			if (index != -1)
|3559|    |-				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0,index));
|    |3559|+				this.UnitFsm.SwitchToNextState(this, this.GetCurrentState().slice(0, index));
|3560|3560| 			this.Stop(false);
|3561|3561| 		}
|3562|3562| 
|    | [NORMAL] ESLintBear (object-curly-spacing):
|    | A space is required after '{'.
|----|    | /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|    |++++| /zpool0/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
|3612|3612| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3613|3613| 			continue;
|3614|3614| 		if (i == 0)
|3615|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3615|+			this.UnitFsm.ProcessMessage(this, { "type": "PickupCanceled", "data": msg});
|3616|3616| 		else
|3617|3617| 			this.orderQueue.splice(i, 1);
|3618|3618| 		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
|3612|3612| 		if (this.orderQueue[i].type != "PickupUnit" || this.orderQueue[i].data.target != msg.entity)
|3613|3613| 			continue;
|3614|3614| 		if (i == 0)
|3615|    |-			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg});
|    |3615|+			this.UnitFsm.ProcessMessage(this, {"type": "PickupCanceled", "data": msg });
|3616|3616| 		else
|3617|3617| 			this.orderQueue.splice(i, 1);
|3618|3618| 		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
|3699|3699| };
|3700|3700| 
|3701|3701| 
|3702|    |-//// FSM linkage functions ////
|    |3702|+// // FSM linkage functions ////
|3703|3703| 
|3704|3704| // Setting the next state to the current state will leave/re-enter the top-most substate.
|3705|3705| 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
|3872|3872| 				continue;
|3873|3873| 			if (this.orderQueue[i].type == type)
|3874|3874| 				continue;
|3875|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3875|+			this.orderQueue.splice(i, 0, { "type": type, "data": data});
|3876|3876| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3877|3877| 			return;
|3878|3878| 		}
|    | [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
|3872|3872| 				continue;
|3873|3873| 			if (this.orderQueue[i].type == type)
|3874|3874| 				continue;
|3875|    |-			this.orderQueue.splice(i, 0, {"type": type, "data": data});
|    |3875|+			this.orderQueue.splice(i, 0, {"type": type, "data": data });
|3876|3876| 			Engine.PostMessage(this.entity, MT_UnitAIOrderDataChanged, { "to": this.GetOrderData() });
|3877|3877| 			return;
|3878|3878| 		}
|    | [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
|4113|4113| 	if (data.timerRepeat === undefined)
|4114|4114| 		this.timer = undefined;
|4115|4115| 
|4116|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4116|+	this.UnitFsm.ProcessMessage(this, { "type": "Timer", "data": data, "lateness": lateness});
|4117|4117| };
|4118|4118| 
|4119|4119| /**
|    | [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
|4113|4113| 	if (data.timerRepeat === undefined)
|4114|4114| 		this.timer = undefined;
|4115|4115| 
|4116|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness});
|    |4116|+	this.UnitFsm.ProcessMessage(this, {"type": "Timer", "data": data, "lateness": lateness });
|4117|4117| };
|4118|4118| 
|4119|4119| /**
|    | [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
|4158|4158| 	// TODO: This is a bit inefficient since every unit listens to every
|4159|4159| 	// construction message - ideally we could scope it to only the one we're building
|4160|4160| 
|4161|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4161|+	this.UnitFsm.ProcessMessage(this, { "type": "ConstructionFinished", "data": msg});
|4162|4162| };
|4163|4163| 
|4164|4164| 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
|4158|4158| 	// TODO: This is a bit inefficient since every unit listens to every
|4159|4159| 	// construction message - ideally we could scope it to only the one we're building
|4160|4160| 
|4161|    |-	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg});
|    |4161|+	this.UnitFsm.ProcessMessage(this, {"type": "ConstructionFinished", "data": msg });
|4162|4162| };
|4163|4163| 
|4164|4164| 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
|4197|4197| 	if (msg.fromStatusEffect)
|4198|4198| 		return;
|4199|4199| 
|4200|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4200|+	this.UnitFsm.ProcessMessage(this, { "type": "Attacked", "data": msg});
|4201|4201| };
|4202|4202| 
|4203|4203| 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
|4197|4197| 	if (msg.fromStatusEffect)
|4198|4198| 		return;
|4199|4199| 
|4200|    |-	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg});
|    |4200|+	this.UnitFsm.ProcessMessage(this, {"type": "Attacked", "data": msg });
|4201|4201| };
|4202|4202| 
|4203|4203| 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
|4202|4202| 
|4203|4203| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4204|4204| {
|4205|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4205|+	this.UnitFsm.ProcessMessage(this, { "type": "GuardedAttacked", "data": msg.data});
|4206|4206| };
|4207|4207| 
|4208|4208| 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
|4202|4202| 
|4203|4203| UnitAI.prototype.OnGuardedAttacked = function(msg)
|4204|4204| {
|4205|    |-	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data});
|    |4205|+	this.UnitFsm.ProcessMessage(this, {"type": "GuardedAttacked", "data": msg.data });
|4206|4206| };
|4207|4207| 
|4208|4208| 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
|4207|4207| 
|4208|4208| UnitAI.prototype.OnHealthChanged = function(msg)
|4209|4209| {
|4210|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4210|+	this.UnitFsm.ProcessMessage(this, { "type": "HealthChanged", "from": msg.from, "to": msg.to});
|4211|4211| };
|4212|4212| 
|4213|4213| 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
|4207|4207| 
|4208|4208| UnitAI.prototype.OnHealthChanged = function(msg)
|4209|4209| {
|4210|    |-	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to});
|    |4210|+	this.UnitFsm.ProcessMessage(this, {"type": "HealthChanged", "from": msg.from, "to": msg.to });
|4211|4211| };
|4212|4212| 
|4213|4213| 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
|4213|4213| UnitAI.prototype.OnRangeUpdate = function(msg)
|4214|4214| {
|4215|4215| 	if (msg.tag == this.losRangeQuery)
|4216|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4216|+		this.UnitFsm.ProcessMessage(this, { "type": "LosRangeUpdate", "data": msg});
|4217|4217| 	else if (msg.tag == this.losHealRangeQuery)
|4218|4218| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4219|4219| };
|    | [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| UnitAI.prototype.OnRangeUpdate = function(msg)
|4214|4214| {
|4215|4215| 	if (msg.tag == this.losRangeQuery)
|4216|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|    |4216|+		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg });
|4217|4217| 	else if (msg.tag == this.losHealRangeQuery)
|4218|4218| 		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|4219|4219| };
|    | [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
|4215|4215| 	if (msg.tag == this.losRangeQuery)
|4216|4216| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4217|4217| 	else if (msg.tag == this.losHealRangeQuery)
|4218|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4218|+		this.UnitFsm.ProcessMessage(this, { "type": "LosHealRangeUpdate", "data": msg});
|4219|4219| };
|4220|4220| 
|4221|4221| 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
|4215|4215| 	if (msg.tag == this.losRangeQuery)
|4216|4216| 		this.UnitFsm.ProcessMessage(this, {"type": "LosRangeUpdate", "data": msg});
|4217|4217| 	else if (msg.tag == this.losHealRangeQuery)
|4218|    |-		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg});
|    |4218|+		this.UnitFsm.ProcessMessage(this, {"type": "LosHealRangeUpdate", "data": msg });
|4219|4219| };
|4220|4220| 
|4221|4221| 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
|4220|4220| 
|4221|4221| UnitAI.prototype.OnPackFinished = function(msg)
|4222|4222| {
|4223|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4223|+	this.UnitFsm.ProcessMessage(this, { "type": "PackFinished", "packed": msg.packed});
|4224|4224| };
|4225|4225| 
|4226|4226| //// 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
|4220|4220| 
|4221|4221| UnitAI.prototype.OnPackFinished = function(msg)
|4222|4222| {
|4223|    |-	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|    |4223|+	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed });
|4224|4224| };
|4225|4225| 
|4226|4226| //// 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
|4223|4223| 	this.UnitFsm.ProcessMessage(this, {"type": "PackFinished", "packed": msg.packed});
|4224|4224| };
|4225|4225| 
|4226|    |-//// Helper functions to be called by the FSM ////
|    |4226|+// // Helper functions to be called by the FSM ////
|4227|4227| 
|4228|4228| UnitAI.prototype.GetWalkSpeed = function()
|4229|4229| {
|    | [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
|4974|4974| UnitAI.prototype.AttackEntityInZone = function(ents)
|4975|4975| {
|4976|4976| 	var target = ents.find(target =>
|4977|    |-		this.CanAttack(target)
|4978|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|    |4977|+		this.CanAttack(target) &&
|    |4978|+		this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4979|4979| 		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4980|4980| 	);
|4981|4981| 	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
|4975|4975| {
|4976|4976| 	var target = ents.find(target =>
|4977|4977| 		this.CanAttack(target)
|4978|    |-		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true))
|4979|    |-		&& (this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|    |4978|+		&& this.CheckTargetDistanceFromHeldPosition(target, IID_Attack, this.GetBestAttackAgainst(target, true)) &&
|    |4979|+		(this.GetStance().respondChaseBeyondVision || this.CheckTargetIsInVisionRange(target))
|4980|4980| 	);
|4981|4981| 	if (!target)
|4982|4982| 		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
|5041|5041| 	// If we are guarding/escorting, don't abandon as long as the guarded unit is in target range of the attacker
|5042|5042| 	if (this.isGuardOf)
|5043|5043| 	{
|5044|    |-		var cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5044|+		var cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5045|5045| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5046|5046| 		if (cmpUnitAI && cmpAttack &&
|5047|5047| 		    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
|5045|5045| 		var cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5046|5046| 		if (cmpUnitAI && cmpAttack &&
|5047|5047| 		    cmpAttack.GetAttackTypes().some(type => cmpUnitAI.CheckTargetAttackRange(this.isGuardOf, type)))
|5048|    |-				return false;
|    |5048|+			return false;
|5049|5049| 	}
|5050|5050| 
|5051|5051| 	// 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
|5083|5083| 	// If we are guarding/escorting, chase at least as long as the guarded unit is in target range of the attacker
|5084|5084| 	if (this.isGuardOf)
|5085|5085| 	{
|5086|    |-		let cmpUnitAI =  Engine.QueryInterface(target, IID_UnitAI);
|    |5086|+		let cmpUnitAI = Engine.QueryInterface(target, IID_UnitAI);
|5087|5087| 		let cmpAttack = Engine.QueryInterface(target, IID_Attack);
|5088|5088| 		if (cmpUnitAI && cmpAttack &&
|5089|5089| 		    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
|5096|5096| 	return false;
|5097|5097| };
|5098|5098| 
|5099|    |-//// External interface functions ////
|    |5099|+// // External interface functions ////
|5100|5100| 
|5101|5101| UnitAI.prototype.SetFormationController = function(ent)
|5102|5102| {
|    | [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
|5252|5252| 	{
|5253|5253| 		if (this.isGuardOf == target && this.order && this.order.type == "Guard")
|5254|5254| 			return;
|5255|    |-		else
|5256|    |-			this.RemoveGuard();
|    |5255|+		this.RemoveGuard();
|5257|5256| 	}
|5258|5257| 
|5259|5258| 	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
|5586|5586| 
|5587|5587| 	if (this.IsFormationController())
|5588|5588| 		this.CallMemberFunction("CancelSetupTradeRoute", [target]);
|5589|    |-}
|    |5589|+};
|5590|5590| /**
|5591|5591|  * Adds trade order to the queue. Either walk to the first market, or
|5592|5592|  * 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
|5607|5607| 	    this.workOrders.length && this.workOrders[0].type == "Trade")
|5608|5608| 	{
|5609|5609| 		let cmpTrader = Engine.QueryInterface(this.entity, IID_Trader);
|5610|    |-		if (cmpTrader.HasBothMarkets() && 
|    |5610|+		if (cmpTrader.HasBothMarkets() &&
|5611|5611| 		   (cmpTrader.GetFirstMarket() == target && cmpTrader.GetSecondMarket() == source ||
|5612|5612| 		    cmpTrader.GetFirstMarket() == source && cmpTrader.GetSecondMarket() == target))
|5613|5613| 		{
|    | [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
|5888|5888| 				{
|5889|5889| 					var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5890|5890| 					var targetClasses = this.order.data.targetClasses;
|5891|    |-					if (targetClasses.attack && cmpIdentity
|5892|    |-						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5891|+					if (targetClasses.attack && cmpIdentity &&
|    |5892|+						!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5893|5893| 						continue;
|5894|5894| 					if (targetClasses.avoid && cmpIdentity
|5895|5895| 						&& 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
|5891|5891| 					if (targetClasses.attack && cmpIdentity
|5892|5892| 						&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5893|5893| 						continue;
|5894|    |-					if (targetClasses.avoid && cmpIdentity
|5895|    |-						&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5894|+					if (targetClasses.avoid && cmpIdentity &&
|    |5895|+						MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5896|5896| 						continue;
|5897|5897| 					// Only used by the AIs to prevent some choices of targets
|5898|5898| 					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
|5914|5914| 		{
|5915|5915| 			var cmpIdentity = Engine.QueryInterface(targ, IID_Identity);
|5916|5916| 			var targetClasses = this.order.data.targetClasses;
|5917|    |-			if (cmpIdentity && targetClasses.attack
|5918|    |-				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|    |5917|+			if (cmpIdentity && targetClasses.attack &&
|    |5918|+				!MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5919|5919| 				continue;
|5920|5920| 			if (cmpIdentity && targetClasses.avoid
|5921|5921| 				&& 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
|5917|5917| 			if (cmpIdentity && targetClasses.attack
|5918|5918| 				&& !MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.attack))
|5919|5919| 				continue;
|5920|    |-			if (cmpIdentity && targetClasses.avoid
|5921|    |-				&& MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|    |5920|+			if (cmpIdentity && targetClasses.avoid &&
|    |5921|+				MatchesClassList(cmpIdentity.GetClassesList(), targetClasses.avoid))
|5922|5922| 				continue;
|5923|5923| 			// Only used by the AIs to prevent some choices of targets
|5924|5924| 			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
|6077|6077| 
|6078|6078| UnitAI.prototype.SetHeldPosition = function(x, z)
|6079|6079| {
|6080|    |-	this.heldPosition = {"x": x, "z": z};
|    |6080|+	this.heldPosition = { "x": x, "z": z};
|6081|6081| };
|6082|6082| 
|6083|6083| 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
|6077|6077| 
|6078|6078| UnitAI.prototype.SetHeldPosition = function(x, z)
|6079|6079| {
|6080|    |-	this.heldPosition = {"x": x, "z": z};
|    |6080|+	this.heldPosition = {"x": x, "z": z };
|6081|6081| };
|6082|6082| 
|6083|6083| 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
|6104|6104| 	return false;
|6105|6105| };
|6106|6106| 
|6107|    |-//// Helper functions ////
|    |6107|+// // Helper functions ////
|6108|6108| 
|6109|6109| /**
|6110|6110|  * 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
|6123|6123| 		return undefined;
|6124|6124| 
|6125|6125| 	return component.GetRange(type);
|6126|    |-}
|    |6126|+};
|6127|6127| 
|6128|6128| UnitAI.prototype.CanAttack = function(target)
|6129|6129| {
|    | [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
|6299|6299| 	return cmpPack && cmpPack.IsPacking();
|6300|6300| };
|6301|6301| 
|6302|    |-//// Formation specific functions ////
|    |6302|+// // Formation specific functions ////
|6303|6303| 
|6304|6304| UnitAI.prototype.IsAttackingAsFormation = function()
|6305|6305| {
|    | [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
|6304|6304| UnitAI.prototype.IsAttackingAsFormation = function()
|6305|6305| {
|6306|6306| 	var cmpAttack = Engine.QueryInterface(this.entity, IID_Attack);
|6307|    |-	return cmpAttack && cmpAttack.CanAttackAsFormation()
|6308|    |-		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|    |6307|+	return cmpAttack && cmpAttack.CanAttackAsFormation() &&
|    |6308|+		this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6309|6309| };
|6310|6310| 
|6311|6311| //// 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
|6308|6308| 		&& this.GetCurrentState() == "FORMATIONCONTROLLER.COMBAT.ATTACKING";
|6309|6309| };
|6310|6310| 
|6311|    |-//// Animal specific functions ////
|    |6311|+// // Animal specific functions ////
|6312|6312| 
|6313|6313| UnitAI.prototype.MoveRandomly = function(distance)
|6314|6314| {

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
|4018| »   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
|4961| »   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
|4976| »   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
|5024| »   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
|5047| »   »   ····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
|2058| »   »   »   »   »   »   &&·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
|3141| »   »   »   »   »   this.SetAnimationVariant(this.formationAnimationVariant)
|    | [NORMAL] JSHintBear:
|    | Missing semicolon.

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

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

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

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

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

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

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

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

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

Freagarach added a comment.EditedAug 5 2020, 7:13 PM

UnitMotion is aldose tricky to change as you might introduce gliding. I would think that this maybe isn't the best component to implement that in.

CCmpPosition?
The result would be the same: if you forget to reset the facing things look weird.

Freagarach planned changes to this revision.Aug 19 2020, 5:48 PM

As discussed on IRC today, @wraitii has some rotational stuff planned in unit pushing.
Better hold of until that.

This is arguably not better - when attacking you're not a Roomba that permanently tracks your enemy...

Well, currently UnitAI does assume that ;)